Re: parameter list notation

2007-09-04 Thread Steve Holden
TheFlyingDutchman wrote: Well I did a search on Python variable length arguments and found a hit that seems to explain the *fields parameter: When you declare an argment to start with '*', it takes the argument list into an array. def foo(*args): print Number of arguments:, len(args)

pyPortMidi

2007-09-04 Thread Cappy2112
Does anyone here use pyPortMidi- in particular for Sending/receiving sysex? -- http://mail.python.org/mailman/listinfo/python-list

Re: list index()

2007-09-04 Thread Jason
On Aug 30, 1:27 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 17:09:36 +1000, Ben Finney wrote: [EMAIL PROTECTED] writes: What's with the index() function of lists throwing an exception on not found? It's letting you know that the item isn't in the list.

Re: Python object - XML

2007-09-04 Thread Stefan Behnel
Samuel wrote: Say you have the following XML: item ref=1 nameitem 1/name /item item ref=2 nameitem 2/name /item group item ref=1 / item ref=2 / namemy group/name /group Is there an easy way (i.e. without writing a sax/dom parser) to load this into a (number of) Python

Re: Does shuffle() produce uniform result ?

2007-09-04 Thread Antoon Pardon
On 2007-09-03, Paul Rubin http wrote: Antoon Pardon [EMAIL PROTECTED] writes: If I understand correctly that you are using urandom as a random generator I wouldn't trust too much on this performance. Urandom uses the systemwide entropy-pool. If other programs need this pool too, your

Re: Tkinter

