Re: newbie questions

2004-12-11 Thread houbahop
Hello again everyone , var2[:]=[] has solved my problem, and I don't understand why it is programming by side effect. I don't think it's bad, look at this, it's what I've done : def Clear(lvar) lvar[:]=[] def main (starting class) var1=[] var1.append('a') Clear(var1) var1 can only

Re: Python vs. Perl

2004-12-11 Thread loritsch
Christopher De Vries wrote: > Roy Smith already touched on regular expressions, but as far as > features go, I would say that the real difference between python and > perl is not in the features, but in the philosophy. To help aid in this discussion, the following Python and Perl philosophy links

Re: How to remove packages - wxPython

2004-12-11 Thread Peter
Peter Hansen wrote: > Peter wrote: >> Linux kernel 2.6.9 >> Slackware 10 >> Python version 2.3.4 >> wxPython version 2.4.2.4 >> >> I compiled and installed wxPython. >> >> There is no uninstall script that I can find for the py components. The >> library component has a make uninstall. >> >> Wh

handy stacktrace class

2004-12-11 Thread Will Ware
I was fooling with some Python code, and starting to miss the Exception.printStackTrace() feature in Java. Here is a stab at something roughly analogous, which puts together a stacktrace as an XML document. import xml.dom.minidom class Stacktrace(xml.dom.minidom.Document): def __init__(self):

[jobs] Python web programmer needed (Los Angeles)

2004-12-11 Thread Ron Garret
Python programmer needed to do web development for an early-stage entertainment industry startup company. We prefer someone in the northern LA area (the company offices are in Altadena), but will consider telecommuters. Please email resumes to me at ron at flownet.com. rg -- http://mail.py

Overriding properties

2004-12-11 Thread Nick Patavalis
Why does the following print "0 0" instead of "0 1"? What is the canonical way to rewrite it in order to get what I obviously expect? class C(object): __val = 0 def set_value(self, val): if val < 0 : self.__val = 0 else : self.__val = val def get_value(self)

Re: from vb6 to Python

2004-12-11 Thread Martijn Faassen
Luis M. Gonzalez wrote: MarcoL wrote: Hello, I am a VB6 programmer and I would like to learn a new high level language (instead of restarting from scratch with .NET... I'd like to add that by going with Python, you'll also be able to develop for .NET. Check this out: www.ironpython.com . S

PEP 338: Executing modules inside packages with '-m'

2004-12-11 Thread Nick Coghlan
Python 2.4's -m command line switch only works for modules directly on sys.path. Trying to use it with modules inside packages will fail with a "Module not found" error. This PEP aims to fix that for Python 2.5. Previously, posting of a draft version of the PEP to python-dev and python-list did

problem with embbed boost.python in multi-interpreter and multi-thread HELP please

2004-12-11 Thread Donnie Leen
I wrote a program embbed boost.python, each thread running a sub-interpreter, i made a module implement by boost.python, and i wish this module imported in each sub-interpreter, i find that the module could initialize only once, otherwise the boost.python will throw a exception said that somethi

<    1   2