Re: dream hardware

2008-02-12 Thread Steven D'Aprano
On Tue, 12 Feb 2008 10:05:59 -0800, castironpi wrote: > What is dream hardware for the Python interpreter? I'm not sure that the Python interpreter actually does dream, but if it's anything like me, it's probably a giant computer the size of a bus, made out of broccoli and oven-roasted garlic,

Re: How to access object attributes given a string

2008-02-12 Thread Steve Holden
Santiago Romero wrote: > Hi... > > I'm trying to guess how to access attributes of an existing object > given the attribute name in a string. I mean: > > class Object: > self.x = 12 > self.y = 20 > self.name = "blah" > > def ChangeAttribute( object, attribute, value ): > # Insert

IDLE Won't Start w/o Socket Error--Win XP

2008-02-12 Thread W. Watson
After simply trying to write a program with help(MakeQTE), a module, and having it fail with socket errors, I decided to restart IDLE, thinking I knew the cause. I'm now getting msgs like: "IDLE's subprocess didn't make connection. ... firewall may be blocking the connection." I doubt the FW co

Re: Combinatorics

2008-02-12 Thread bearophileHUGS
Cameron Laird: > It does occur to me, though, that even more widely applicable > than the combinatorics module of Mathematica (if only because of > its licensing) might be such resources as What I was trying to say is that that Mathematica combinatorics module contains lots and lots and lots of th

call 'the following function' using decorators

2008-02-12 Thread castironpi
I assert it's easier to write: start_new_thread( this_func ) def thrA(): normal_suite() than def thrA(): normal_suite() start_new_thread( thrA ) If you don't, stop reading. If you do, accomplish it like this: @decwrap( start_new_thread, Link, ( 2, 3 ) ) def anonfunc( a, b ): p

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Grant Edwards
On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Forgive the cliché, but there's already too much road rage on the > information superhighway. I've had limited access to Usenet for the > last couple of years, and coming back, I find myself shocked at how many > people seem to be mean an

Re: How to add registry on remote machine

2008-02-12 Thread Gabriel Genellina
En Tue, 12 Feb 2008 14:56:09 -0200, Praveena Boppudi (c) <[EMAIL PROTECTED]> escribi�: > Hi, > Can anyone please tell me how to add registry on remote windows machine > programmatically Using the RegConnectRegistry Windows API function http://msdn2.microsoft.com/en-us/library/ms724840.aspx Fro

How to add registry on remote machine

2008-02-12 Thread Praveena Boppudi (c)
Hi, Can anyone please tell me how to add registry on remote windows machine programmatically Thanks, Praveena. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python equivt of __FILE__ and __LINE__

