ting again doesn't seem to do it. Thanks in advance for your
help.
Lawrence Wang
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Say I have a directory tree like this:
foo
- bar
-- quux.py
- baz
-- glonk.py
>From within glonk.py, how do I import quux.py? I've tried going to
foo, running baz/glonk.py, and using "from bar import quux", but this
doesn't seem to work.
Thanks in advance!
Lawrence
I've been using BaseHTTPServer (and subclassing
BaseHTTPRequestHandler, of course) for a project at work. However, I
can't seem to close my connections completely once I'm done with the
server. I've tried:
server.server_close()
del server
but when I try to use the same port again, it complains th
Here's some more detail about how I've got things set up. I left a
bunch of things out of my original email; sorry about that, I was
rushed for time. I don't have access to the verbatim code right now,
but here's the gist. I've subclassed threading.Thread like this:
class ServerThread(threading.Th
apologies if this doesn't belong on tutor.
i have a long-running script that manages a bunch of sockets with asyncore,
opening 600 connections every 30 seconds for short transactions, and every
now and then (like anywhere from twice an hour to once every few hours) i
get this weird error: "filedes
I have a SimpleXMLRPCServer, which I've tweaked thusly:
class StoppableXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer):
def serve_forever(self):
"""to stop this server: register a function in the class
that uses it which sets server.stop to True."""
self.stop = Fal
I'm wondering, though, if there's a way
to do this that's less dependent on external programs. I thought
os.waitpid() might work, but on *nix I can only call it for child
processes.
Lawrence Wang
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> >> for item in itemIDs:
> >> print item
>
> yeilds
>
>
>
>
>
>
>
> Okay, no problem. Now all I have to do is figure out which
> particlular.string.of.words.interconnected.by.periods to
> pass to extract the values.
>
> >> for item in itemIDs:
> >> print item.nodeValue
>
> Se
>>> struct.calcsize('hq')
12
>>> struct.calcsize('qh')
10
why is this? is it platform-dependent? i'm on mac os x.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor