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

Unpickling data with classes from dynamic modules

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

Re: Daemon management

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

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 freeze

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 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/datamodel.html&

Re: confused about __new__

2011-12-26 Thread Fredrik Tolf
about, like what it means to call a type object at all; 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 anywher

Re: Regular expressions

2011-12-26 Thread Fredrik Tolf
ch the last colon as well, in order not to retain it into the result string. All in all, you will probably want to use something like this to correct that regex: re.sub(r'@(\S+)\s([1-9]+):[A-N]+:[0-9]+:', r'@\1/\2', '@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

Daemon management

2011-12-26 Thread Fredrik Tolf
://www.dolda2000.com/~fredrik/pdm/> Humbly, 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 acc

Non-exhaustive file reads

2006-12-02 Thread Fredrik Tolf
plish this? Regards, 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 clue

String formatters with variable argument length

2006-11-30 Thread Fredrik Tolf
d I can't think of what to google for. Could it be as I fear, that it is impossible? 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 stac

KeyboardInterrupt from syscalls

2006-11-22 Thread Fredrik Tolf
ow 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: 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 versio

Secure Python

2006-11-15 Thread Fredrik Tolf
;t thought of (apart from using O/S-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 ca

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
is might have been a bad example, since somestring.split() could be used instead, but it's 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