Re: Optional Static Typing

2004-12-28 Thread Ville Vainio
> "Ryan" == Ryan Paul <[EMAIL PROTECTED]> writes: Ryan> I wrote a blog post this morning in which I briefly argue Ryan> using DbC and predicate based argument constraints instead Ryan> of static typing. Take a look I took a look. The first impression is that there is too much stuf

Re: More elegant way to cwd?

2004-12-28 Thread Kamilche
Other than using os.pardir instead of '..', and possibly adding an "os.path.abspath()" call to the last bit (or does realpath already do that? It's unclear from the docs), I can't see anything fundamental I'd do differently... except package these functions up as nice clean subroutines, possibly i

Re: argument type

2004-12-28 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > below). I personally prefer the latter because it seems much more > likely that users will define alternate collection classes than that > users will define alternate string classes. My code would look like: > > def abc(arg1, arg2, arg3): >

Repainting

2004-12-28 Thread LutherRevisited
I have an application that uses a WxListCtrl to hold data that is updated extremely fast. When I run my application the listctrl updates so fast that it practically disappears. Is there a way I can have it update with the user seeing it update rapidly without the dissapearing? Right now I have u

Returned mail: Data format error

2004-12-28 Thread Mail Delivery Subsystem
šD“n¤¡²–…´È¾`'ƒ‚óhžÖ59¥ƒMþ“ŽO'¸þ§é¶¨|1än‘Õï۟Om°æ>ƒZ •H»Wû¸­“¯QD淞B-•:mAÞ¶µT—ªbˆÉÖ°8Ð?x×Á†Ùµ³›˜ã“‹ýãkµ• -¡:¥7gËgw,"ñ 05뢃ö.(¥ãxiû¾¿ÇD:zºE ^Œbjú*DØÏ²%¿ä1tNês,YV—]hó¯ª8[AÉ 9‚ǰ(Ï®q]êÌÌT?]_žìQ µYË/ð±Ì. ÷ÇNpo„Êžì¿bo…{Dâ#ò„¯%tëÝÞãtIèÐ&}üãwKÎD–¡ãÁ±ZØH ?°éÛ^“Ää7¶›8<:Õ#"‰a³Öðý8›’~H¨6õ"2Ât"ÚU',¶‡î

popen2, 3, 4 -- will closing all returned streams result in process termination?

2004-12-28 Thread Evgeni Sergeev
After I opened streams to a process using popen2, popen3 or popen4, will closing every one of the streams terminate the process? Is there assurance that the process will terminate and not sit in memory orphaned, waiting on its stdin, for example? Evgeni Sergeev -- http://mail.python.org/mail

Re: objects as mutable dictionary keys

2004-12-28 Thread Peter Maas
John Roth schrieb: No. The basic answer is that it's up to the object whether it will allow itself to be used as a dictionary key. In other words, if the designer of an object thinks it makes sense for instances to be dictionary keys, then he can supply a __hash__() method. If he doesn't, then he d

Re: popen2, 3, 4 -- will closing all returned streams result in process termination?

2004-12-28 Thread Paul Rubin
[EMAIL PROTECTED] (Evgeni Sergeev) writes: > Is there assurance that the process will terminate and not sit > in memory orphaned, waiting on its stdin, for example? The process should receive an EOF. It will typically handle EOF by terminating, but that is not guaranteed. -- http://mail.python.o

Looking for source preservation features in XML libs

2004-12-28 Thread Grzegorz Adam Hankiewicz
Hi. I'm looking for two specific features in XML libraries. One is two be able to tell which source file line a tag starts and ends. Say, tag is located on line 34 column 7, and the matching three lines later on column 56. Another feature is to be able to save the processed XML code in a way th

DB-API format string conventions

2004-12-28 Thread Craig Ringer
Hi all I've recently been writing some code that for various reasons needs to support a couple of different PostgreSQL APIs for Python, and have the potential for MySQL support down the track. I've been running into a fair bit of trouble with the DB API, in particular the freedom it gives DB modul

Re: DB-API format string conventions

2004-12-28 Thread Craig Ringer
On Tue, 2004-12-28 at 18:29, Craig Ringer wrote: > Would there be any interest in releasing a DB-API 2.1 with one > parameter style made MANDATORY, and a tuple of other supported styles in > .paramstyles ? I think existing modules implemented in Python could be > retrofitted to take extended

RE: built-in 'property'

2004-12-28 Thread Bob . Cowdery
Title: RE: built-in 'property' What I want to achieve is a class whereby I can set the property access per instance so the user can test if a property is present using hasattr(klass,'prop') such that the instance has a given capability that can easily be tested by the user. The actual get/set

Re: Looking for source preservation features in XML libs

2004-12-28 Thread and-google
Grzegorz Adam Hankiewicz <[EMAIL PROTECTED]> wrote: > I have looked at xml.minidom, elementtree and gnosis and haven't > found any such features. Are there libs providing these? pxdom (http://www.doxdesk.com/software/py/pxdom.html) has some of this, but I think it's still way off what you're envi

Re: Making pygopherd working with Mac OS X

2004-12-28 Thread mattabat
oil and flour, brown vegetables in the roux, then add chicken stock and allow to simmer for 20 minutes. Add the patties or stuffed heads, and some loose crawfish, lobster, long piglet, or what have you. Cook on low for 15 minutes, then allow it to set for at least 15 minutes more.

Re: Keyword arguments - strange behaviour?

2004-12-28 Thread Fuzzyman
Steven Bethard wrote: > Fuzzyman wrote: > > It wasn't that part of the example that I thought was over complex. > > (although it's not a 'pattern' I use often). You suggested that if we > > had dynamic evaluation of default values, you would have to replace it > > with : > > > >class foo(objec

Re: built-in 'property'

2004-12-28 Thread Stian Søiland
On 2004-12-28 12:05:20, [EMAIL PROTECTED] wrote: > class NOTOK(object): > > def __init__(self): > self.__x = 0 > self.x = property(self.getx, self.setx, self.delx, "I'm the 'x' > property.") > > def getx(self): return self.__x - 5 > def setx(self, value):

Re: Tkinter vs wxPython

2004-12-28 Thread Alejandro Weinstein
> I am especially interested in terms of learning curve, documentation, > portability across platforms Linux/Windows and anything else you care > to add. As I know only what I have read on this forum & surfing the > web I would really appreciate the input of those who have used both, > or decided t

New Meetup Group

2004-12-28 Thread Anand
This is for Python enthusiasts in the city of Bangalore, the "Silicon Valley of India". I have started a new meetup group for Python programming enthusiasts in the city. The group's home page can be accessed at http://python.meetup.com/158/ . If you are a Bangalorean and also a Python enthusiast,

Re: Are tuple really immutable?

2004-12-28 Thread Chris
Thank you. Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: More elegant way to cwd?

2004-12-28 Thread Steve Holden
Kamilche wrote: Other than using os.pardir instead of '..', and possibly adding an "os.path.abspath()" call to the last bit (or does realpath already do that? It's unclear from the docs), I can't see anything fundamental I'd do differently... except package these functions up as nice clean subrout

HELP Non-Blocking reads from sys.stdin in Windows.

2004-12-28 Thread barr
Hi I am in real need of a way to perform non blocking reads from sys.stdin on windows. I have looked every where for an answer but but with no luck. I beleive there there must be a way of doing this, can some one please help asap. Thanks in advance, Barr -- http://mail.python.org/mailman/lis

Re: Tkinter vs wxPython

2004-12-28 Thread Steve Holden
Michael McGarry wrote: Esmail Bonakdarian wrote: My post wasn't complete, sorry for the additional post: ps: this is basically the same query as posted December 10 “Re: GUIs: wxPython vs. Tkinter (and others)” by Erik Johnson which really seemed to end up comparing PyQt (?) I recommend PyQt becau

Re: HELP Non-Blocking reads from sys.stdin in Windows.

2004-12-28 Thread Paul Rubin
"barr" <[EMAIL PROTECTED]> writes: > I am in real need of a way to perform non blocking reads from sys.stdin on > windows. I have looked every where for an answer but but with no luck. I > beleive there there must be a way of doing this, can some one please help > asap. Use a separate thread. --

Re: Repainting

2004-12-28 Thread Steve Holden
LutherRevisited wrote: I have an application that uses a WxListCtrl to hold data that is updated extremely fast. When I run my application the listctrl updates so fast that it practically disappears. Is there a way I can have it update with the user seeing it update rapidly without the dissapeari

Re: DB-API format string conventions

2004-12-28 Thread Steve Holden
Craig Ringer wrote: On Tue, 2004-12-28 at 18:29, Craig Ringer wrote: Would there be any interest in releasing a DB-API 2.1 with one parameter style made MANDATORY, and a tuple of other supported styles in .paramstyles ? I think existing modules implemented in Python could be retrofitted to

ANN: GallerPy 0.6.0

2004-12-28 Thread Freddie
GallerPy is a fairly basic dynamic web gallery written in Python and uses the Python Imaging Library. It is licensed under the terms of the BSD License. Features include: * Fluid CSS layout * SCGI support * Other exciting stuff GallerPy is available for download from the MadCowDisease web sit

Re: DB-API format string conventions

2004-12-28 Thread Skip Montanaro
Craig> IMO it'd also be very nice to support **kw calling style, ie to Craig> make: Craig> cursor.execute("SELECT somerow FROM table WHERE otherrow = %(name)s", Craig>{'name': 'fred'}) Craig> equivalent to: Craig> cursor.execute("SELECT somerow FROM table

Re: DB-API format string conventions

2004-12-28 Thread Craig Ringer
On Tue, 2004-12-28 at 21:16, Steve Holden wrote: > > So ... anybody for a DB-API 2.1 with mandatory pyformat support and a > > tuple dbmodule.paramstyles for supported styles? > > Well, you can certainly put me down as supporting less variability in > allowed paramstyles, to the extent that it

Re: DB-API format string conventions

2004-12-28 Thread Dan Sommers
On Tue, 28 Dec 2004 19:08:10 +0800, Craig Ringer <[EMAIL PROTECTED]> wrote: > IMO it'd also be very nice to support **kw calling style, ie to make: > cursor.execute("SELECT somerow FROM table WHERE otherrow = %(name)s", >{'name': 'fred'}) > equivalent to: > cursor.execute("SELEC

[Fwd: Re: DB-API format string conventions]

2004-12-28 Thread Steve Holden
[posted after mailing response in error] Craig Ringer wrote: On Tue, 2004-12-28 at 21:16, Steve Holden wrote: So ... anybody for a DB-API 2.1 with mandatory pyformat support and a tuple dbmodule.paramstyles for supported styles? Well, you can certainly put me down as supporting less variability i

Q: Scheduling in scipy.cow

2004-12-28 Thread Mathias
Dear NG, can somebody tell me how the work packages are scheduled to the workers? From the code it seems to me like a a static distribution, ie each worker gets the same amount of work, not taking into account if a faster worker already finished all work packages. Thanks, Mathias PS: Is there

Re: More elegant way to cwd?

2004-12-28 Thread Georg Brandl
M.E.Farmer wrote: > Peter Hansen wrote: > [snip] >> Other than using os.pardir instead of '..', and possibly adding >> an "os.path.abspath()" call to the last bit (or does realpath >> already do that? It's unclear from the docs) > [snip] > I believe os.path.abspath and os.path.realpath are the sam

Re: More elegant way to cwd?

2004-12-28 Thread Peter Hansen
Kamilche wrote: Well... but to call it from the shared directory, I'd have to first switch to the shared directory! Which would defeat the purpose. As Steve said, plus "use PYTHONPATH or .pth files". That's exactly what they're for. Doing what you're doing as a means of getting access to regularl

Re: Execute code after death of all child processes - (corrected posting)

2004-12-28 Thread Denis S. Otkidach
On Sat, 25 Dec 2004 08:20:24 -0600 Jeff Epler <[EMAIL PROTECTED]> wrote: > Next, you'll want to wait for each process you started: > for current_text in texts: > os.waitpid(-1, 0) > print 'this is the end' This can eventually die with exception. The proper way is: try:

Re: Tkinter vs wxPython

2004-12-28 Thread Peter Hansen
Esmail Bonakdarian wrote: I will have about 2 weeks to pursue some Python related activities and would like to learn more about the graphical end of things. In that vein I would like some opinions regarding Tkinter and wxPython. This is an area where personal preference reigns strong. You really ou

Re: argument type

2004-12-28 Thread Rocco Moretti
"It's me" wrote: > No, that was just an example. I actually have additional arguments > that are similar to arg2. It's not like I can do: > > def abc(arg1, arg3, *arg2s, *arg3s, *arg4s) ... Now, what if arg2 is not a string but either a number or a bunch of numbers? Using your method, can I

Re: Looking for source preservation features in XML libs

2004-12-28 Thread Fredrik Lundh
Grzegorz Adam Hankiewicz wrote: > I'm looking for two specific features in XML libraries. One is two be > able to tell which source file line a tag starts and ends. Say, tag > is located on line 34 column 7, and the matching three > lines later on column 56. > > Another feature is to be able to

code Generator Help

2004-12-28 Thread emran . syed
Code Generators!!! I think now a days programmers should prefer Code Generator to do their coding rather than doing everything by hand. They are almost generator for every database. If you do n't have enough time write all the code by hand, invest some in code genetor and make you lifew easy.

Re: HELP Non-Blocking reads from sys.stdin in Windows.

2004-12-28 Thread barr
hi Do you mean something like the following. class inputReader(Thread): def __init__(self): Thread.__init__(self) def run(self): buffer = sys.readline() thread = inputReader() thread.start() Thanks Kwame "Paul Rubin" wrote in message ne

Re: Tkinter vs wxPython

2004-12-28 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alejandro Weinstein <[EMAIL PROTECTED]> wrote: . . . >the standard GUI for Python. I read some tutorials, but didn't go to >far, and didn't like the Tkinter looks too much. Then I tried

pygame + py2exe = bad exe. why?

2004-12-28 Thread Erik Bethke
Hello All, Thank you: First of all I want to say thank you all of you posters who have already answered dozens of my questions as I have been learning Python in my lurking & googling. Now for the first time I am stumped: Background: The setup script seems to be working, the files are all copied

Re: code Generator Help

2004-12-28 Thread Steve Holden
[EMAIL PROTECTED] wrote: Code Generators!!! I think now a days programmers should prefer Code Generator to do their coding rather than doing everything by hand. They are almost generator for every database. If you do n't have enough time write all the code by hand, invest some in code genetor a

Re: Making pygopherd working with Mac OS X

2004-12-28 Thread Cameron Kaiser
[EMAIL PROTECTED] (mattabat) writes: >I attempted to use pygopherd 2.0.9 work with MacPython 2.3 under Mac >OS X 10.3.7 but I'm afraid I hit a brick wall trying to make it run. >Does anyone know how to make this work? >I obtained pygopherd from >gopher://gopher.quux.org/1/devel/gopher/pygopherd -

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 27, 2004, at 5:01 PM, JanC wrote: IMHO this is the worst think for the Python community: you can find one Python only with an excellent support. Great But on the other hand it is possible to find plenty of GUI tools and for the beginner (and may be not just for the beginner) it is so har

Re: A Revised Rational Proposal

2004-12-28 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Nick Coghlan <[EMAIL PROTECTED]> writes: >> >>> Mike Meyer wrote: Yup. Thank you. This now reads: Regarding str() and repr() behaviour, repr() will be either ''rat

Re: argument type

2004-12-28 Thread It's me
Rocco, your comment noted. Okay, I got what I need to know for this issue. Thanks everybody for your help. I greatly appreciate it. "Rocco Moretti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "It's me" wrote: > > > No, that was just an example. I actually have additional a

Re: Are tuple really immutable?

2004-12-28 Thread Terry Reedy
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you. To who? All of us? Many have posted on this thread. With previously downloaded and read messages suppressed or deleted, quoteless messages like this are rather unclear ;-) Terry J. Reedy -- http://mail.pyth

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Paul Rubin
Ed Leafe <[EMAIL PROTECTED]> writes: > Here's the equivalent in Dabo: > > menu = dabo.ui.dMenu() > itm = menu.append("Close Window", self, self.onCloseWindow) This still seems way too complicated. Why execute a bunch of separate statements when what you're trying to set up is a single structure?

Re: Tkinter vs wxPython

2004-12-28 Thread Esmail Bonakdarian
Hi I have found ALL of the posts useful, thank you so much. Please keep them coming! I am learning a lot. I will probably play a bit with Tkinter and wxPython and see how each feels, just as Peter Hansen suggested). PyQt also looks interesting, so I will take a look at that at some point down the l

Re: Q: Scheduling in scipy.cow

2004-12-28 Thread Scott David Daniels
Mathias wrote: Dear NG, can somebody tell me how the work packages are scheduled to the workers? From the code it seems to me like a a static distribution, ie each worker gets the same amount of work, not taking into account if a faster worker already finished all work packages. Thanks, Math

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 28, 2004, at 11:57 AM, Paul Rubin wrote: This still seems way too complicated. Why execute a bunch of separate statements when what you're trying to set up is a single structure? E.g.: menu = dabo.ui.Menu(("Close Window, self.onCloseWindow), ("New Window", self.N

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Paul Rubin
Ed Leafe <[EMAIL PROTECTED]> writes: > Obviously, something like that could also be added - do you > want to help develop Dabo? We're always looking for talented people > with good ideas! Only if you want to hire me. I mostly do volunteer development only on GPL projects. If I'm writing so

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 28, 2004, at 12:22 PM, Paul Rubin wrote: Obviously, something like that could also be added - do you want to help develop Dabo? We're always looking for talented people with good ideas! Only if you want to hire me. I mostly do volunteer development only on GPL projects. If I'm writ

Re: Keyword arguments - strange behaviour?

2004-12-28 Thread Steven Bethard
Fuzzyman wrote: I see. I may be wrong on this... *but* I thought the only time when a variable defined in the same scope as a function wouldn't be available in the same namespace is when the function is a global but the variable isn't ? Sorta depends on what you mean by "available in the same names

Re: PyJuggler 1.0 Beta 1 available

2004-12-28 Thread Nicola Larosa
> Following up on the release of VR Juggler 2.0 Beta 1, I am pleased to > announce the release of PyJuggler 1.0 Beta 1. > ... > > What is PyJuggler? > -- > PyJuggler is an extension to VR Juggler I started in my spare time one > weekend in November 2002. > ... > Using PyJuggler, it

Re: built-in 'property'

2004-12-28 Thread Steven Bethard
Stian Søiland wrote: On 2004-12-28 12:05:20, [EMAIL PROTECTED] wrote: class NOTOK(object): def __init__(self): self.__x = 0 self.x = property(self.getx, self.setx, self.delx, "I'm the 'x' property.") def getx(self): return self.__x - 5 def setx(self, value): self

Re: Lambda going out of fashion

2004-12-28 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: ><[EMAIL PROTECTED]> wrote: > >> Thanks. :-) Two remarks. >> o One-liner fits the eyes & brains of a portion of people. > >True! So, personally, I'd rather code, e.g., > >def bools(lst): return map(bool, lst) > >rather than b

Reference behavior through C (was: Lambda going out of fashion)

2004-12-28 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Craig Ringer <[EMAIL PROTECTED]> wrote: . . . > IMO the reference behaviour of functions in the C API could be >clearer. One often has to simply know, or refer to the docs, to tell >whether a p

Re: built-in 'property'

2004-12-28 Thread Steven Bethard
Steven Bethard wrote: I seem to be missing some of the messages on this thread, but while we're talking about properties, it's probably instructive to remind people that the functions passed to the property function are not redefinable in subclasses: py> class D(C): ... def getx(self): ...

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Paul Rubin
Ed Leafe <[EMAIL PROTECTED]> writes: > Oh, geez. After months of us getting skewered for releasing > Dabo under GPL, with everyone saying that they wouldn't even *look* at > it for fear of 'infecting' all of their code, we change the license to > the MIT license, and now the complaint is that

Re: Python IDE

2004-12-28 Thread David JH
On the subject can somebody here who uses SPE (or just has some python knowledge) help me out with the installation process? I tried following http://spe.pycs.net/extra/manual/manual.html#windows but end up with the error: python /c/system/python24/Lib/site-packages/_spe/winInstall.py Traceb

python sane imaging

2004-12-28 Thread GMane Python
Anyone know where the python sane imaging module is? Searching google, I can't find it to download. I have a win32 & linux system -- hope to find it for both OSes. Dave -- http://mail.python.org/mailman/listinfo/python-list

consequences of not calling object.__init__?

2004-12-28 Thread Steven Bethard
So when I'm writing a class and I define an __init__ method, I sometimes haven't called object.__init__, e.g.: class C(object): def __init__(self, x): self.x = x instead of class C(object): def __init__(self, x): super(C, self).__init__()

Re: DB-API format string conventions

2004-12-28 Thread Denis S. Otkidach
On Tue, 28 Dec 2004 22:02:59 +0800 Craig Ringer <[EMAIL PROTECTED]> wrote: > I'm not actually against the number of choices available, I'm just > concerned that there is currently no _single_ choice that can be > guaranteed to work, and that it's hard to identify all styles a given > API supports.

Re: Python IDE

2004-12-28 Thread David JH
On the subject can somebody here who uses SPE (or just has some python knowledge) help me out with the installation process? I tried following http://spe.pycs.net/extra/manual/manual.html#windows but end up with the error: python /c/system/python24/Lib/site-packages/_spe/winInstall.py Traceb

Re: consequences of not calling object.__init__?

2004-12-28 Thread John Lenton
in the code that follows, instances of E haven't been through D's rigorous initiation process .class C(object): .def __init__(self): .print "C" . .class D(object): .def __init__(self): .print "D" .super(D, self).__init__() . .class E(

Re: consequences of not calling object.__init__?

2004-12-28 Thread Steve Holden
Steven Bethard wrote: So when I'm writing a class and I define an __init__ method, I sometimes haven't called object.__init__, e.g.: class C(object): def __init__(self, x): self.x = x instead of class C(object): def __init__(self, x): super(C, self)

Re: popen2, 3, 4 -- will closing all returned streams result in process termination?

2004-12-28 Thread Jean Brouwers
It depends mostly on how the spawned process handles conditions like closed pipes, EOF, etc. In general and on *nix, any spawned and terminated process will become and remain a zombie until "reaped", i.e. until the final status is collected by a calling os.waitpid(). To avoid zombies, you should

Re: consequences of not calling object.__init__?

2004-12-28 Thread Steven Bethard
John Lenton wrote: in the code that follows, instances of E haven't been through D's rigorous initiation process .class C(object): .def __init__(self): .print "C" . .class D(object): .def __init__(self): .print "D" .super(D, self).__init__

Re: consequences of not calling object.__init__?

2004-12-28 Thread Shalabh Chaturvedi
Steven Bethard wrote: So when I'm writing a class and I define an __init__ method, I sometimes haven't called object.__init__, e.g.: class C(object): def __init__(self, x): self.x = x instead of class C(object): def __init__(self, x): super(C, self)

(no subject)

2004-12-28 Thread OÄuz AylanÃ
-- http://mail.python.org/mailman/listinfo/python-list

Re: code Generator Help

2004-12-28 Thread Andrew Dalke
Steve Holden wrote: > If this isn't spam I'll eat my hat. How many other irrelevant newsgroups > has this been sent to? Headers follow for abuse tracking and retribution. More precisely, the email is from a marketer in Pakistan. http://www.pid.org.pk/resume.html Note the lack of programming exp

Re: Tkinter vs wxPython

2004-12-28 Thread F. GEIGER
"Esmail Bonakdarian" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi > > I have found ALL of the posts useful, thank you so much. > > Please keep them coming! I am learning a lot. > > I will probably play a bit with Tkinter and wxPython and see how > each feels, just as Pete

emulating python shell

2004-12-28 Thread Uwe Mayer
Hi, in an application I want to provide direct access to the python interpreter of the running program. I use rawinput() and exec() to read an input string and a self-made function to check wether the inputed block is closed and then execute it. When running python interactively the result of the

A scoping question

2004-12-28 Thread It's me
This must be another newbie gotchas. Consider the following silly code, let say I have the following in file1.py: #= import file2 global myBaseClass myBaseClass = file2.BaseClass() myBaseClass.AddChild(file2.NextClass()) #= and in file2.py, I have: #= global

Re: A scoping question

2004-12-28 Thread Premshree Pillai
On Tue, 28 Dec 2004 19:34:36 GMT, It's me <[EMAIL PROTECTED]> wrote: > This must be another newbie gotchas. > > Consider the following silly code, let say I have the following in file1.py: > > #= > import file2 > global myBaseClass > myBaseClass = file2.BaseClass() > myBaseClass.AddCh

Re: A scoping question

2004-12-28 Thread It's me
"Premshree Pillai" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 28 Dec 2004 19:34:36 GMT, It's me <[EMAIL PROTECTED]> wrote: > > This must be another newbie gotchas. > > > > Consider the following silly code, let say I have the following in file1.py: > > > > #=

Re: Repainting

2004-12-28 Thread M.E.Farmer
LutherRevisited wrote: > I have an application that uses a WxListCtrl to hold data that is updated > extremely fast. When I run my application the listctrl updates so fast that it > practically disappears. Is there a way I can have it update with the user > seeing it update rapidly without the d

Re: A scoping question

2004-12-28 Thread Premshree Pillai
On Tue, 28 Dec 2004 19:59:01 GMT, It's me <[EMAIL PROTECTED]> wrote: > > "Premshree Pillai" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Tue, 28 Dec 2004 19:34:36 GMT, It's me <[EMAIL PROTECTED]> wrote: > > > This must be another newbie gotchas. > > > > > > Consider the fol

Re: ANN: IPython 0.6.5 is out

2004-12-28 Thread Dan Christensen
Fernando Perez <[EMAIL PROTECTED]> writes: > * Added ipython.el to the end-user distribution, for (X)Emacs support, since > now the official python-mode.el from > > http://sourceforge.net/projects/python-mode > > has all the necessary fixes for ipython support (in CVS at this moment). I've never

Re: A scoping question

2004-12-28 Thread Steven Bethard
It's me wrote: This must be another newbie gotchas. Consider the following silly code, let say I have the following in file1.py: #= import file2 global myBaseClass myBaseClass = file2.BaseClass() myBaseClass.AddChild(file2.NextClass()) #= and in file2.py, I have: #==

Re: A scoping question

2004-12-28 Thread Steven Bethard
It's me wrote: This must be another newbie gotchas. Consider the following silly code [snip tightly coupled code] A few options that also might work better than such tightly coupled modules: file1.py import file2 myBaseClass = file2.BaseClass() class NextCl

Re: A scoping question

2004-12-28 Thread It's me
Thanks, Steve. So, global is only to within a module (I was afraid of that). Those words flashed by me when I was reading it but since the word "module" didn't translate to "file" in my C mind, I didn't catch that. In that case, you are correct that I have to do an import of file1 in file2. Not

Re: pygame + py2exe = bad exe. why?

2004-12-28 Thread M.E.Farmer
Hello Erik, Have you ever seen pygame2exe.py? It is a py2exe script for pygame. I found this on my hard drive from last year. I have never created an exe from pygame using this script , so it might be useless ;) Do a search might be updated by now.can not remember where I got it from ( maybe py

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 28, 2004, at 1:16 PM, Paul Rubin wrote: Well, those are commercial developers who are afraid of the GPL. No, they were several members of the Python community. I disagreed with their interpretation of the GPL, but the fact remains that it was a major stumbling block to getting others invo

Re: python sane imaging

2004-12-28 Thread Fredrik Lundh
"GMane Python" <[EMAIL PROTECTED]> wrote: > Anyone know where the python sane imaging module is? Searching google, I > can't find it to download. I have a win32 & linux system -- hope to find > it for both OSes. it's included in the PIL distribution: http://effbot.org/downloads/#Imaging

Re: HELP Non-Blocking reads from sys.stdin in Windows.

2004-12-28 Thread Miki Tebeka
Hello Barr, > I am in real need of a way to perform non blocking reads from sys.stdin on > windows. I have looked every where for an answer but but with no luck. I > beleive there there must be a way of doing this, can some one please help > asap. Warning: The below code wasn't tested at all...

naming conventions (WAS: A scoping question)

2004-12-28 Thread Steven Bethard
It's me wrote: #= import file2 global myBaseClass myBaseClass = file2.BaseClass() myBaseClass.AddChild(file2.NextClass()) #= [snip] #= global myBaseClass class BaseClass: def __init__(self): self.MyChilds = [] ... def AddChild(NewChild):

Re: Tkinter vs wxPython

2004-12-28 Thread Jarek Zgoda
Cameron Laird wrote: IMO, wxPython has a softert learning curve (specially if you use wxGlade), is portable between unix/windows/mac, with the advantage over Tkinter that it has a native look. Regarding documentation, . While people seem to mean a range of different thing

install questions

2004-12-28 Thread A Chan
Hi, All, I'm new in Python. I just install ActivePython 2.4 on my PC and also install SOAPpy-0.11.6.zip, soapy-0.1.win32.exe. When I run the following script, I got no module named SOAPpy. Am I missing any modules? Thanks Angela error message: Tr

Re: install questions

2004-12-28 Thread Premshree Pillai
Umm, the file is called soap.py, so when you import you'll have to do a: import soap On Tue, 28 Dec 2004 13:09:48 -0800 (PST), A Chan <[EMAIL PROTECTED]> wrote: > Hi, All, > > I'm new in Python. I just install ActivePython 2.4 on > my PC and also install SOAPpy-0.11.6.zip, > soapy-0.1.win32.exe

Re: Reference behavior through C (was: Lambda going out of fashion)

2004-12-28 Thread Craig Ringer
On Wed, 2004-12-29 at 02:08, Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Craig Ringer <[EMAIL PROTECTED]> wrote: > . > . > . > > IMO the reference behaviour of functions in the C API could be > >clearer. [snip]

RE: built-in 'property'

2004-12-28 Thread Bob . Cowdery
Title: RE: built-in 'property' Thanks to everyone that has helped on this. What I am trying to do is create a capability based api that I can build to order. This is as far as I get at the moment. Each of the first three classes represents some function I can do to a radio, there would be man

Re: Mutable objects which define __hash__ (was Re: Why are tuples immutable?)

2004-12-28 Thread Bengt Richter
On Sun, 26 Dec 2004 12:17:42 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> I take it you are referring to regular python dictionaries, > >Correct. So I'll skip over the sections talking about alternate lookup >strategies in my reply. Cool. > >>>Anyway, what are the conse

Re: objects as mutable dictionary keys

2004-12-28 Thread Peter Maas
Peter Maas schrieb: There was a huge and sometimes heated debate about tuples, lists and dictionaries recently, and the mainstream opinion was that dictionary keys must not be mutable, so lists are not allowed as dictionary keys. Warning, long posting (~ 100 lines) The existence of lists and tuples

Problems installing MySQLdb on Windows [newbie]

2004-12-28 Thread Alex Meier
hi, all! this is my first contact with python, I installed python 2.4 (on Win2k) and unzipped the MySQLdb package "MySQL-Python 1.0.0 for win32" into Lib/site-packages. However, when I try to import the MySQLdb package, I am faced with the error message "DLL load failed", in more detail: >>>

Re: argument type

2004-12-28 Thread Roy Smith
"It's me" <[EMAIL PROTECTED]> wrote: > How can I tell from within a function whether a particular argument is a > sigular type, or a complex type? > ... > In C++, you would do it with function overloading. If arg1 is always simple > type, I wouldn't care what it is. But what if I *do* need to kno

Re: objects as mutable dictionary keys

2004-12-28 Thread John Roth
I think that's a good summary. The condensed version is that the results of both __hash__() and __cmp__() have to remain stable for dicts to work as one would expect. __cmp__ doesn't do that for lists, and it isn't defined by default for user objects. John Roth "Peter Maas" <[EMAIL PROTECTED]> wrot

Re: Problems installing MySQLdb on Windows [newbie]

2004-12-28 Thread Steve Holden
Alex Meier wrote: hi, all! this is my first contact with python, I installed python 2.4 (on Win2k) and unzipped the MySQLdb package "MySQL-Python 1.0.0 for win32" into Lib/site-packages. However, when I try to import the MySQLdb package, I am faced with the error message "DLL load failed", in

Re: objects as mutable dictionary keys

2004-12-28 Thread Steven Bethard
Peter Maas wrote: Peter Maas schrieb: There was a huge and sometimes heated debate about tuples, lists and dictionaries recently, and the mainstream opinion was that dictionary keys must not be mutable, so lists are not allowed as dictionary keys. Warning, long posting (~ 100 lines) [snip summary]

  1   2   >