removing unneeded files

This commit is contained in:
Zach Tibbitts 2007-01-08 17:36:15 +00:00
parent d39e57024a
commit f40768c517
5 changed files with 0 additions and 71 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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()

View File

@ -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()

View File

@ -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()
######