Unpickling data with classes from dynamic modules

2013-08-21 Thread Fredrik Tolf
having to modify the pickle module itself? -- Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

RE: Unpickling data with classes from dynamic modules

2013-08-21 Thread Fredrik Tolf
On Wed, 21 Aug 2013, Prasad, Ramit wrote: Fredrik Tolf wrote: [...] I considered trying to create subclasses of the pickler and unpickler that pickle a reference to a module loader and data for the particular module along with a class that comes from such a module, by overriding

Re: confused about __new__

2011-12-27 Thread Fredrik Tolf
On Tue, 27 Dec 2011, Ian Kelly wrote: On Mon, Dec 26, 2011 at 10:48 PM, Fredrik Tolf fred...@dolda2000.com wrote: I'm also a bit confused about __new__. I'd very much appreciate it if someone could explain the following aspects of it:  * The manual (http://docs.python.org/reference

Re: Daemon management

2011-12-27 Thread Fredrik Tolf
On Wed, 28 Dec 2011, Lie Ryan wrote: On 12/27/2011 12:43 PM, Fredrik Tolf wrote: [...] This is possible through the use of a debugger. I've never used it, but I heard good thing of winpdb which has remote debugging. (http://winpdb.org/) Thanks, but not as long as the debugger freezes

Re: Daemon management

2011-12-27 Thread Fredrik Tolf
. -- Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Daemon management

2011-12-26 Thread Fredrik Tolf
/ Humbly, Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expressions

2011-12-26 Thread Fredrik Tolf
', '@HWI-ST115:568:B08LLABXX:1:1105:6465:151103 1:N:0:') Also, you may be interested to know that you can use \d instead of [0-9]. -- Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: confused about __new__

2011-12-26 Thread Fredrik Tolf
; how methods, properties and the like are bound; how pickle can instantiate a class without calling __init__; when and whether __dict__ is created and a couple of other things. Is there a complete documentation of the process anywhere that I haven't managed to find? -- Fredrik Tolf

Non-exhaustive file reads

2006-12-02 Thread Fredrik Tolf
this? Regards, Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-exhaustive file reads

2006-12-02 Thread Fredrik Tolf
On Sat, 2006-12-02 at 20:00 -0800, Paul Rubin wrote: Fredrik Tolf [EMAIL PROTECTED] writes: mode, but nowhere can I find any information about how to enable non-blocking mode in Python. Can anyone provide me with any information on how to accomplish this? In Linux you'd use fcntl

String formatters with variable argument length

2006-11-30 Thread Fredrik Tolf
, that it is impossible? Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: String formatters with variable argument length

2006-11-30 Thread Fredrik Tolf
On Thu, 2006-11-30 at 16:26 -0800, John Machin wrote: Fredrik Tolf wrote: [...] The thing is, I want to get format strings from the user, and I don't want to require the user to consume all the arguments. docs.python.org doesn't seem to have any clues on how to achieve this, and I can't

KeyboardInterrupt from syscalls

2006-11-22 Thread Fredrik Tolf
to clean up resources being used from my C code)? Or does something completely else happen? Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: KeyboardInterrupt from syscalls

2006-11-22 Thread Fredrik Tolf
On Wed, 2006-11-22 at 19:45 +0100, Fredrik Lundh wrote: Fredrik Tolf wrote: So how does it work? Does my code get to return Py_FALSE, and the interpreter ignores it, seeing that an exception is set? Is a non-local exit performed right over my call stack (in which case my next question

Re: Secure Python

2006-11-17 Thread Fredrik Tolf
On Thu, 2006-11-16 at 08:43 +0200, Hendrik van Rooyen wrote: Fredrik Tolf [EMAIL PROTECTED] wrote: I was thinking that maybe it could be possible to load and run untrusted Python code, simply by loading it in a module with a modified version of __builtins__. Without any reachable

Secure Python

2006-11-15 Thread Fredrik Tolf
-specific stuff like SECCOMD, of course). Thank you very much for your time! Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking function calls

2006-03-08 Thread Fredrik Tolf
On Mon, 2006-03-06 at 20:25 -0800, James Stroud wrote: Fredrik Tolf wrote: If I have a variable which points to a function, can I check if certain argument list matches what the function wants before or when calling it? Currently, I'm trying to catch a TypeError when calling the function

Checking function calls

2006-03-06 Thread Fredrik Tolf
), but that has the rather undesirable side effect of also catching any TypeErrors raised inside the function. Is there a way to avoid that? Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list

Inline assignments

2006-03-05 Thread Fredrik Tolf
still valid for other situations. How would you go about these situations? Thanks for your time! Fredrik Tolf -- http://mail.python.org/mailman/listinfo/python-list