Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-28 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Tuples are defined with regards to parentheses ()'s as everyone knows. Well, then, "everyone knows" wrong: x = 1, 2, 3 x is a tuple. The _commas_ make it one -- parentheses don't matter. An _empty_ tuple uses parentheses, (), as there's nowhere t

Re: Other notes

2004-12-28 Thread Andrew Dalke
Paul Rubin wrote: > ".." just becomes an operator like + or whatever, which you can define > in your class definition: > > class MyClass: >def __dotdot__(self, other): > return xrange(self.whatsit(), other.whatsit()) > > The .. operation is required to return an iterator. A

Re: Python on Linux

2004-12-28 Thread Tim Roberts
"Austin" <[EMAIL PROTECTED]> wrote: > >On Red Hat 9, Python is installed by default and it's version is 2.2.2 >If I want to upgrade Python to 2.3.4(newer version), how could I do? >If I compile source code of Python, how do I uninstall the old version? You don't want to uninstall the old version.

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-28 Thread Marius Bernklev
* [EMAIL PROTECTED] > Perhaps ()'s are a good idea for some other reason I don't know? One-element tuples are written as (4,). -- Marius Bernklev http://www.ping.uio.no/~mariube/ > -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-28 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: Wouldn't it have been better to define tuples with <>'s or {}'s or something else to avoid this confusion?? The way I see it, tuples are just a way of having a function return multiple values at once. When you think of them that way, you don't even need parenthesis: def

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-28 Thread Hans Nowak
[EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. This causes confusion for 1 item tuples since (5) can be interpreted as a tuple OR as the number 5 in a mathematical expression such as x = (5) * (4+6). No, (5) is always the number 5. To make a one-ele

Re: Using python to deploy software

2004-12-28 Thread Anand
I haven't but one of my friends have used Pyro (Python Remote Objects) to do so. You basically need to write a custom Pyro server and run it on a central machine. Your pyro clients can be installed on the machines where the software need to be installed. For more details and similar ideas refer t

Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-28 Thread [EMAIL PROTECTED]
Tuples are defined with regards to parentheses ()'s as everyone knows. This causes confusion for 1 item tuples since (5) can be interpreted as a tuple OR as the number 5 in a mathematical expression such as x = (5) * (4+6). Wouldn't it have been better to define tuples with <>'s or {}'s or someth

Re: getattr() woes

2004-12-28 Thread David M. Cooke
[EMAIL PROTECTED] (Aahz) writes: > In article <[EMAIL PROTECTED]>, > Thomas Rast <[EMAIL PROTECTED]> wrote: >> >>class dispatcher: >># ... >>def __getattr__(self, attr): >>return getattr(self.socket, attr) >> > import asyncore > class Peer(asyncore.dispatcher): >>... d

Re: Other notes

2004-12-28 Thread Steven Bethard
Andrew Dalke wrote: I must say it's getting pretty annoying to say things like "when would this be useful?" and "have you read the documentation?" for your statements. I'll second that. Please, "Bearophile", do us the courtesy of checking (1) Google groups archive of the mailing list: http://group

Using python to deploy software

2004-12-28 Thread secun
Has anyone used python to deploy (non-python) software on a Windows network? -- http://mail.python.org/mailman/listinfo/python-list

Re: Other notes

2004-12-28 Thread Steven Bethard
[EMAIL PROTECTED] wrote: 4) The printf-style formatting is powerful, but I still think it's quite complex for usual purposes, and I usually have to look its syntax in the docs. I think the Pascal syntax is nice and simpler to remember (especially for someone with a little Pascal/Delphi experience ^

Re: Other notes

2004-12-28 Thread Paul Rubin
Andrew Dalke <[EMAIL PROTECTED]> writes: > What does > a = MyClass() > b = AnotherClass() > for x in a .. b: > print x > > do? That is, what's the generic protocol? ".." just becomes an operator like + or whatever, which you can define in your class definition: class MyClass:

Re: Other notes

2004-12-28 Thread Andrew Dalke
bearophileHUGS: [on Python's O(n) list insertion/deletion) at any place other than tail > (My hypothesis: to keep list implementation a bit simpler, to avoid > wasting memory for the head buffer, and to keep them a little faster, > avoiding the use of the skip index S). Add its relative infrequent

Re: getattr() woes

2004-12-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Thomas Rast <[EMAIL PROTECTED]> wrote: > >I've found out about a fundamental problem of attribute lookup, the >hard way. Maybe. >asyncore.py uses the following code: > >class dispatcher: ># ... >def __getattr__(self, attr): >return getattr(self.soc

Re: pyUnitPerf

2004-12-28 Thread Mike Thompson
Roy Smith wrote: "Grig" <[EMAIL PROTECTED]> wrote: "Problem with porting patterns/api's from java straight to python is that most of the outcome feels unpythonic. I'll not go about my own feelings python vs. java here now, but I just want to point out that there's already a rather large core of har

Re: consequences of not calling object.__init__?

2004-12-28 Thread Jorge Luiz Godoy Filho
Peter Hansen, Quarta 29 Dezembro 2004 01:04, wrote: > Maybe there's no such pronouncement, but unless there is a > clear statement somewhere (and I believe I've missed it, if > there is) that reads "one should *always* call __init__ on the > superclass even if one is just subclassing object and no

Re: Other notes

2004-12-28 Thread Doug Holton
[EMAIL PROTECTED] wrote: for i in 1..12: pass for c in "a".."z": pass > @infix > def interval(x, y): return range(x, y+1) # 2 parameters needed > assert 5 interval 9 == interval(5,9) > 10) There can be something in the middle between the def statement and > the lambda. These will likely n

Re: consequences of not calling object.__init__?

2004-12-28 Thread Peter Hansen
Steve Holden wrote: The principal one that I can see is that you are relying on this implementation feature to maintain forward compatibility, since I'm not aware of any pronouncement that says "object will *always* have a dummy __init__". Maybe there's no such pronouncement, but unless there is

Re: pyUnitPerf

2004-12-28 Thread Roy Smith
"Grig" <[EMAIL PROTECTED]> wrote: > "Problem with porting patterns/api's from java straight to python is > that most of the outcome feels unpythonic. I'll not go about my own > feelings python vs. java here now, but I just want to point out that > there's already a rather large core of hard-python

Re: More elegant way to cwd?

2004-12-28 Thread Peter Hansen
Kamilche wrote: For "library" modules there are already other and more elegant means. Well, I want to make a script execute without error regardless of where the current working directory is, and without having to make the user modify their PYTHONPATH variable or install something in site-package

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 28, 2004, at 9:04 PM, Luke Skywalker wrote: Interesting discussion. I haven't looked at Dabo yet, but the issues that must be solved before Python is a valid alternative to proprietary solutions like Delphi or VB are: - speed where it matters (ie. no 20s load time) Load what? The app, or th

pyUnitPerf

2004-12-28 Thread Grig
I just released a Python port of Mike Clark's JUnitPerf. I called it pyUnitPerf and it's available at http://sourceforge.net/projects/pyunitperf. It is in a very early stage of development, but I think it's pretty usable (and useful) as it is. I already received an interesting comment from a hard-

Other notes

2004-12-28 Thread bearophileHUGS
Here are some questions and suggestions of mine that I've collected in the last weeks on the language (please note that some (most?) of them are probably wrong/useless/silly, but I've seen that such notes help me understand a lot of things and to find my weak spots.) 1) I've seen that list pop/app

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Luke Skywalker
On Tue, 28 Dec 2004 20:06:57 -0500, Ed Leafe <[EMAIL PROTECTED]> wrote: >That's where Paul and I came from, and that was our initial motivation >for deciding to develop Dabo - there wasn't a Python tool out there >that could even begin to approach what we were used to with VFP. Interesting discu

getattr() woes

2004-12-28 Thread Thomas Rast
Hello I've found out about a fundamental problem of attribute lookup, the hard way. asyncore.py uses the following code: class dispatcher: # ... def __getattr__(self, attr): return getattr(self.socket, attr) Now suppose that I'm asking for some attribute not provided by dispatch

Re: Tkinter vs wxPython

2004-12-28 Thread M.E.Farmer
I have to agree with F. Gieger learning to code a framework by hand only helps you. Sure wxGlade/Boa/etc can help speed design and layout up, but what happens when you want to do non standard things or just get stuck because some thing just isn't working. Check recent threads .All the newbies n

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread Ed Leafe
On Dec 28, 2004, at 5:52 PM, JanC wrote: But even then, if DaBo ever becomes as easy to use as Delphi/VB for this type of applications, while remaining cross-platform, that might easily double the number of Python developers. ;-) Well, there are at least a half-million Visual FoxPro developers w

Re: Tkinter vs wxPython

2004-12-28 Thread Michael McGarry
Definitely look at PyQt. It was the GUI framework I chose when going through the same process 3 weeks ago. I have to disagree with F.Geiger (sorry, F.Geiger), I think a GUI builder is a necessity. It saves you a lot of time. The alternative is to keep changing your code until your GUI looks as

Re: More elegant way to cwd?

2004-12-28 Thread Kamilche
For "library" modules there are already other and more elegant means. -Peter Well, I want to make a script execute without error regardless of where the current working directory is, and without having to make the user modify their PYTHONPATH variable or install something in site-packages. Is th

Re: Convert all images to JPEG

2004-12-28 Thread Leif K-Brooks
Thomas wrote: im = Image.open(srcImage) # might be png, gif etc, for instance test1.png im.thumbnail(size, Image.ANTIALIAS) # size is 640x480 im.save(targetName, "JPEG") # targetname is test1.jpg produces an exception. Any clues? The problem is that test1.png is a paletted image, and JPEGs can only

Re: Q: Scheduling in scipy.cow

2004-12-28 Thread Fernando Perez
Scott David Daniels wrote: > 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 alrea

Re: Problems installing MySQLdb on Windows [newbie]

2004-12-28 Thread Alex Meier
[EMAIL PROTECTED] says... > (1) RTFHomePage (FIRST SENTENCE): > """MySQL versions 3.22, 3.23 and 4.0; and Python versions 1.5.2-2.3 are > supported. """ I have to admit I took a chance because the error message led me to thinking it was a simple path problem or the like, not a version problem.

Re: list addition methods compared.

2004-12-28 Thread Ishwor
On Mon, 27 Dec 2004 18:49:14 +0100, François Granger <[EMAIL PROTECTED]> wrote: > Le 27/12/04 1:03, « Ishwor » <[EMAIL PROTECTED]> a écrit : > > > so indeed method 2 (l2.extend() ) is the fastest ?? In 2/3 times, > > method 3 (l3 += [x] seems faster than method 1/2 in my P2.4GHZ machine > > with 5

Re: Problems installing MySQLdb on Windows [newbie]

2004-12-28 Thread Alex Meier
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > http://pydish.holdenweb.com/pwp/MySQL-python.exe-1.0.0.win32-py2.4.exe > > That's a ready-to-go no-compilation-required installer for Windows > Python 2.4, and will get you going straight away. Thanx a lot, Steve! This worked without a h

Convert all images to JPEG

2004-12-28 Thread Thomas
Hi, I got a bunch of different images of different types ( bmp, gif, png, tiff etc ) and I want to convert them all to JPEGs using PIL. Is this possible? When I try I get all sorts of errors, doing something like : im = Image.open(srcImage) # might be png, gif etc, for instance test1.png im.thumb

ImportError and jythonc

2004-12-28 Thread Henri Sivonen
I have a Jython script that uses Java classes and runs fine using jython. It also compiles using jythonc. However, when I try to run the compiled program with the same CLASSPATH, I get an ImportError upon first Java import. How can I fix this? -- Henri Sivonen [EMAIL PROTECTED] http://iki.fi/

Re: emulating python shell

2004-12-28 Thread Fernando Perez
Uwe Mayer wrote: > 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 pyth

Re: Problems installing MySQLdb on Windows [newbie]

2004-12-28 Thread John Machin
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

Re: ANN: IPython 0.6.5 is out

2004-12-28 Thread Fernando Perez
Dan Christensen wrote: > 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

Re: argument type

2004-12-28 Thread Steven Bethard
Doug Holton wrote: It's me wrote: The argument I wish to pass is either one string, or a list of strings, or a tuple of strings. def seq(x): if hasattr(x,"__iter__"): return x else: return (x,) def abc(arg1, arg2, arg3): for item in seq(arg2): print item

Re: Best GUI for small-scale accounting app?

2004-12-28 Thread JanC
Ed Leafe schreef: >> I think the field of GUI frameworks / tools for Python is fragmented >> because it's fragmented outside of Python too... > > I think that the reason things are fragmented in this field is that > none of the tools are simple enough to learn. Even on Windows, where sever

Re: argument type

2004-12-28 Thread Doug Holton
It's me wrote: The argument I wish to pass is either one string, or a list of strings, or a tuple of strings. For instance, I have: def abc(arg1, arg2, arg3) Let say that I expect arg1 and arg3 to be a number, and arg2 can be either one string, or a bunch of strings and I need to do something o

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]

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 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: 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

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: 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

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: 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: 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: 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

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: 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

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: 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...

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: 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: 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: 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: 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 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: 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 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: 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 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: 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

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

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

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

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

(no subject)

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

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)

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: 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 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: 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: 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: 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.

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__()

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

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: 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: 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): ...

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: 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

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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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

  1   2   >