Re: Storing a callback function as a class member

2010-07-08 Thread Nathan Huesken
Hey, Sorry, I tried to sent only the relevant parts of the example, but the part where the error was, was left out. I defined the function, used as callback like this: class SomeClass: def callback(param): ... So I forgot the self parameter, and therefor the callback had a different

tarfile and progress information

2010-07-07 Thread Nathan Huesken
Hi, I am packing large files with tarfile. Is there any way I can get progress information while packing? Thanks! Nathan -- http://mail.python.org/mailman/listinfo/python-list

Storing a callback function as a class member

2010-07-07 Thread Nathan Huesken
Hi, I have a class, where I want to store a callback function as a member to access later: class CallbackClass: def setCallback(self,cb): self.cb = cb def callCallback(self, para): self.cb(para) Doing so, I get the error: callbackFunc() takes exactly 1 parameter (2

importing modules from higher level directory

2010-06-25 Thread Nathan Huesken
Hi, Is it somehow possible to import modules from *.py files in a higher level directory? Intuitively I would do import ../module but that does not work. How does it work? Thanks! Nathan -- http://mail.python.org/mailman/listinfo/python-list

File descriptor to file object

2010-06-14 Thread Nathan Huesken
Hi, tempfile.mkstemp returns a file name and a file descriptor (as returned by os.open). Can I somehow convert this descriptor to a file object? Thanks! Nathan -- http://mail.python.org/mailman/listinfo/python-list

Re: FIle transfer over network - with Pyro?

2010-06-09 Thread Nathan Huesken
Thanks for all the replies. I might use http, or I utilize a separate ftp server. On Sat, 5 Jun 2010 13:34:45 -0700 geremy condra debat...@gmail.com wrote: On Sat, Jun 5, 2010 at 10:14 AM, Dan Stromberg strom...@gmail.com wrote: A more realistic answer is probably to use something based on

FIle transfer over network - with Pyro?

2010-06-03 Thread Nathan Huesken
Hi, I am writing a network application which needs from time to time do file transfer (I am writing the server as well as the client). For simple network messages, I use pyro because it is very comfortable. But I suspect, that doing a file transfer is very inefficient over pyro, am I right (the