This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PyPDF2 | |
import re | |
import tkinter | |
from tkinter import * | |
import os.path | |
from client import * | |
#test sharing pdfs as well as work error correcting codes (failed to connect, not right type of file, etc) , testers for input,also rename and create ico and check file type and filter what is typed and edit how binary looks on the screen and download mode and edit pack_forget for various pages and document also work on multi connections on server . check files to see if real, expand file size, check enteries . get() validity, new pack_forgets in back, and clear inserts after sends or saves, and debinarize files for viewing only, implement IP address connect | |
top=tkinter.Tk() | |
var = IntVar() | |
varchoice=IntVar() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating a Custom Widget It would not be difficult to change the labels in the root widget to some buttons and text boxes to create the Add Location form I have in mind. But that would make things rather complicated later, when you need to remove all those widgets from the view to put other data (for example, a forecast) on display. Further, if the user later wanted to add another location, it would be tricky to restore all the Add Location widgets. Instead, create a custom AddLocationForm widget that encapsulates the text entry, search button, location button, and search results into a single widget. Then set the root widget to be an instance of that custom widget instead. Example 1-5 does all of this. Example 1-5. Custom AddLocationForm widget AddLocationForm: # <AddLocationForm@BoxLayout>: # orientation: "vertical" # BoxLayout: TextInput: 12 | Chapter 1: Introducing Kivy www.it-ebooks.info | |
Page 27 | |
Button: text: "Search" Button: text: "Current Location" ListView: item_strings: ["Palo Alto, MX", "Palo Alto, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import tkinter | |
from tkinter import * | |
class ehow: | |
ehow_website=Tk() | |
text=Text(ehow_website) | |
def website(): | |
link_collector=[] | |
url = urlopen("http://www.ehow.com").read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
class ehow: | |
link_collector=[] | |
url = urlopen("http://www.ehow.com").read() | |
soup = BeautifulSoup(url,"html.parser") | |
for line in soup.find_all('a'): | |
link_collector=line.get('href') | |
print(link_collector) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
s = socket.socket() | |
host = socket.gethostname() | |
port = 1231 | |
s.connect((host, port)) | |
print (s.recv(1024)) | |
filename=input('Choose the file') | |
filez=''.join(filename) | |
s.send(filez.encode()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
s = socket.socket() | |
host = socket.gethostname() | |
port = 1231 | |
s.connect((host, port)) | |
print (s.recv(1024)) | |
filename=input('Choose the file') | |
filez=''.join(filename) | |
s.send(filez.encode()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication2 | |
{ | |
public partial class Form1 : Form | |
{ | |
bool shouldPaint = false; | |
public Form1() |