2007-09-04 Thread Wildemar Wildenburger
vijayca wrote: i tried to use python gui module Tkinter in solaris,aix,hpux. while importing the module it shows an error... import Tkinter error says that your python may not be configured for Tk()... how to get out of this... Please copy and paste the invocation and (most

Re: Does shuffle() produce uniform result ?

2007-09-04 Thread Paul Rubin
Antoon Pardon [EMAIL PROTECTED] writes: No the idea is that once there's enough entropy in the pool to make one encryption key (say 128 bits), the output of /dev/urandom is computationally indistinguishable from random output no matter how much data you read from it. If you were talking

The reverse of encode('...', 'backslashreplace')

2007-09-04 Thread Tor Erik Sønvisen
Hi, How can I transform b so that the assertion holds? I.e., how can I reverse the backslash-replaced encoding, while retaining the str-type? a = u'æ' b = a.encode('ascii', 'backslashreplace') b '\\xe6' assert isinstance(b, str) and b == 'æ' Traceback (most recent call last): File

scipy.org website

2007-09-04 Thread Hiten Madhani
Hi, The scipy.org website has been down. Does anyone know whether it is coming back up? Hiten Madhani -- http://mail.python.org/mailman/listinfo/python-list

Re: parameter list notation

2007-09-04 Thread Ben Finney
TheFlyingDutchman [EMAIL PROTECTED] writes: In looking at some of the functions I see this prototype: def create(self,*fields,**kw): I am not clear on what the * and the ** are for or what they represent. It would seem, then, that you haven't followed the exercises in the Python

Re: The reverse of encode('...', 'backslashreplace')

2007-09-04 Thread Duncan Booth
Tor Erik Sønvisen [EMAIL PROTECTED] wrote: How can I transform b so that the assertion holds? I.e., how can I reverse the backslash-replaced encoding, while retaining the str-type? a = u'‘' b = a.encode('ascii', 'backslashreplace') b '\\xe6' assert isinstance(b, str) and b == '‘'

Re: parameter list notation

2007-09-04 Thread Duncan Booth
TheFlyingDutchman [EMAIL PROTECTED] wrote: I am trying to use a database written in Python called buzhug. In looking at some of the functions I see this prototype: def create(self,*fields,**kw): I am not clear on what the * and the ** are for or what they represent. Or, what are

how to get a formatted string?

2007-09-04 Thread Ginger
like format function in Visual Basic, format(##.##%,0.3456) == 34.56% -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a formatted string?

2007-09-04 Thread Gary Herron
Ginger wrote: like format function in Visual Basic, format(##.##%,0.3456) == 34.56% %5.2f%% % (0.3456*100) '34.56%' See this section of the manual: http://docs.python.org/lib/typesseq-strings.html Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

pickle error/instancemethod

2007-09-04 Thread Gregor Kling
Hello, I have some of these nefarious pickle errors I do not understand, maybe some of you have a clue. This is what I get (nd is the object which I want to pickle [cPickle.dumps(nd,2)], with the printout of nd.__dict__): ERROR Error: Can't pickle type 'instancemethod': attribute lookup

Re: list index()

2007-09-04 Thread Campbell Barton
Jason wrote: On Aug 30, 1:27 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 17:09:36 +1000, Ben Finney wrote: [EMAIL PROTECTED] writes: What's with the index() function of lists throwing an exception on not found? It's letting you know that the item isn't in the

Re: Tkinter

2007-09-04 Thread Eric Brunel
On Tue, 04 Sep 2007 07:12:00 +0200, vijayca [EMAIL PROTECTED] wrote: i tried to use python gui module Tkinter in solaris,aix,hpux. while importing the module it shows an error... import Tkinter error says that your python may not be configured for Tk()... how to get out of this... Did

[pygtk] problem with TreeView + ListStore

2007-09-04 Thread Guillermo Heizenreder
Hi list I'm developing a application for learn pygkt, and I need to know when a user selected or clicked one determinate row of my TreeView for shot another signal . Study the tutorial [1] I began to see the explanation that I see in the chapter 14.7. TreeView Signal and found one in particular

Re: parameter list notation

2007-09-04 Thread TheFlyingDutchman
Steve, Ben, Duncan, Thanks for the replies. TFD -- http://mail.python.org/mailman/listinfo/python-list

Re: Applying transformation matrix to 3D vertex coordinates

2007-09-04 Thread PhilC
On Mon, 03 Sep 2007 23:24:42 -0500, Robert Kern [EMAIL PROTECTED] wrote: transpose() ahh yes I can see where that would work. Just tried it in the above and I do get a last line of ones. OK onward and upward :) Many thanks Robert. -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'module object is not callable'

2007-09-04 Thread Chris . Tidy
Thanks guys. Changing to how Python does things has a lot of geting used to! Do any of you have any ideas on the best way to do the following problem: Each loop I perform, I get a new list of Strings. I then want to print these lists as columns adjacent to each other starting with the first

Re: TypeError: 'module object is not callable'

2007-09-04 Thread Amit Khemka
On 9/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks guys. Changing to how Python does things has a lot of geting used to! Do any of you have any ideas on the best way to do the following problem: Each loop I perform, I get a new list of Strings. I then want to print these lists as

Re: FCGI app reloading on every request

2007-09-04 Thread Michael Ströder
John Nagle wrote: What's actually happening is that FCGI isn't running at all. My .fcgi file is being executed by Apache's CGI handler, and fcgi.py recognizes this, then reads the parameters as if a CGI program. So it works just like a CGI program: one load per request. Not sure why

Undeterministic strxfrm?

2007-09-04 Thread Tuomas
Python 2.4.3 (#3, Jun 4 2006, 09:19:30) [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 Type help, copyright, credits or license for more information. import locale def key(s): ... locale.setlocale(locale.LC_COLLATE, 'en_US.utf8') ... return locale.strxfrm(s.encode('utf8')) ...

Re: OT: pronounciation [was: list index()]

2007-09-04 Thread Neil Cerutti
On 2007-08-31, Paddy [EMAIL PROTECTED] wrote: On Aug 31, 11:19 am, Tim Golden [EMAIL PROTECTED] wrote: Tim Golden wrote: Erik Max Francis wrote: Paddy wrote: I say the 'oll' in troll like the 'ol' in frolic, and pronounce roll and role similarly. My accent is probably from the East

Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread A.T.Hofkamp
On 2007-09-04, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks guys. Changing to how Python does things has a lot of geting used to! That's part of the fun :-) Do any of you have any ideas on the best way to do the following problem: Each loop I perform, I get a new list of Strings. I

Re: TypeError: 'module object is not callable'

2007-09-04 Thread cjt22
On Sep 4, 11:24 am, Amit Khemka [EMAIL PROTECTED] wrote: On 9/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks guys. Changing to how Python does things has a lot of geting used to! Do any of you have any ideas on the best way to do the following problem: Each loop I perform, I

Re: TypeError: 'module object is not callable'

2007-09-04 Thread Amit Khemka
On 9/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Sep 4, 11:24 am, Amit Khemka [EMAIL PROTECTED] wrote: On 9/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks guys. Changing to how Python does things has a lot of geting used to! Do any of you have any ideas on the best

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread Duncan Booth
A.T.Hofkamp [EMAIL PROTECTED] wrote: Each loop I perform, I get a new list of Strings. I then want to print these lists as columns adjacent to each other starting with the first created list in the first column and last created list in the final column. Use zip: x = ['1', '2'] y =

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread cjt22
But watch out if the lists aren't all the same length: zip won't pad out any sequences, so it maynotbe exactly what is wanted here: x = ['1', '2', '3'] y = ['4', '5'] for row in zip(x,y): print ', '.join(row) 1, 4 2, 5 Unfortunately the lists will be of different sizes By

Setting Current Dir in Python

2007-09-04 Thread Sandipan Gangopadhyay
Hi all! I have utility programs in Python that do clean up, image processing tasks on files in a folder. I just drop the program into the folder and run it. I have been double clicking on a Python program in my Windows XP Home to make it run . it sets the program's directory as the current

Re: list index()

2007-09-04 Thread Neil Cerutti
On 2007-09-04, Campbell Barton [EMAIL PROTECTED] wrote: Jason wrote: Returning -1 is not a good return value to indicate an error. After all, -1 is a valid index in most Python lists. (Negative numbers index from the tail of the list.) Agree in general tho its a bit inconsistent how...

Re: So what exactly is a complex number?

2007-09-04 Thread Roy Smith
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: Roy Smith wrote: Boris Borcic [EMAIL PROTECTED] wrote: Complex numbers are like a subclass of real numbers I wouldn't use the term subclass. It certainly doesn't apply in the same sense it applies in OOPLs. For

Re: Python is overtaking Perl

2007-09-04 Thread Jean-Paul Calderone
On Tue, 04 Sep 2007 00:32:23 -, Ben [EMAIL PROTECTED] wrote: Here are the statistics from Google Trends: http://benyang22a.blogspot.com/2007/09/perl-vs-python.html From the graph, it seems more accurate to say that Perl is undertaking Python. Jean-Paul --

Re: Setting Current Dir in Python

2007-09-04 Thread Tim Couper
Non-ASCII character '\xef' in file SandhirFileMonitor.py on line 356, This is reason for the failure .. you have a (probably accidentally placed) non-ascii (ie whose value is 128) character on line 356, whose hex value is ef (decimal 259) . Solution: find that line and remove the character -

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread Duncan Booth
[EMAIL PROTECTED] wrote: But watch out if the lists aren't all the same length: zip won't pad out any sequences, so it maynotbe exactly what is wanted here: x = ['1', '2', '3'] y = ['4', '5'] for row in zip(x,y): print ', '.join(row) 1, 4 2, 5 Unfortunately the lists

REGULAR EXPRESSION

2007-09-04 Thread AniNair
hi.. I am trying to match '+ %/-' etc using regular expression in expressions like 879+34343. I tried \W+ but it matches only in the beginning of the string Plz help Thanking you in advance... -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting Current Dir in Python

2007-09-04 Thread Steve Holden
Tim Couper wrote: Non-ASCII character '\xef' in file SandhirFileMonitor.py on line 356, This is reason for the failure .. you have a (probably accidentally placed) non-ascii (ie whose value is 128) character on line 356, whose hex value is ef (decimal 259) . Solution: find that line

Re: REGULAR EXPRESSION

2007-09-04 Thread Steve Holden
AniNair wrote: hi.. I am trying to match '+ %/-' etc using regular expression in expressions like 879+34343. I tried \W+ but it matches only in the beginning of the string Plz help Thanking you in advance... Perhaps you could give a few example of strings that should and shouldn't match?

Tkinter(2)

2007-09-04 Thread vijayca
my python installation is:Active python 2.5.1 i am using Red Hat Linux i have the Tkinter module installed but any simple script produces an error script: from Tkinter import Label widget = Label(None, text='Hello GUI world!') widget.pack() widget.mainloop() error: Traceback (most recent

Calling a dos batch file from python

2007-09-04 Thread n o s p a m p l e a s e
Suppose I have a batch file called mybatch.bat and I want to run it from a python script. How can I call this batch file in python script? Thanx/NSP -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread cjt22
On Sep 4, 2:06 pm, Duncan Booth [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: But watch out if the lists aren't all the same length: zip won't pad out any sequences, so it maynotbe exactly what is wanted here: x = ['1', '2', '3'] y = ['4', '5'] for row in zip(x,y):

Re: Setting Current Dir in Python

2007-09-04 Thread Tim Couper
Steve Of course it is. I'd like to think I left a test for the observant, but in reality it just shows I can't copy-type ... :-) Tim Dr Tim Couper CTO, SciVisum Ltd www.scivisum.com Steve Holden wrote: Tim Couper wrote: Non-ASCII character '\xef' in file SandhirFileMonitor.py on

GC performance with lists

2007-09-04 Thread jonas
While working on some python wrapping, I've run into some problems where the GC seems to take an unreasonable amount of time to run. The code below is a demonstration: import gc #gc.disable() data = [] for i in xrange(10): shortdata = [] for j in range(57): mytuple = (j,

Re: Printing lists in columns

2007-09-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) Thanks guys I have a list of lists such as a = [1 , 2] b = [4, 5, 6] c = [7,8, 9] Stored in another list: d = [a,b,c] I know this makes me sound very stupid but how would I specify in the parameter the inner lists without having to write them all

gucci shoes,LV handbag chanel levi's kobe max

2007-09-04 Thread cheapestsell
Cheap sport shoe www.cheapestsell.com Hotmail:[EMAIL PROTECTED] Yahoo: [EMAIL PROTECTED] www.cheapestsell.com Nike Air Jordan 1 ,Nike Air Jordan 2 Shoes,Nike Air Jordan 3,Nike Air Jordan 4 Shoes ,Nike Air Jordan 5 Chaussure Shoes,Nike Air Jordan 6 Catalog ,Nike Air Jordan 7 Shoes Catalog , Nike

Re: problem with TreeView + ListStore

2007-09-04 Thread Ali
On Sep 4, 10:43 am, Guillermo Heizenreder [EMAIL PROTECTED] wrote: Hi list I'm developing a application for learn pygkt, and I need to know when a user selected or clicked one determinate row of my TreeView for shot another signal . Hi, Well, ignoring the rest of the post, I can tell you

Parse or Pass?

2007-09-04 Thread frenchy64
I'm very confused...I want to describe passing variables to functions and I've seen these two words used in very similar contexts. Is there a difference between them? -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse or Pass?

2007-09-04 Thread Steve Holden
frenchy64 wrote: I'm very confused...I want to describe passing variables to functions and I've seen these two words used in very similar contexts. Is there a difference between them? In general, parsing is analyzing the grammatical structure of a string. People sometimes talk loosely

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] a écrit : (snip) Thanks guys I have a list of lists such as a = [1 , 2] b = [4, 5, 6] c = [7,8, 9] Stored in another list: d = [a,b,c] I know this makes me sound very stupid but how would I

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] a écrit : (snip) Thanks guys I have a list of lists such as a = [1 , 2] b = [4, 5, 6] c = [7,8, 9] Stored in another list: d = [a,b,c] I know this makes me sound very stupid but how would I

Re: Parse or Pass?

2007-09-04 Thread frenchy64
In general, parsing is analyzing the grammatical structure of a string. People sometimes talk loosely about parsing the command line. but I don't think that's normally applied to providing the actual arguments (corresponding to the definition's formal parameters) when a function is called -

Re: Calling a dos batch file from python

2007-09-04 Thread kyosohma
On Sep 4, 8:42 am, n o s p a m p l e a s e [EMAIL PROTECTED] wrote: Suppose I have a batch file called mybatch.bat and I want to run it from a python script. How can I call this batch file in python script? Thanx/NSP The subprocess module should work. Mike --

Re: scipy.org website

2007-09-04 Thread Robert Kern
Hiten Madhani wrote: Hi, The scipy.org website has been down. Does anyone know whether it is coming back up? It is back up now. We're working on making it more stable. We're getting a lot more traffic than we used to.

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread Duncan Booth
[EMAIL PROTECTED] wrote: I know this makes me sound very stupid but how would I specify in the parameter the inner lists without having to write them all out such as: for row in izip_longest(d[0], d[1], d[2], fillvalue='*'): print ', '.join(row) i.e. How could I do the following if

Re: FCGI app reloading on every request

2007-09-04 Thread John Nagle
Michael Ströder wrote: John Nagle wrote: What's actually happening is that FCGI isn't running at all. My .fcgi file is being executed by Apache's CGI handler, and fcgi.py recognizes this, then reads the parameters as if a CGI program. So it works just like a CGI program: one load per

Re: FCGI app reloading on every request

2007-09-04 Thread Thorsten Kampe
* John Nagle (Mon, 03 Sep 2007 21:26:01 -0700) I'm converting a web app from CGI to FCGI. The application works fine under FCGI, but it's being reloaded for every request, which makes FCGI kind of pointless. I wrote a little FCGI app which prints when the program is loaded and when it

Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 7:06 am, [EMAIL PROTECTED] wrote: One thing to do is to calc i+1 etc before the j loop instead of on every iteration. That is, calculate 600,000 times instead of 6*57*100,000=34,200,00, And in today's world, it probably won't make a lot of difference, This is not related to gc but is a

Re: REGULAR EXPRESSION

2007-09-04 Thread Tuomas
AniNair wrote: hi.. I am trying to match '+ %/-' etc using regular expression in expressions like 879+34343. I tried \W+ but it matches only in the beginning of the string Plz help Thanking you in advance... Is this what you are seeking for?

Re: How do I get triangles from a vtkPolyData object?

2007-09-04 Thread Grant Edwards
On 2007-09-03, Grant Edwards [EMAIL PROTECTED] wrote: Is there _any_ documentation for the Python bindings to the vtk library? I'm still beating my head against a wall trying to figure out how to get the actual data out of vtk objects when Python doesn't make visible the required Get

Re: Tkinter(2)

2007-09-04 Thread Zentrader
On Sep 4, 6:42 am, vijayca [EMAIL PROTECTED] wrote: my python installation is:Active python 2.5.1 i am using Red Hat Linux i have the Tkinter module installed but any simple script produces an error script: from Tkinter import Label widget = Label(None, text='Hello GUI world!')

Re: parameter list notation

2007-09-04 Thread Steven D'Aprano
On Mon, 03 Sep 2007 22:00:28 -0700, TheFlyingDutchman wrote: I am trying to use a database written in Python called buzhug. In looking at some of the functions I see this prototype: def create(self,*fields,**kw): I am not clear on what the * and the ** are for or what they

RE: GC performance with lists

2007-09-04 Thread John Krukoff
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 8:07 AM To: python-list@python.org Subject: GC performance with lists While working on some python wrapping, I've run into some problems

Re: How do I get triangles from a vtkPolyData object?

2007-09-04 Thread Grant Edwards
On 2007-09-04, Grant Edwards [EMAIL PROTECTED] wrote: On 2007-09-03, Grant Edwards [EMAIL PROTECTED] wrote: Is there _any_ documentation for the Python bindings to the vtk library? I'm still beating my head against a wall trying to figure out how to get the actual data out of vtk objects

Re: Python is overtaking Perl

2007-09-04 Thread George Sakkis
On Sep 4, 8:35 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 04 Sep 2007 00:32:23 -, Ben [EMAIL PROTECTED] wrote: Here are the statistics from Google Trends: http://benyang22a.blogspot.com/2007/09/perl-vs-python.html From the graph, it seems more accurate to say that Perl is

Re: Python is overtaking Perl

2007-09-04 Thread Matimus
So I think we can at least say from the chart that searches combining the terms 'python' and 'programming' have been falling, by some unquantifiable amount (it don't _look_ like much!?), relative to the number of total searches. I think it is the search volume relative to the total number of

Re: Printing lists in columns

2007-09-04 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes: for row in izip_longest(*d, fillvalue='*'): print ', '.join(row) HTH I thought that but when I tried it I recieved a Syntax Error: Invalid Syntax with a ^ pointing to fillvalue :S Python isn't too happy about adding individual keyword arguments after an

Re: Parse or Pass?

2007-09-04 Thread Martin v. Löwis
In general, parsing is analyzing the grammatical structure of a string. People sometimes talk loosely about parsing the command line. but I don't think that's normally applied to providing the actual arguments (corresponding to the definition's formal parameters) when a function is called -

Re: Python is overtaking Perl

2007-09-04 Thread OKB (not okblacke)
George Sakkis wrote: On Sep 4, 8:35 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 04 Sep 2007 00:32:23 -, Ben [EMAIL PROTECTED] wrote: Here are the statistics from Google Trends: http://benyang22a.blogspot.com/2007/09/perl-vs-python.html From the graph, it seems more

Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Carnell, James E
I am thinking about purchasing a book, but wanted to make sure I could get through the code that implements what the book is about (Artificial Intelligence a Modern Approach). Anyway, I'm not a very good programmer and OOP is still sinking in, so please don't answer my questions like I really

Re: Printing lists in columns

2007-09-04 Thread Miles
On 9/4/07, Hrvoje Niksic wrote: Python isn't too happy about adding individual keyword arguments after an explicit argument tuple. Try this instead: for row in izip_longest(*d, **dict(fillvalue='*')): print ', '.join(row) Or simply: for row in izip_longest(fillvalue='*', *d):

Rendering API for python?

2007-09-04 Thread Robert Dailey
Hi, I'm developing a quick python script to test an algorithm of mine. I would like to be able to plot the algorithm results to a diagram (much like you can do in Matlab). I was wondering if there's an API around that would allow me to quickly do this? Perhaps some sort of rendering API or

Re: [Tutor] Code reading for learning Python

2007-09-04 Thread Shawn Milochik
I second the Python Cookbook recommendation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Rendering API for python?

2007-09-04 Thread Robert Dailey
Well, I guess I wrote too soon. I found this: http://matplotlib.sourceforge.net/ I'm going to try it out and see if it is what I'm looking for, however I'm pretty confident! On 9/4/07, Robert Dailey [EMAIL PROTECTED] wrote: Hi, I'm developing a quick python script to test an algorithm of

Re: FCGI app reloading on every request

2007-09-04 Thread John Nagle
Thorsten Kampe wrote: * John Nagle (Mon, 03 Sep 2007 21:26:01 -0700) I'm converting a web app from CGI to FCGI. The application works fine under FCGI, but it's being reloaded for every request, which makes FCGI kind of pointless. I wrote a little FCGI app which prints when the program is

Re: Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 15:03:16 -0300, Carnell, James E [EMAIL PROTECTED] escribi�: MY QUESTION: What is a slot? In class Object below the __init__ has a slot. Note: The slot makes use of a data object called 'percept' that is used in the TableDrivenAgent(Agent) at the bottom of this post. I

Re: Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Wildemar Wildenburger
Carnell, James E wrote: I am thinking about purchasing a book, but wanted to make sure I could get through the code that implements what the book is about (Artificial Intelligence a Modern Approach). Anyway, I'm not a very good programmer and OOP is still sinking in, so please don't answer

Re: Undeterministic strxfrm?

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas [EMAIL PROTECTED] escribi�: Python 2.4.3 (#3, Jun 4 2006, 09:19:30) [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 Type help, copyright, credits or license for more information. import locale def key(s): ...

Re: gucci shoes,LV handbag chanel levi's kobe max

2007-09-04 Thread Zentrader
Reported as spam -- http://mail.python.org/mailman/listinfo/python-list

Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 9:27 am, John Krukoff [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 8:07 AM To: [EMAIL PROTECTED] Subject: GC performance with lists While

Sort of an odd way to debug...

2007-09-04 Thread xkenneth
All, Sorry for the vague topic, but I really didn't know how to describe what I want to do. I'd like to almost do a traceback of my code for debugging and I thought this would be a really cool way to do it if possible. What I'd like to do, is define a base class. This base class would have a

Questions on FOX GUI and Python

2007-09-04 Thread Kenneth McDonald
Would anyone care to offer their opinions as to using Python with the FOX GUI toolkit? Ease of use, stability, power, speed, etc., all thoughts would be appreciated. Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Sort of an odd way to debug...

2007-09-04 Thread Chris Mellon
On 9/4/07, xkenneth [EMAIL PROTECTED] wrote: All, Sorry for the vague topic, but I really didn't know how to describe what I want to do. I'd like to almost do a traceback of my code for debugging and I thought this would be a really cool way to do it if possible. What I'd like to do,

Re: Setting Current Dir in Python

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 09:12:22 -0300, Sandipan Gangopadhyay [EMAIL PROTECTED] escribi�: I have recently installed Python 2.5.1 and Pythonwin (without any errors) on Windows Vista Ultimate. Now, the programs run fine within Pythonwin IDE when current directory is set to the program's

Re: REGULAR EXPRESSION

2007-09-04 Thread Jonathan Gardner
On Sep 4, 6:32 am, AniNair [EMAIL PROTECTED] wrote: hi.. I am trying to match '+ %/-' etc using regular expression in expressions like 879+34343. I tried \W+ but it matches only in the beginning of the string Plz help Thanking you in advance... You may want to read the page describing the

Re: Undeterministic strxfrm?

2007-09-04 Thread Tuomas
Gabriel Genellina wrote: En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas [EMAIL PROTECTED] escribi�: Python 2.4.3 (#3, Jun 4 2006, 09:19:30) [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 Type help, copyright, credits or license for more information. import locale def key(s): ...

Re: Printing lists in columns

2007-09-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On Sep 4, 3:20 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] a écrit : (snip) Thanks guys I have a list of lists such as a = [1 , 2] b = [4, 5, 6] c = [7,8, 9] Stored in another list: d = [a,b,c] I know this makes me sound very

Py3K: Ensuring future compatibility between function annotation based tools

2007-09-04 Thread Ferenczi Viktor
There could be future compatibility issues between libraries using the new function annotation scheme: PEP 3107 -- Function Annotations See also: http://www.python.org/dev/peps/pep-3107/ Let's assume two hypotetic libraries: mashaller: provides JSON marshalling support typechecker: provides

function call

2007-09-04 Thread ianaré
Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like someOtherFunction: called by: someFunction, args are: var1, var2 Thanks in advance - ianaré --

doctest and decorators

2007-09-04 Thread Daniel Larsson
Hi, I assume this is a FAQ, but I couldn't find much helpful information googling. I'm having trouble with doctest skipping my functions, if I'm using decorators (that are defined in a separate module). If I'm understanding what is happening correctly, it's because doctest checks if the

Re: function call

2007-09-04 Thread Bruno Desthuilliers
ianaré a écrit : Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like someOtherFunction: called by: someFunction, args are: var1, var2

Re: doctest and decorators

2007-09-04 Thread Ferenczi Viktor
I assume this is a FAQ, but I couldn't find much helpful information googling. I'm having trouble with doctest skipping my functions, if I'm using decorators (that are defined in a separate module). If I'm understanding what is happening correctly, it's because doctest checks if the

Re: function call

2007-09-04 Thread kyosohma
On Sep 4, 3:17 pm, ianaré [EMAIL PROTECTED] wrote: Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like someOtherFunction: called by:

Re: Undeterministic strxfrm?

2007-09-04 Thread Chris Mellon
On 9/4/07, Tuomas [EMAIL PROTECTED] wrote: Gabriel Genellina wrote: En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas [EMAIL PROTECTED] escribi�: Python 2.4.3 (#3, Jun 4 2006, 09:19:30) [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 Type help, copyright, credits or license for more

Re: pyPortMidi

2007-09-04 Thread daz.diamond
Cappy2112 wrote: Does anyone here use pyPortMidi- in particular for Sending/receiving sysex? I'm starting to, but then I lurk more than I know ... daz -- http://mail.python.org/mailman/listinfo/python-list

Re: function call

2007-09-04 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : ianaré a écrit : Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like someOtherFunction: called by:

Re: parameter list notation

2007-09-04 Thread Steven D'Aprano
On Mon, 03 Sep 2007 22:10:41 -0700, TheFlyingDutchman wrote: Well I did a search on Python variable length arguments and found a hit that seems to explain the *fields parameter: When you declare an argment to start with '*', it takes the argument list into an array. No it doesn't. def

Re: function call

2007-09-04 Thread Chris Mellon
On 9/3/07, Bruno Desthuilliers [EMAIL PROTECTED] wrote: ianaré a écrit : Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/4/07, Ferenczi Viktor [EMAIL PROTECTED] wrote: I assume this is a FAQ, but I couldn't find much helpful information googling. I'm having trouble with doctest skipping my functions, if I'm using decorators (that are defined in a separate module). If I'm understanding what is happening

Re: function call

2007-09-04 Thread Bruno Desthuilliers
Chris Mellon a écrit : On 9/3/07, Bruno Desthuilliers [EMAIL PROTECTED] wrote: ianaré a écrit : Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like

  1   2   >