Re: how to pass a function name and its arguments inside the arguments of other function?

2007-11-03 Thread Stargaming
On Sat, 03 Nov 2007 02:21:30 +, jmborr wrote: > I need something like this: > > 1: superfoo( non-keyword-args, keyword-args, methodname, *kargs, > *kwargs): > 2: """non-keyword-args and keyword-args are arguments that 3: >apply to superfoo, while *kargs and **kwargs are ar

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Kay Schluehr
On Nov 3, 6:33 am, "Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote: > "Paul McGuire" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > On Nov 2, 5:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > >> Pyparsing is no recursive descent pars

Re: IDLE

2007-11-03 Thread Tal Einat
On Nov 3, 12:44 am, "Russ P." <[EMAIL PROTECTED]> wrote: > I've been programming in python for a few years using XEmacs on > Solaris and Linux. I've been thinking about trying IDLE for a long > time, but either it wasn't available on my system or I procrastinated. > I finally have it available, and

Re: IDLE

2007-11-03 Thread rustompmody
Just curious: What makes you wish to move from emacs to idle? Admission: I used to be a dyed-in-the-wool emacs guy but Ive been having trouble with it lately. eg Yesterday when editing a largish file (I think it was setup.py) it kept going to sleep and when I killed emacs it said LALR parsing.

Re: (MAC) CoreGraphics module???

2007-11-03 Thread David C. Ullrich
On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern <[EMAIL PROTECTED]> wrote: >David C. Ullrich wrote: >> [...] >> >> So CoreGraphics is a builtin in Apple-Python, >> explaining why I didn't find the relevant >> CoreGraphics.py anywhere on the hard drive, eh? > >Okay, which version of OS X do you ha

Re: (MAC) CoreGraphics module???

2007-11-03 Thread David C. Ullrich
On Fri, 2 Nov 2007 13:14:16 +0100, Tommy Nordgren <[EMAIL PROTECTED]> wrote: > >On 2 nov 2007, at 02.10, David C. Ullrich wrote: > >> [Why doesn't CoreGraphics work?] >> -- >> http://mail.python.org/mailman/listinfo/python-list > There are Python wrappers for the Cocoa API. These can be us

Re: Can local function access local variables in main program?

2007-11-03 Thread Bjoern Schliessmann
Sullivan WxPyQtKinter wrote: > UnboundLocalError: local variable 'x' referenced before assignment For your reference: http://groups.google.de/groups?q=group:comp.lang.python+UnboundLocalError Regards, Björn -- BOFH excuse #12: dry joints on cable plug -- http://mail.python.org/mailman/l

Re: simple question on dictionary usage

2007-11-03 Thread r . grimm
On Oct 27, 6:42 am, Karthik Gurusamy <[EMAIL PROTECTED]> wrote: > On Oct 26, 9:29 pm, Frank Stutzman <[EMAIL PROTECTED]> wrote: > > > > > My apologies in advance, I'm new to python > > > Say, I have a dictionary that looks like this: > > >record={'BAT': '14.4', 'USD': '24', 'DIF': '45', 'OAT': '16'

Re: __file__ vs __FILE__

2007-11-03 Thread Bjoern Schliessmann
Jeff McNeil wrote: > I've used the 'os.path.realpath(os.path.pardir)' construct in a > couple of scripts myself. In Windows? Using Linux, this gives me "..". I use os.path.dirname(os.path.abspath(__file__)) > That ought to work within the interactive interpreter. Why do you also enter that cod

Re: python newbie

2007-11-03 Thread Bjoern Schliessmann
Hendrik van Rooyen wrote: > So what's the difference ? Why can't bar be called a method > of foo, or is it merely a convention that classes have > methods and modules have functions? In depends on which terminology you use. As Steven told, Python methods are special functions. In contrast, the t

Re: py2exe (or other exe builder) on Vista system for Vista/XP install targets.

2007-11-03 Thread Bjoern Schliessmann
Michael wrote: > Björn, what library files end up being in your dist directory for > that project? Would you mind posting a copy of the output of dir? Okay, sorry for the delay. Here the output of py2exe is, for directory contents see below. | The following modules appear to be missing | ['FCNT

Re: python newbie

2007-11-03 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> Then if foo is a class, we probably all agree that bar is a method of >> foo. > > There are funny edge cases (e.g. bar might be an attribute with a > __call__ method) but in general, yes, bar would be a method of foo. > But that 'funny edge case' is

Re: python newbie

2007-11-03 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > modules are not special in any way, except that you cannot subclass them. > Oops, sorry I got that wrong. Modules are not special in any way, they can > have methods as well as functions: I've felt for a long time that you should be able to define __cal

Re: __file__ vs __FILE__

2007-11-03 Thread Giampaolo Rodola'
On 3 Nov, 04:21, klenwell <[EMAIL PROTECTED]> wrote: > I apologize in advance for coming at this from this angle but... > > In PHP you have the __FILE__ constant which gives you the value of the > absolute path of the file you're in (as opposed to the main script > file.) With the function dirname

Poor python and/or Zope performance on Sparc

2007-11-03 Thread joa2212
Hello everybody, I'm posting this message because I'm quiet frustrated. We just bought a software from a small software vendor. In the beginning he hosted our application on a small server at his office. I think it was a Fujitsu-Siemens x86 running debian Linux. The performance of the DSL-Line wa

Python launcher not working on Mac after Leopard upgrade?

2007-11-03 Thread André
I just installed Leopard on my Mac. I already was using Python 2.5. I can run a Python script from a terminal window by typing "python script.py" as one would expect ... but not using the Python launcher either directly or indirectly (by double clicking on a Python icon). Has anyone else observed

Python IDE

2007-11-03 Thread Simon Pickles
Hi, I have recently moved from Windows XP to Ubuntu Gutsy. I need a Python IDE and debugger, but have yet to find one as good as Pyscripter for Windows. Can anyone recommend anything? What are you all using? Coming from a Visual Studio background, editing text files and using the terminal to

Re: python newbie

2007-11-03 Thread Gabriel Genellina
En Sat, 03 Nov 2007 09:55:38 -0300, Paul Rubin <"http://phr.cx"@NOSPAM.invalid> escribió: > Duncan Booth <[EMAIL PROTECTED]> writes: >> modules are not special in any way, except that you cannot subclass >> them. >> Oops, sorry I got that wrong. Modules are not special in any way, they >> ca

Re: __file__ vs __FILE__

2007-11-03 Thread Gabriel Genellina
En Sat, 03 Nov 2007 10:07:10 -0300, Giampaolo Rodola' <[EMAIL PROTECTED]> escribió: > On 3 Nov, 04:21, klenwell <[EMAIL PROTECTED]> wrote: >> In PHP you have the __FILE__ constant which gives you the value of the >> absolute path of the file you're in (as opposed to the main script >> file.) >

Re: difference between IDLE and command line

2007-11-03 Thread Tal Einat
Jim Hendricks wrote: > I have been editing my code in UltraEdit then testing in IDLE by > choosing open, then F5. I didn't see an easy way to refresh in IDLE, so > each edit I've been closing the file (not IDLE itself), then opening > again. Since IDLE does not keep track of what directory I last

Re: Python IDE

2007-11-03 Thread M.O.
Simon Pickles wrote: > Hi, > > I have recently moved from Windows XP to Ubuntu Gutsy. > > I need a Python IDE and debugger, but have yet to find one as good as > Pyscripter for Windows. Can anyone recommend anything? What are you all > using? I use Eric. Works very well for me. http://www.die-

Re: __file__ vs __FILE__

2007-11-03 Thread Jeff McNeil
I'm using Mac OS X, and it get: Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.getcwd() '/Users/jeff' >>> os.path.realpath(os.path.pardir) '/Users'

Re: Python IDE

2007-11-03 Thread BartlebyScrivener
On Nov 3, 9:11 am, Simon Pickles <[EMAIL PROTECTED]> wrote: >I need a Python IDE and debugger . . . I use vim on both Windows XP and Debian, but I used to use Komodo for big projects. Try the free trial of Komodo http://www.activestate.com/Products/komodo_ide/ It has what you want, and it come

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Paul McGuire
On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote: > It has recursion in it but that's not sufficient to call it a recursive > descent parser any more than having a recursive implementation of the > factorial function. The important part is what it rec

Re: python newbie

2007-11-03 Thread Duncan Booth
Paul Rubin wrote: > Duncan Booth <[EMAIL PROTECTED]> writes: >> modules are not special in any way, except that you cannot subclass >> them. Oops, sorry I got that wrong. Modules are not special in any >> way, they can have methods as well as functions: > > I've felt fo

Re: MP3 and ID3 library/module recommendations

2007-11-03 Thread Basilisk96
I use PyMedia and mutagen. I've found PyMedia to be excellent for creating custom mp3 files from line input and performing frequency/energy analysis. I can't say that I've tried to convert other audio formats to MP3 with it, but I'm sure it's possible. I was able to get a working binary of v1.3.7

Re: Poor python and/or Zope performance on Sparc

2007-11-03 Thread George Sakkis
On Nov 3, 9:35 am, joa2212 <[EMAIL PROTECTED]> wrote: > Result: Almost even worse. The application is not scaling at all. > Every time you start a request it is hanging around on one cpu and is > devouring it at about 90-100% load. The other 31 CPUs which are shown > in "mpstat" are bored at 0% lo

Re: Copy database with python..

2007-11-03 Thread Erik Jones
On Nov 2, 2007, at 11:49 AM, Diez B. Roggisch wrote: > Abandoned wrote: > >> On Nov 2, 4:19 pm, Paul McNett <[EMAIL PROTECTED]> wrote: >>> Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute("pg_dump mydata > old.dump

jigsae puzzle issue

2007-11-03 Thread Joseph King
Hey i am trying to build a puzzle (jigsaw) game. I have most of the code for it written in python. But having an issue with one part. What i want is to give the player the ability to import there own picture and create a jigsaw from the picture with there own designation of the piece size and

Re: Poor python and/or Zope performance on Sparc

2007-11-03 Thread joa2212
On 3 Nov., 17:19, George Sakkis <[EMAIL PROTECTED]> wrote: > On Nov 3, 9:35 am, joa2212 <[EMAIL PROTECTED]> wrote: > > > Result: Almost even worse. The application is not scaling at all. > > Every time you start a request it is hanging around on one cpu and is > > devouring it at about 90-100% load

Re: Poor python and/or Zope performance on Sparc

2007-11-03 Thread Jean-Paul Calderone
On Sat, 03 Nov 2007 10:06:12 -0700, joa2212 <[EMAIL PROTECTED]> wrote: >On 3 Nov., 17:19, George Sakkis <[EMAIL PROTECTED]> wrote: >> On Nov 3, 9:35 am, joa2212 <[EMAIL PROTECTED]> wrote: >> >> > Result: Almost even worse. The application is not scaling at all. >> > Every time you start a request i

Re: Can local function access local variables in main program?

2007-11-03 Thread Sullivan WxPyQtKinter
Actually I am quite satisfied with and error, which is my expectation. But the implicit global variable access seems quite uncomfortable to me. Why is that necessary? On Nov 3, 3:39 am, Stargaming <[EMAIL PROTECTED]> wrote: > On Sat, 03 Nov 2007 07:18:17 +, Sullivan WxPyQtKinter wrote: > > I a

Re: Python IDE

2007-11-03 Thread Nick J Chackowsky
Simon Pickles wrote: > Hi, > > I have recently moved from Windows XP to Ubuntu Gutsy. > > I need a Python IDE and debugger, but have yet to find one as good as > Pyscripter for Windows. Can anyone recommend anything? What are you all > using? > > Coming from a Visual Studio background, editing

Re: Poor python and/or Zope performance on Sparc

2007-11-03 Thread Duncan Booth
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > The T1000 isn't a very good machine for general server purposes. It > has advantages when running software with a lot of hardware-level > parallelism, but Zope isn't such a piece of software. Zope can scale well on multi-processor machines, but yo

how easily can glob.glob say Unix bash `echo *`

2007-11-03 Thread p . lavarre
http://wiki.python.org/moin/glob now mentions: The glob module lists names in folders that match Unix shell patterns. If the elemental function emulating Unix bash `echo *` really is missing from the 2.5 Python batteries included, then here's a brief clear way of adding that function to Python.

opinion - file.readlines blemish

2007-11-03 Thread Ken Seehart
I was just reading about the new file.newlines method that was added per PEP 278. I suspect Guido must have been looking in some other direction when this got added, because it seems unlikely to me that he would have let this get by... Okay, maybe I'm being a little harsh :-) Sorry, I'm p

Re: Bizarre additional calling overhead.

2007-11-03 Thread Chris Mellon
On Sat, 2007-11-03 at 01:08 -0300, Gabriel Genellina wrote: > En Fri, 02 Nov 2007 21:07:19 -0300, Matimus <[EMAIL PROTECTED]> escribió: > > > On Nov 2, 3:08 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > >> >>> def test_func(): > >> > >> ... pass > >> ...>>> import new > >> >>> test_func2 =

Re: Retrieving all open applications ...

2007-11-03 Thread Ajay Deshpande
applications ... i need to retrieve all currently open applications ... thx for your help ... -Ajay On 10/31/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Tue, 30 Oct 2007 06:20:10 -0300, Ajay Deshpande > <[EMAIL PROTECTED]> escribió: > > > I need to retrieve all currently open applica

Re: __file__ vs __FILE__

2007-11-03 Thread klenwell
On Nov 3, 4:18 am, Bjoern Schliessmann wrote: > Jeff McNeil wrote: > > I've used the 'os.path.realpath(os.path.pardir)' construct in a > > couple of scripts myself. > > In Windows? Using Linux, this gives me "..". > > I use os.path.dirname(os.path.abspath(__file__)) > > > That ought to work within

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Neil Cerutti
On 2007-11-03, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" ><[EMAIL PROTECTED]> wrote: >> It has recursion in it but that's not sufficient to call it a recursive >> descent parser any more than having a recursive implementation of

advice for threaded/parallel application

2007-11-03 Thread Brian Blais
Hello, I am thinking about writing a simple multi-agent robot simulator, but I am stumped before I begin, trying to decide how to structure the program. My goals are the following: 1) the entire simulator should not include much beyond the standard lib. I'm comfortable with the scipy/nu

Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Grant Edwards
I'm looking for GUI toolkits that work with directly with the Linux frambuffer (no X11). It's an embedded device with limited resources, and getting X out of the picture would be a big plus. The toolkit needs to be free and open-source. So far, I've found two options that will work without X11:

how to fill many data strings from socket.recvfrom()

2007-11-03 Thread lgwe
I want to receive 200 udp datagrams. Each into a new data string. But I dont know how to do that, this is wrong: import socket s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(("",port)) i = 0 while i<200: data[i],addr = s.recvfrom(1024) i = +1 data[i] is illegal. Any suggestio

Re: (MAC) CoreGraphics module???

2007-11-03 Thread Robert Kern
David C. Ullrich wrote: > On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern > <[EMAIL PROTECTED]> wrote: > >> David C. Ullrich wrote: >>> [...] >>> >>> So CoreGraphics is a builtin in Apple-Python, >>> explaining why I didn't find the relevant >>> CoreGraphics.py anywhere on the hard drive, eh? >> O

Re: python newbie

2007-11-03 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > This isn't perfect (global variables have to be set before hooking the > module) but it sort of works: > - callable.py --- > """How to define a callable module""" ... Oh neat, thanks, I'll have to file that one away, and use it now

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Bolen
Grant Edwards <[EMAIL PROTECTED]> writes: > I'm looking for GUI toolkits that work with directly with the > Linux frambuffer (no X11). It's an embedded device with > limited resources, and getting X out of the picture would be a > big plus. Sounds like a reasonably modern "embedded" system since

problem with iteration

2007-11-03 Thread Panagiotis Atmatzidis
Hello, I managed to write some code in order to do what I wanted: Inject code in the right place, in some html files. I developed the program using small functions, one at the time in order to see how they work. When I tried to put these pieces of code together I got this error: TypeError: iterati

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Bolen
David Bolen <[EMAIL PROTECTED]> writes: > When I was looking for an embedded graphics library for a prior > platform (ELAN 486, 2MB flash, 6MB RAM) under DOS, we took a look at > these: > > * GRX (http://grx.gnu.de/index.html) (...) > There aren't any Python wrappers for GRX, but the library is

Re: problem with iteration

2007-11-03 Thread Paul Hankin
On Nov 3, 8:58 pm, Panagiotis Atmatzidis <[EMAIL PROTECTED]> wrote: > Hello, > > I managed to write some code in order to do what I wanted: Inject code > in the right place, in some html files. I developed the program using > small functions, one at the time in order to see how they work. When I >

Re: python newbie

2007-11-03 Thread Paul Hankin
On Nov 3, 8:35 pm, Paul Rubin wrote: > Duncan Booth <[EMAIL PROTECTED]> writes: > > This isn't perfect (global variables have to be set before hooking the > > module) but it sort of works: > > - callable.py --- > > """How to define a callable module"""

Re: how to fill many data strings from socket.recvfrom()

2007-11-03 Thread GuillaumeC
> data[i] is illegal. > Any suggestion welcome! Either initialize data before: data=[0]*200 before "while" or (better): ... i=0 data=[] for i in range(200): d,addr= s.recvfrom(1024) data.append(d) -- http://mail.python.org/mailman/listinfo/python-list

Thread structures BUG?

2007-11-03 Thread Pablo Yabo
Hello, I create lots of threads that run a script and I have a problem when a thread is created with the same threadId that existed before. When a new thread is started I use this code to enter the interpreter: // create a thread state object for this thread PyEval_AcquireLock(); threadState =

Re: python newbie

2007-11-03 Thread Paul Rubin
Paul Hankin <[EMAIL PROTECTED]> writes: > I'm intrigued - when would you want a callable module? I think it would be nice to be able to say import StringIO buf = StringIO('hello') instead of import StringIO buf = StringIO.StringIO('hello') -- http://mail.python.org/mailman/listinfo/p

Re: Can local function access local variables in main program?

2007-11-03 Thread Pawel
Stargaming wrote: > You can make this work using the `global` statement:: > > >>> def foo(): > ... global x > ... print x > ... x = 0 Is there any way to disable global for x? Something like that: >>> x = 12345 >>> def foo(): ... global x ... print x ... no

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Just Another Victim of the Ambient Morality
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" > <[EMAIL PROTECTED]> wrote: >> It has recursion in it but that's not sufficient to call it a >> recursive >> descent parser any more than having a r

Re: python at command prompt

2007-11-03 Thread Tim Roberts
Ton van Vliet <[EMAIL PROTECTED]> wrote: > >There's could also be an issue with entering 'python' at the command >line, and not 'python.exe'. Once the PATH is setup correctly, try to >enter 'python.exe', and check whether that works. > >IMHO, to get any 'program-name' (without the .exe extension) t

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Grant Edwards
On 2007-11-03, David Bolen <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > >> I'm looking for GUI toolkits that work with directly with the >> Linux frambuffer (no X11). It's an embedded device with >> limited resources, and getting X out of the picture would be a >> big p

Re: Can local function access local variables in main program?

2007-11-03 Thread Erik Jones
On Nov 3, 2007, at 5:32 PM, Pawel wrote: > Stargaming wrote: >> You can make this work using the `global` statement:: >> > def foo(): >> ... global x >> ... print x >> ... x = 0 > > Is there any way to disable global for x? Something like that: x = 12345 def f

bsddb in python 2.5.1

2007-11-03 Thread BjornT
Have a rather big problem with bsddb I can't figure out. I upgraded an Ubuntu machine from 7.05 to 7.10 which upgraded python to 2.5.1 I run a local website that uses bsddb, and suddenly I get a version mismatch error with bsddb and I can't access my database anymore I noticed in the 2.5.1 releas

beautiful girls will help you,why?check it out

2007-11-03 Thread brau
beautiful girls will help you,why?check it out http://groups.google.com/group/all-good-things/web/beautiful-girls-and-ladies -- http://mail.python.org/mailman/listinfo/python-list

VC Toolkit 2003

2007-11-03 Thread Jacqui Thompson
My uploaded torrent at TPB: http://thepiratebay.org/tor/3871785/Visual_Basic_Toolkit_Setup -- http://mail.python.org/mailman/listinfo/python-list

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Just Another Victim of the Ambient Morality
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-11-03, Paul McGuire <[EMAIL PROTECTED]> wrote: >> On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" >><[EMAIL PROTECTED]> wrote: >>> It has recursion in it but that's not sufficient to call it

Re: how to fill many data strings from socket.recvfrom()

2007-11-03 Thread Mark T
"lgwe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want to receive 200 udp datagrams. Each into a new data string. > But I dont know how to do that, this is wrong: > > import socket > s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) > s.bind(("",port)) > i = 0 > while i<200:

Re: Python IDE

2007-11-03 Thread Zentrader
This is a discussion on the Ubuntu forums-something like 51 pages worth. Even though you are using Gutsy, you want to take a look at KDevelop. It will install without problems even though it is KDE. A lot of people use Geany or Eclipse also. Anyway, you can page through as much of this thread a

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Bjoern Schliessmann
Grant Edwards wrote: > Yes, it's "modern" enough to run Linux/X11 -- horsepower-wise > it's sort of in the PDA class of devices. wxWidgets has been > tried, but it's pretty sluggish. Hence the search for something > a littler lighter weight. Erm, wxWidgets is implemented in C++ and wxPython is j

Re: Can local function access local variables in main program?

2007-11-03 Thread Bjoern Schliessmann
Pawel wrote: > Is there any way to disable global for x? Something like that: x = 12345 def foo(): > ... global x > ... print x > ... noglobal(x) # ??? > ... x = 0# now this is local x Not really. Why don't you choose meaningful variable names? You practically sa

Re: __file__ vs __FILE__

2007-11-03 Thread Bjoern Schliessmann
klenwell wrote: > Bjoern Schliessmann wrote: >> I use os.path.dirname(os.path.abspath(__file__)) > > That makes sense, as it is almost a literal translation of what > I'm used to using in PHP. Thanks for pointing this out. You're welcome, happy coding :) Regards, Björn -- BOFH excuse #286:

Re: Poor python and/or Zope performance on Sparc

2007-11-03 Thread Ivan Voras
joa2212 wrote: > We have a Sun T1000 with 8 cores and 8 GB of RAM. First, I installed > Solaris 10 because I know this OS better than Debian Linux. Result: > poor Performance. After that I decided to migrate to debian: Do you know the architecture of this machine? It's extremely streamlined for d

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Boddie
On Sat Nov 3 20:45:54 CET 2007, Grant Edwards wrote: > I'm looking for GUI toolkits that work with directly with the > Linux frambuffer (no X11). It's an embedded device with > limited resources, and getting X out of the picture would be a > big plus. > > The toolkit needs to be free and open-so

Python good for data mining?

2007-11-03 Thread Jens
I'm starting a project in data mining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than Python, and my own experiments confirms this. I could imagine this to become a problem for very large da

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Grant Edwards
On 2007-11-04, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> Yes, it's "modern" enough to run Linux/X11 -- horsepower-wise >> it's sort of in the PDA class of devices. wxWidgets has been >> tried, but it's pretty sluggish. Hence the search for something >> a littler ligh

Re: Python IDE

2007-11-03 Thread SPE - Stani's Python Editor
On 3 nov, 15:11, Simon Pickles <[EMAIL PROTECTED]> wrote: > Hi, > > I have recently moved from Windows XP to Ubuntu Gutsy. > > I need a Python IDE and debugger, but have yet to find one as good as > Pyscripter for Windows. Can anyone recommend anything? What are you all > using? > > Coming from a V

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Neil Cerutti
On 2007-11-04, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > > "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On 2007-11-03, Paul McGuire <[EMAIL PROTECTED]> wrote: >>> On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" >>>

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Grant Edwards
On 2007-11-04, David Boddie <[EMAIL PROTECTED]> wrote: >> 1) QTopia (nee QT/Embedded). I assume that I can probably get >> PyQT to work with the embedded version of QT? > > Qtopia Core (formerly known as Qt/Embedded) should be fairly > painless to get working, though the embedded-specific fe

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread David Boddie
On Sun Nov 4 03:22:27 CET 2007, Grant Edwards wrote: > I think we're definitely going to try to evaluate Qtopia on our > platform to see if it's any quicker and smaller than > wxWidgets/GTK+/X11. I guess that evaluation doesn't need to > use Python -- in theory we sould be able to compare perform

Re: Python good for data mining?

2007-11-03 Thread Cameron Walsh
Jens wrote: > I'm starting a project in data mining, and I'm considering Python and > Java as possible platforms. > > I'm concerned by performance. Most benchmarks report that Java is > about 10-15 times faster than Python, and my own experiments confirms > this. I could imagine this to become a p

how to iterate through each set

2007-11-03 Thread Tom_chicollegeboy
I am begginer in learning Python language. My assignment is to iterate through each set and display results. this is text of assignment: Bill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunately, Bill has a workin

Re: how to iterate through each set

2007-11-03 Thread Cameron Walsh
Tom_chicollegeboy wrote: > > > Here is my code: > > def speed(): > infile = open('speed.in', 'r') > line = infile.readline() > read = int(line) > print line > i = 0 > t0 = 0 > v = 0 > > while i line = infile.readline() > list = line.split() >

Re: how to iterate through each set

2007-11-03 Thread Tom_chicollegeboy
On Nov 4, 12:18 am, Cameron Walsh <[EMAIL PROTECTED]> wrote: > Tom_chicollegeboy wrote: > > > > > Here is my code: > > > def speed(): > > infile = open('speed.in', 'r') > > line = infile.readline() > > read = int(line) > > print line > > i = 0 > > t0 = 0 > > v = 0 > > >

Re: how to iterate through each set

2007-11-03 Thread Tom_chicollegeboy
On Nov 4, 12:47 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 03 Nov 2007 21:30:10 -0700, Tom_chicollegeboy > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > It works only for first set. How should I implement another solution > > that would move program to r

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-03 Thread Paul Rubin
Grant Edwards <[EMAIL PROTECTED]> writes: > There is no mouse. I'm not sure how many "widgets" are > required. Probably not very many. Back in the old days there were some lightweight toolkits for doing text mode GUI's using ANSI graphic characters for MS-DOS. I did a few of them. You could do

Re: how to iterate through each set

2007-11-03 Thread Tom_chicollegeboy
I figured out problem. here is my code. now it works as it should! Thank you everyone! def speed(): infile = open('speed.in', 'r') line = infile.readline() read = int(line) while '-1' not in line: i = 0 t0 = 0 v = 0 if len(line.split())==1: