python Programming Glossary: self.port
Exposing model method with Tastypie http://stackoverflow.com/questions/14085865/exposing-model-method-with-tastypie 'memory' self.ram 'ip' self.ip_address.address 'port' self.port 'startcmds' parsedcmds 'game' game result client.send data return..
Netcat implementation in Python http://stackoverflow.com/questions/1908878/netcat-implementation-in-python def __init__ self hostname port self.hostname hostname self.port port def send self content self.socket socket.socket socket.AF_INET.. socket.SOCK_STREAM self.socket.connect self.hostname self.port self.socket.setblocking 0 result '' read_ready write_ready in_error..
Tell urllib2 to use custom DNS http://stackoverflow.com/questions/2236498/tell-urllib2-to-use-custom-dns self.sock socket.create_connection MyResolver self.host self.port self.timeout class MyHTTPSConnection httplib.HTTPSConnection.. self sock socket.create_connection MyResolver self.host self.port self.timeout self.sock ssl.wrap_socket sock self.key_file self.cert_file..
Error using httlib's HTTPSConnection with PKCS#12 certificate http://stackoverflow.com/questions/2630011/error-using-httlibs-httpsconnection-with-pkcs12-certificate host self.conn httplib.HTTPSConnection host self.host port self.port key_file cert_file cert_file cert_file self.conn.putrequest..
Python - How can I fetch emails via POP or IMAP through a proxy? http://stackoverflow.com/questions/3386724/python-how-can-i-fetch-emails-via-pop-or-imap-through-a-proxy IMAP4 def open self host port IMAP4_PORT self.host host self.port port self.sock sockssocket self.sock.setproxy PROXY_TYPE_SOCKS5..
Problem with multi threaded Python app and socket connections http://stackoverflow.com/questions/4783735/problem-with-multi-threaded-python-app-and-socket-connections host port threading.Thread.__init__ self self.host host self.port port self.status def run self self.sk socket.socket socket.AF_INET.. self.sk.settimeout 20 try self.sk.connect self.host self.port except Exception err self.status str err else self.status connected..
Problems on select module on Python 2.5 http://stackoverflow.com/questions/584575/problems-on-select-module-on-python-2-5 __init__ self.connection serverconn.ServerConn self.server self.port File src beanstalk serverconn.py line 25 in __init__ self.poller..
How to exit a multithreaded program? http://stackoverflow.com/questions/5849484/how-to-exit-a-multithreaded-program def __init__ self port StoppableThread.__init__ self self.port port self.threads def run self # handle connection acception.. socket.AF_INET socket.SOCK_STREAM conn.bind '' self.port conn.listen 5 # set socket timeout to ~10ms conn.settimeout..
Twisted: disable logging of Twisted-framework classes http://stackoverflow.com/questions/7379712/twisted-disable-logging-of-twisted-framework-classes def __init__ self host port data beat_period self.ip host self.port int port self.data data self.beat int beat_period def startService.. reactor.listenUDP 0 protocol port.write self.data self.ip self.port port.stopListening now when I run this client with twistd I..
Python - Sending files over sockets http://stackoverflow.com/questions/9385509/python-sending-files-over-sockets socket.gethostname port 0 file '' def __init__ self port self.port port self.gate.bind self.host self.port self.listen def listen.. __init__ self port self.port port self.gate.bind self.host self.port self.listen def listen self self.gate.listen 10 while True add.. host '' port 0 file '' def __init__ self host port file self.port port self.host host self.file file self.connect def connect..
Thread synchronization, Python http://stackoverflow.com/questions/9521113/thread-synchronization-python socket def __init__ self event self.host 'localhost' self.port 50000 self.backlog 5 self.size 1024 self.server None self.server_running.. socket.SOCK_STREAM self.server.bind self.host self.port self.server.listen 5 print Listening to port str self.port ..... self.port self.server.listen 5 print Listening to port str self.port ... except socket.error value message if self.server self.server.close..
|