2008-02-12 Thread Jeff Schwab
alain wrote: > On Feb 11, 10:58 am, "Bill Davy" <[EMAIL PROTECTED]> wrote: >> Writing a quick and dirty assembler and want to give the user the location >> of an error. The "assembly language" is Python. If the user wants to >> generat some object code they write something like: >> >> Label(Loop

Re: ways to declare empty set variable

2008-02-12 Thread Ben Finney
[EMAIL PROTECTED] writes: > For Python 3.0 I'd like {} for the empty set and {:} for the empty > dict, but that idea was refused time ago, probably for some mental > backward compatibility. I agree with not breaking that backward compatibility; it seems wanton. > Missing that, I think dict() and

Re: Combinatorics

2008-02-12 Thread Jaap Spies
Robert Dodier wrote: > Cameron Laird wrote: > >> Should combinatorics be part of the standard library? That's >> an aesthetic-pragmatic question I don't feel competent to >> answer; I look to timbot and Guido and so on for judgment there. >> It does occur to me, though, that even more widely appl

Re: dream hardware

2008-02-12 Thread Bjoern Schliessmann
Jeff Schwab wrote: > The only "dream hardware" I know of is the human brain. Nah. Too few storage capacity, and too slow and error-prone at simple calculations. The few special but very advanced features are all hard-wired to custom hardware, it's a real nightmare interfacing with it. Regards,

IDLE: Clearing Breakpoints and Find with Help

2008-02-12 Thread W. Watson
How does one clear all breakpoints or even list where they are? When looking at the source code, is it possible to tell which line number is used for a statement. When I bring up the Help--Python Docs, the link to how-to is broken. Release 2.4.4. -- Wayne Watson (Neva

Re: call 'the following function' using decorators

2008-02-12 Thread castironpi
On Feb 12, 12:05 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 12 Feb 2008 15:20:32 -0200, <[EMAIL PROTECTED]> escribi�: > > > > > > > I assert it's easier to write: > > > start_new_thread( this_func ) > > def thrA(): > >     normal_suite() > > > than > > > def thrA(): > >     normal

Re: Double underscore names

2008-02-12 Thread Erik Max Francis
Ben Finney wrote: > The double-underscore convention seems more for attributes *that are > interpreted specially*, e.g. by syntax operators or other core > language features. I would qualify that by adding that it's for attributes that are treated specially _and when you don't want to overload o

Re: classobj() question

2008-02-12 Thread Gabriel Genellina
En Tue, 12 Feb 2008 13:09:21 -0200, Roland Hedberg <[EMAIL PROTECTED]> escribi�: > I've made an extremely simple program to try to show what I mean and > what I expected. It's attached to this mail. The newsgroup doesn't allow for attachments. Ensure that the code is small and post it inline.

Re: Combinatorics

2008-02-12 Thread Robert Dodier
Cameron Laird wrote: > Should combinatorics be part of the standard library? That's > an aesthetic-pragmatic question I don't feel competent to > answer; I look to timbot and Guido and so on for judgment there. > It does occur to me, though, that even more widely applicable > than the combinatori

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Jeroen Ruigrok van der Werven
-On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: >Note that Google will give a calculator result for "1 kilogram in >pounds", but not for "1 kilogram in inches". I wonder why not? After >all, both are conversions of incompatible measurements, ie, they &

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
greg wrote: > Erik Max Francis wrote: >> My point was, and still is, that if this question without further >> context is posed to a generally educated laymen, the supposedly wrong >> answer that was given is actually _correct_. > > Except that they probably don't understand exactly how and > wh

Re: AttributeError: 'module' object has no attribute 'letters'

2008-02-12 Thread black_13
On Feb 11, 5:33 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Feb 12, 9:24 am,black_13<[EMAIL PROTECTED]> wrote: > > > > > > > what does this error mean? > > i am trying to use mark hammonds win32 package. > > > Traceback (most recent call last): > >   File "aui2.py", line 11, in > >     import

Re: Free Certifications from www.Brainbeez.com

2008-02-12 Thread btox
Ria escreveu: > Hi, > > www.brainbeez.com is offering free certifications on various IT > and NON-IT subjects like Aptitude, English, C, C++, JAVA, ORACLE, > FINANCE, MARKETING ETC., > > Do visit www.brainbeez.com and get certified for free instantly. > Certificate is directly send to your

Re: Combinatorics

2008-02-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Michael Robertson: >> I'm guessing sage has this, but shouldn't something like this be part of >> the standard library (perhaps in C)? > >My answer is positive. As a reference point you can look at the >combinatorics module of Mathematica

classobj() question

2008-02-12 Thread Roland Hedberg
Hi! I'm in the position that I have a bunch of classes defined before hand and then in some special circumstances I need to dynamically create a class that has a number of the static classes as parents. So I thought I could use classobj() from the new module, it seem exactly what I wanted. But,

RE: CSV Reader

2008-02-12 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Mike P > Sent: Tuesday, February 12, 2008 5:37 AM > To: python-list@python.org > Subject: Re: CSV Reader > > just saw i needed to change record.startswith to row.startswith > but i get hte follo

Re: CSV Reader

2008-02-12 Thread Gabriel Genellina
En Tue, 12 Feb 2008 08:37:13 -0200, Mike P <[EMAIL PROTECTED]> escribi�: > just saw i needed to change record.startswith to row.startswith > but i get hte following traceback error > > Traceback (most recent call last): > File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework > \scriptu

Re: ways to declare empty set variable

2008-02-12 Thread Sun
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Feb 12, 3:45 pm, "Sun" <[EMAIL PROTECTED]> wrote: >> Maybe this is a very primative question, but I just get a bit confused >> about >> 'set' and 'Set' module in python. >> >> I understand 'set' is a build in type in python

Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-12 Thread ibloom
On Feb 11, 9:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 11 Feb 2008 21:57:00 -0200, ibloom <[EMAIL PROTECTED]> escribió: > > > My main problem is, I don't know where to find the file: > >   File "", line 628 > > > As in I don't know what code it is refering to by ?? > > It isn

Re: ways to declare empty set variable

2008-02-12 Thread Marc 'BlackJack' Rintsch
On Tue, 12 Feb 2008 14:45:43 +0100, Sun wrote: > then the question is how can I declare a empty set variable as a 'var= []' > do to a list variable? You don't declare variables in Python. Just create an instance of `set` and bind it to a name: var = set() Ciao, Marc 'BlackJack' Rintsc

Re: CSV Reader

2008-02-12 Thread Mike P
Hi Chris that's exactley what i wanted to do, Many thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Double underscore names

2008-02-12 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > having the ability to create a protocol is a Very Good Thing, and > double leading and trailing underscore names are the accepted Python > style for such special methods. Is it? There are many protocols that use plain names. Even the built-in types su

Re: How to access object attributes given a string

2008-02-12 Thread Santiago Romero
> > def ChangeAttribute( object, attribute, value ): >help(setattr) > > Help on built-in function setattr in module __builtin__: > > setattr(...) setattr(object, name, value) > > Set a named attribute on an object; setattr(x, 'y', v) is > equivalent to`x.y = v''. and > Gary Herron write: > Yo

Memory usage problems with imports and python

2008-02-12 Thread arobinson
I am a developer relatively new to python and brand new to pygtk development. I wanted to write a bloglines tray icon notifier for my linux box. Everything is working quite well functionality wise, but the memory footprint is horrible. This little tray icon that simply has a thread for updates, a

Re: classobj() question

2008-02-12 Thread Peter Otten
Roland Hedberg wrote: > I'm in the position that I have a bunch of classes defined before hand > and then in some special circumstances I need to dynamically create a > class that has a number of the static classes as parents. > > So I thought I could use classobj() from the new module, it seem e

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Steve Holden
Dennis Lee Bieber wrote: > On Tue, 12 Feb 2008 00:18:38 -0800, Erik Max Francis <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> equivalence for everyday usage and make no requirement of using the >> "proper" units for mass (kg) vs. weight (N) for, say, buying things at >

ways to declare empty set variable

2008-02-12 Thread Sun
Maybe this is a very primative question, but I just get a bit confused about 'set' and 'Set' module in python. I understand 'set' is a build in type in python after 2.4(or 2.3) and Set a seperate module, anyhow, I gonna use build in 'set'. then the question is how can I declare a empty set vari

Re: CSV Reader

2008-02-12 Thread Mike P
I was just trying to do it with the CSV module -- http://mail.python.org/mailman/listinfo/python-list

2to3.py download

2008-02-12 Thread Robin Becker
Can anyone say how to go about obtaining 2to3.py the Python-3.0 conversion utility? There is a copy in the 3.0a2 Tools folder, but it lacks some of the sub folders. I tried various svn ls commands, but couldn't locate the actual repository. -- Robin Becker -- http://mail.python.org/mailman/l

Re: Recursive generator

2008-02-12 Thread Ben C
On 2008-02-12, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Feb 12, 11:15 am, Ben C <[EMAIL PROTECTED]> wrote: >> Suppose I have an object containing an array called children. I can >> therefore build a tree out of such objects. >> The best I came up with so far is : >> >>     def genDescendents(sel

Re: Python equivt of __FILE__ and __LINE__

2008-02-12 Thread Bill Davy
"thebjorn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Feb 11, 4:55 pm, Gary Herron <[EMAIL PROTECTED]> wrote: >> Bill Davy wrote: >> > Writing a quick and dirty assembler and want to give the user the >> > location >> > of an error. The "assembly language" is Python. If th

Re: Combinatorics

2008-02-12 Thread Steven D'Aprano
On Tue, 12 Feb 2008 10:38:53 +0100, pataphor wrote: > On Mon, 11 Feb 2008 23:52:31 -0800 > Michael Robertson <[EMAIL PROTECTED]> wrote: > >> Am I wishing on a star? > > for i in xrange(10**10): > print i > OverflowError: long int too large to convert to int > > The problem seems to be that

Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-12 Thread Gabriel Genellina
En Tue, 12 Feb 2008 22:57:01 -0200, ibloom <[EMAIL PROTECTED]> escribi�: > On Feb 11, 9:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> >> >> : inconsistent use of tabs and spaces in indentation >> >> Traceback (most recent call last): >> >>   File "/Library/Frameworks/Python.framework/

Re: CSV Reader

2008-02-12 Thread Chris
On Feb 12, 12:21 pm, Mike P <[EMAIL PROTECTED]> wrote: > I did just try to post, but it doesn't look like it has appeared? > > I've used your advice Andrew and tried to use the CSV module, but now > it doesn't seem to pick up the startswith command? > Is this because of the way the CSV module is re

MESSAGE NOT DELIVERED: Mail Delivery (failure [EMAIL PROTECTED])

2008-02-12 Thread listas
Your message could not be delivered. The User is out of space. Please try to send your message again at a later time. -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV Reader

2008-02-12 Thread Mike P
just saw i needed to change record.startswith to row.startswith but i get hte following traceback error Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework \scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "Y:\te

Recursive generator

2008-02-12 Thread Ben C
Suppose I have an object containing an array called children. I can therefore build a tree out of such objects. I thought it might be useful to have a descendent generator, so I could write: for thing in self.genDescendents(): foo(thing) expecting foo to be called for each descendent

Re: Recursive generator

2008-02-12 Thread Paul Hankin
On Feb 12, 11:15 am, Ben C <[EMAIL PROTECTED]> wrote: > Suppose I have an object containing an array called children. I can > therefore build a tree out of such objects. > The best I came up with so far is : > >     def genDescendents(self): >         for child in self.children: >             yield

Re: 2to3.py download

2008-02-12 Thread Guilherme Polo
2008/2/12, Robin Becker <[EMAIL PROTECTED]>: > Can anyone say how to go about obtaining 2to3.py the Python-3.0 conversion > utility? There is a copy in the 3.0a2 Tools folder, but it lacks some of the > sub > folders. I tried various svn ls commands, but couldn't locate the actual > repository.

Free Certifications from www.Brainbeez.com

2008-02-12 Thread Ria
Hi, www.brainbeez.com is offering free certifications on various IT and NON-IT subjects like Aptitude, English, C, C++, JAVA, ORACLE, FINANCE, MARKETING ETC., Do visit www.brainbeez.com and get certified for free instantly. Certificate is directly send to your email account once you qualify

Re: ways to declare empty set variable

2008-02-12 Thread Chris
On Feb 12, 3:45 pm, "Sun" <[EMAIL PROTECTED]> wrote: > Maybe this is a very primative question, but I just get a bit confused about > 'set' and 'Set' module in python. > > I understand 'set' is a build in type in python after 2.4(or 2.3) and Set a > seperate module, anyhow, I gonna use build in 'se

Dynamic method parameter access?

2008-02-12 Thread Dennis Kempin
Hello, I have a set of some objects. With these objects I want to call a Python method. But the writer of the method shall have the option to select from these objects as method parameter. At the moment i use the following way to call a method with the a or b or both parameter. try: meth

Re: ways to declare empty set variable

2008-02-12 Thread Ben Finney
"Sun" <[EMAIL PROTECTED]> writes: > I was wondering why can't I use a format as "var = {} " to > "var=list()" in set variable, and decided not to bother with it. Python 3.0 will gain syntax to specify a literal of type 'set' http://www.python.org/dev/peps/pep-3100/>:: >>> {17, "foo", 12.5}

Re: dream hardware

2008-02-12 Thread Jeff Schwab
Steven D'Aprano wrote: > On Tue, 12 Feb 2008 10:05:59 -0800, castironpi wrote: > >> What is dream hardware for the Python interpreter? > > I'm not sure that the Python interpreter actually does dream, but if it's > anything like me, it's probably a giant computer the size of a bus, made > out o

Recommended data structure/ implementation

2008-02-12 Thread Mike D
I have a simple requirement: A user belongs to groups and groups contain items. Based on user/group I want to display items. Based on user I want to display groups. What would be the best method of implementing this? A dictionary of objects? I'd usually just use a database but I feel it's quite

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-12 Thread Erik Max Francis
Jeroen Ruigrok van der Werven wrote: > -On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: >> Note that Google will give a calculator result for "1 kilogram in >> pounds", but not for "1 kilogram in inches". I wonder why not? After >>

Re: Difficulty with "inconsistent use of tabs and spaces in indentation" in file called

2008-02-12 Thread Gabriel Genellina
En Wed, 13 Feb 2008 03:01:31 -0200, greg <[EMAIL PROTECTED]> escribi�: > ibloom wrote: >> Of course I didn't understand that py2app was trying to compile my own >> python source code and when I switched to Xcode as my new editor, I >> started mixing in tabs. So was in fact my code. > > Seems li

<    1   2