Re: Learning Python for no reason

2008-05-12 Thread Brian Vanderburg II
nguages. As for learning for the sake of it, if it's fun I don't see how it could hurt any. Brian Vanderburg II -- http://mail.python.org/mailman/listinfo/python-list

Zipping python modules

2008-06-16 Thread Brian Vanderburg II
lls under site-packages, but is there a way I could compress the top-level 'lib' directory into a python.zip instead so save some space, and do I need the 'test' directory (which is about 10MB itself)? Brian Vanderburg II -- http://mail.python.org/mailman/listinfo/python-list

Is there an official way to add methods to an instance?

2008-04-03 Thread Brian Vanderburg II
so that when 'a' is no longer valid, the object can die instead of continuing to exitng because wrapper.func_globals still contains a reference, but seems very hackish an maybe problematic. I'm wondering if there is a better way? Brian Vanderburg II -- http://mail.python.org/mailman/listinfo/python-list

Re: Java or C++?

2008-04-14 Thread Brian Vanderburg II
> My idea, if you really love Python and never think about erasing it > from your mind, go for C (not C++). A script language plus C can solve > every problem you need to solve. Also Python works pretty fine with C. I agree mostly with this one. Scripting is very nice when writing an applicatio

Is massive spam coming from me on python lists?

2008-04-20 Thread Brian Vanderburg II
eems to include my address (I'm not sure about mail headers so I don't know how From: is different than Sender:) Anyway, it seems to be a bunch of spam emails about cracks and stuff. Brian Vanderburg II -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Brian Vanderburg II
r = os.path.expanduser("~") dir = os.path.join(dir, "Library", "Application Support") dir = os.path.join(dir, "vendor", "app") # Unix/Linux/all others else: dir = os.path.expanduser("~") dir = os.path.join(dir, ".app") # Some applications include vendor # dir = os.path.join(dir, ".vendor", "app") return dir Brian Vanderburg II -- http://mail.python.org/mailman/listinfo/python-list

Signals/Slots support in Python

2008-05-01 Thread Brian Vanderburg II
where when an object is gone, the slot is gone as well, the slot just holds a weak reference to the object. Brian Vanderburg II # Begin Signal import weakref import random class Signal: class Slot: def __init__(self, fn): self.__fn = fn def __call__(self, accum,

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread Brian Vanderburg II
This is sort of related, but I'm wondering what is different between "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same thing, since an absolute path is not specified, find 'python' from the PATH environment, I don'

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread Brian Vanderburg II
D'Arcy J.M. Cain wrote: On Thu, 08 May 2008 07:31:17 -0400 Brian Vanderburg II <[EMAIL PROTECTED]> wrote: This is sort of related, but I'm wondering what is different between "#!/usr/bin/env python" and "#!python". Wouldn't the second do the s