mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 19:46:22 +00:00
removing unneeded files
This commit is contained in:
parent
d39e57024a
commit
f40768c517
@ -1,8 +0,0 @@
|
||||
|
||||
README:
|
||||
|
||||
This directory is for hypothetical ideas for snippets of code,
|
||||
etc that may be included into the software at some point.
|
||||
|
||||
setup.py will ignore this directory, and so nothing in here
|
||||
will be included in tarball or package releases.
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env python2.4
|
||||
|
||||
import mmap, os, time
|
||||
mx = mmap.mmap(os.open('xxx',os.O_RDWR), 1)
|
||||
last = None
|
||||
while True:
|
||||
mx.resize(mx.size())
|
||||
data = mx[:]
|
||||
if data != last:
|
||||
print data
|
||||
last = data
|
||||
time.sleep(1)
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env python2.4
|
||||
|
||||
fileob = open('xxx','w')
|
||||
while True:
|
||||
data = raw_input('Enter some text:')
|
||||
fileob.seek(0)
|
||||
fileob.write(data)
|
||||
fileob.truncate()
|
||||
fileob.flush()
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env python2.4
|
||||
|
||||
import xmlrpclib
|
||||
|
||||
try:
|
||||
# Try and connect to current instance
|
||||
proxy = xmlrpclib.ServerProxy('http://localhost:8888')
|
||||
print proxy.open_file('server already exists')
|
||||
except:
|
||||
# if connecting failed
|
||||
print "couldn't connect to socket"
|
||||
import xmlrpc_simple_server
|
||||
xmlrpc_simple_server.Server()
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env python2.4
|
||||
|
||||
import SimpleXMLRPCServer
|
||||
|
||||
class Server:
|
||||
def __init__(self):
|
||||
print "Starting simple server, registering"
|
||||
self.server = StoppableXMLRPCServer(('localhost',8888))
|
||||
self.server.register_instance(self)
|
||||
self.server.serve_forever()
|
||||
|
||||
def open_file(self, *args):
|
||||
print "Opening files", args
|
||||
return args
|
||||
|
||||
def shut_down(self, *args):
|
||||
print "Shutting down the server"
|
||||
self.server.stop = True
|
||||
|
||||
######
|
||||
class StoppableXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer):
|
||||
"""Override of TIME_WAIT"""
|
||||
allow_reuse_address = True
|
||||
|
||||
def serve_forever(self):
|
||||
self.stop = False
|
||||
while not self.stop:
|
||||
self.handle_request()
|
||||
######
|
Loading…
x
Reference in New Issue
Block a user