PyCon: deadline for hotel reservations and early-bird registration coming soon!

2008-02-13 Thread David Goodger
If you haven't registered for PyCon yet, now is the time! The early-bird registration deadline is February 20, one week away. After that, the price for registration will be going up. http://us.pycon.org/2008/registration/ The deadline for hotel reservations at the conference rate is also

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

2008-02-13 Thread Dotan Cohen
On 13/02/2008, Erik Max Francis [EMAIL PROTECTED] wrote: And the rest of us just use SI. (And if you bring up the _kilogram-force_, I'll just cry.) Don't cry, I just want to say that I've hated the kilogram-force almost as much as I've hated the electron-volt. Who is the lazy who comes up

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

2008-02-13 Thread cokofreedom
And the rest of us just use SI. (And if you bring up the _kilogram-force_, I'll just cry.) SI = Super Incredible? Awesome name for Force/Mass / NewItemOfClothing2050! -- http://mail.python.org/mailman/listinfo/python-list

Re: ways to declare empty set variable

2008-02-13 Thread cokofreedom
The irony that, x = (,) produces an error. Personally I would of thought it would be a better example of an empty tuple than anything else, but it still isn't that readable. The use of dict/list/tuple/set seems to stand out a lot better, makes it readable! Else in a few years you'll have §x§ =

Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Hello, I'm boggled. I have this function which takes a keyer that keys a table (iterable). I filter based on these keys, then groupby based on the filtered keys and a keyfunc. Then, to make the resulting generator behave a little nicer (no requirement for user to unpack the keys), I strip the

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Paul Rubin wrote: James Stroud [EMAIL PROTECTED] writes: I defined a little debugging function called iterprint: def iterprint(thing): ... for x in thing: iterprint(x) of course this mutates the thing that is being printed. Try using itertools.tee to fork a copy of the

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

2008-02-13 Thread Erik Max Francis
Dotan Cohen wrote: On 13/02/2008, Erik Max Francis [EMAIL PROTECTED] wrote: And the rest of us just use SI. (And if you bring up the _kilogram-force_, I'll just cry.) Don't cry, I just want to say that I've hated the kilogram-force almost as much as I've hated the electron-volt. Who is

Re: OT: Speed of light

2008-02-13 Thread Bjoern Schliessmann
Dotan Cohen wrote: Don't cry, I just want to say that I've hated the kilogram-force almost as much as I've hated the electron-volt. Who is the lazy who comes up with these things? eV has a advantages some kilogram force hasn't: It's on completely different order of magnitude. People aren't

Re: Big time WTF with generators - bug?

2008-02-13 Thread Paul Rubin
James Stroud [EMAIL PROTECTED] writes: I defined a little debugging function called iterprint: def iterprint(thing): ... for x in thing: iterprint(x) of course this mutates the thing that is being printed. Try using itertools.tee to fork a copy of the iterator and print

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Paul Rubin wrote: James Stroud [EMAIL PROTECTED] writes: I defined a little debugging function called iterprint: def iterprint(thing): ... for x in thing: iterprint(x) of course this mutates the thing that is being printed. Try using itertools.tee to fork a copy of the

Re: Big time WTF with generators - bug?

2008-02-13 Thread Paul Rubin
James Stroud [EMAIL PROTECTED] writes: Thank you for your answer, but I am aware of this caveat. Something is consuming my generator *before* I iterprint it. Please give it another look if you would be so kind. I'll see if I can look at it some more later, I'm in the middle of something else

Re: Big time WTF with generators - bug?

2008-02-13 Thread Paul Rubin
James Stroud [EMAIL PROTECTED] writes: I can see I didn't explain so well. This one must be a bug if my code looks good to you. I didn't spot any obvious errors, but I didn't look closely enough to say that the code looked good or bad. Conclusion: something consumes my generator going from

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Paul Rubin wrote: James Stroud [EMAIL PROTECTED] writes: I can see I didn't explain so well. This one must be a bug if my code looks good to you. I didn't spot any obvious errors, but I didn't look closely enough to say that the code looked good or bad. Conclusion: something consumes my

No Module Named pstats

2008-02-13 Thread Juha S.
Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/cProfile.py, line 36, in run result = prof.print_stats(sort) File

Re: No Module Named pstats

2008-02-13 Thread I. Soumpasis
2008/2/13, Juha S. [EMAIL PROTECTED]: Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/cProfile.py, line 36, in run

Re: Big time WTF with generators - bug?

2008-02-13 Thread Peter Otten
James Stroud wrote: groupby() is all you can eat, but no doggy bag. def serialize(table, keyer=_keyer,                       selector=_selector,                       keyfunc=_keyfunc,                       series_keyfunc=_series_keyfunc):    keyed = izip(imap(keyer, table), table)    

Re: Python not finding modules

2008-02-13 Thread Guilherme Polo
2008/2/13, Mani Chandra [EMAIL PROTECTED]: Hey! I installed a few python modules through the freebsd ports, but when I try to import them in the interpreter it says module xxx not found. This seems to happen for some modules and not for the others. ex:- I installed psyco and parallel

Python not finding modules

2008-02-13 Thread Mani Chandra
Hey! I installed a few python modules through the freebsd ports, but when I try to import them in the interpreter it says module xxx not found. This seems to happen for some modules and not for the others. ex:- I installed psyco and parallel python which seem to be found but then scipy, PIL

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Peter Otten wrote: groupby() is all you can eat, but no doggy bag. Thank you for your clear explanation--a satisfying conclusion to nine hours of head scratching. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com

Re: Big time WTF with generators - bug?

2008-02-13 Thread Paul Rubin
Peter Otten [EMAIL PROTECTED] writes:    for s_name, series in serialized:      grouped = groupby(series, keyfunc)      regrouped = ((k, (v[1] for v in g)) for (k,g) in grouped)      serieses.append((s_name, regrouped)) You are trying to store a group for later consumption

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Paul Rubin wrote: Peter Otten [EMAIL PROTECTED] writes: You are trying to store a group for later consumption here. Good catch, the solution is to turn that loop into a generator, but then it has to be consumed very carefully. Brilliant suggestion. Worked like a charm. Here is the final

Re: No Module Named pstats

2008-02-13 Thread Juha S.
2008/2/13, Juha S. [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File stdin, line 1, in module

Python not finding modules

2008-02-13 Thread [EMAIL PROTECTED]
Hey! I installed a few python modules through the freebsd ports, but when I try to import them in the interpreter it says module xxx not found. This seems to happen for some modules and not for the others. ex:- I installed psyco and parallel python which seem to be found but then scipy, PIL

Re: No Module Named pstats

2008-02-13 Thread Chris
On Feb 13, 11:20 am, Juha S. [EMAIL PROTECTED] wrote: Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/cProfile.py,

Re: Big time WTF with generators - bug?

2008-02-13 Thread Paul Rubin
James Stroud [EMAIL PROTECTED] writes: Brilliant suggestion. Worked like a charm. Here is the final product: Cool, glad it worked out. When writing this type of code I like to use doctest to spell out some solid examples of what each function is supposed to do, as part of the function. It's

Re: pyinstall and matplotlib

2008-02-13 Thread John Henry
On Feb 9, 2:53 pm, John Henry [EMAIL PROTECTED] wrote: Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not find the matplotlib data files when I attempt to run the exe created. In

Re: Python not finding modules

2008-02-13 Thread Mani Chandra
Hey, Thanks for replying. But what about the module whose path I included manually. That didn't work too!Is it like packages that are made for python2.4 do not work for 2.5? Also are folders recursively included? Thanks Mani chandra --- On Wed, 13/2/08, Guilherme Polo [EMAIL PROTECTED]

Re: Double underscore names

2008-02-13 Thread Steven D'Aprano
On Wed, 13 Feb 2008 09:55:39 +1100, Ben Finney wrote: 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

Basic question

2008-02-13 Thread WILLIAM SCHMIDT
In several places in the Python documentation I have run across an extra r that I can not explain: * In sys.path after the open bracket: sys.path = [r'd:\temp'] In the on line help in the DATA section (towards the end): help('sys') Help on built-in module

Re: Basic question

2008-02-13 Thread Chris
On Feb 13, 2:22 pm, WILLIAM SCHMIDT [EMAIL PROTECTED] wrote: In several places in the Python documentation I have run across an extra r that I can not explain: * In sys.path after the open bracket: sys.path = [r'd:\temp'] In the on line help in the DATA

Re: Python not finding modules

2008-02-13 Thread Guilherme Polo
2008/2/13, Mani Chandra [EMAIL PROTECTED]: Hey, Thanks for replying. But what about the module whose path I included manually. That didn't work too!Is it like packages that are made for python2.4 do not work for 2.5? Depends on the module, if they are C extensions you need to compile

regex question

2008-02-13 Thread mathieu
I do not understand what is wrong with the following regex expression. I clearly mark that the separator in between group 3 and group 4 should contain at least 2 white space, but group 3 is actually reading 3 +4 Thanks -Mathieu import re line = (0021,xx0A) Siemens: Thorax/Multix FD Lab

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-13 Thread Gilles Ganault
On Mon, 04 Feb 2008 16:40:01 +0100, Rolf van de Krol [EMAIL PROTECTED] wrote: To create a deamon, you indeed need to fork two times. Do I really need this much complication just to exit the script and let a child handle the pop-up? I've changed this line, and the parent still doesn't return, and

Re: Basic question

2008-02-13 Thread Guilherme Polo
2008/2/13, WILLIAM SCHMIDT [EMAIL PROTECTED]: In several places in the Python documentation I have run across an extra r that I can not explain: * In sys.path after the open bracket: sys.path = [r'd:\temp'] In the on line help in the DATA section

Re: regex question

2008-02-13 Thread Wanja Chresta
Hey Mathieu Due to word wrap I'm not sure what you want to do. What result do you expect? I get: print m.groups() ('0021', 'xx0A', 'Siemens: Thorax/Multix FD Lab Settings Auto Window Width ', ' ', 'SL', '1') But only when I insert a space in the 3rd char group (I'm not sure if your original

Word document accessing using python

2008-02-13 Thread Hari
Hello, I want to fetch some data from the work document and to fill it inside excel sheet. For this I want to perform opening word documents and do some string manipulations for extracting data and to fill it inside excel sheet. Can any one help in this by saying how to do this or by giving some

Re: CGI with URL problem

2008-02-13 Thread Ralf Schönian
rodmc schrieb: -- sorry if this has shown up twice, but my browser crashed and ended up posting the message when I hit the space bar for some odd reason. Also it was not quite ready. Hi, I am writing a small CGI app which tests if another webpage exists, the pages are on a Wiki system.

Re: regex question

2008-02-13 Thread grflanagan
On Feb 13, 1:53 pm, mathieu [EMAIL PROTECTED] wrote: I do not understand what is wrong with the following regex expression. I clearly mark that the separator in between group 3 and group 4 should contain at least 2 white space, but group 3 is actually reading 3 +4 Thanks -Mathieu import

Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Neal Becker
I'd like to output some data directly in .ods format. This format appears to be quite complex. Is there any python software available to do this? I did look at pyuno briefly. It looks pretty complicated also, and it looks like it uses it's own private version of python, which would not help

Re: regex question

2008-02-13 Thread bearophileHUGS
mathieu, stop writing complex REs like obfuscated toys, use the re.VERBOSE flag and split that RE into several commented and *indented* lines (indented just like Python code), the indentation level has to be used to denote nesting. With that you may be able to solve the problem by yourself. If

Answer: Re: Basic question

2008-02-13 Thread WILLIAM SCHMIDT
Thank you Guilherme Solution below: Guilherme Polo [EMAIL PROTECTED] 2008-02-13 06:48 2008/2/13, WILLIAM SCHMIDT [EMAIL PROTECTED]: In several places in the Python documentation I have run across an extra r that I can not explain: * In sys.path after the

win32com.client question

2008-02-13 Thread Juan_Pablo
import win32com.client is posible in linux ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Word document accessing using python

2008-02-13 Thread Juan_Pablo
On 13 feb, 10:40, Hari [EMAIL PROTECTED] wrote: Hello, I want to fetch some data from the work document and to fill it inside excel sheet. For this I want to perform opening word documents and do some string manipulations for extracting data and to fill it inside excel sheet. Can any one

Re: win32com.client question

2008-02-13 Thread juan pablo
On Feb 13, 2008 11:58 AM, James Matthews [EMAIL PROTECTED] wrote: What do you mean possible? It is possible to use the library win32com.client in linux? I thought that was only for windows ?¿ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python equivt of __FILE__ and __LINE__

2008-02-13 Thread alain
On Feb 12, 7:44 pm, Jeff Schwab [EMAIL PROTECTED] wrote: It still would be nice to have syntax as clean as __FILE__ and __LINE__. There exists an undocumented builtin called __file__, but unfortunately no corresponding __line__ Alain -- http://mail.python.org/mailman/listinfo/python-list

Re: Combinatorics

2008-02-13 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: 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

Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread cokofreedom
I was reading up on this site [http://www.noulakaz.net/weblog/ 2007/03/18/a-regular-expression-to-check-for-prime-numbers/] of an interesting way to work out prime numbers using Regular Expression. However my attempts to use this in Python keep returning none (obviously no match), however I don't

RE: Word document accessing using python

2008-02-13 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Hari Sent: Wednesday, February 13, 2008 8:40 AM To: python-list@python.org Subject: Word document accessing using python Hello, I want to fetch some data from the work document and to fill

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread Carsten Haese
On Wed, 2008-02-13 at 07:31 -0800, [EMAIL PROTECTED] wrote: return re.match(^1?$|^(11+?)\1+$, convert) That needs to be either return re.match(r^1?$|^(11+?)\1+$, convert) or return re.match(^1?$|^(11+?)\\1+$, convert) in order to prevent \1 from being read as \x01. -- Carsten Haese

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

2008-02-13 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : (snip) Note that all the clues were on the traceback. When people here insist that all error reports should come with the complete stack trace, it isn't because they want to be annoying, but because it's really useful... +1 QOTW --

Re: win32com.client question

2008-02-13 Thread James Matthews
What do you mean possible? On Feb 13, 2008 3:05 PM, Juan_Pablo [EMAIL PROTECTED] wrote: import win32com.client is posible in linux ? -- http://mail.python.org/mailman/listinfo/python-list -- http://search.goldwatches.com/?Search=Movado+Watches http://www.jewelerslounge.com

fromfunc functions

2008-02-13 Thread azrael
I came across the fromfunc() function in numpy where you pass as an argument the name of a function as a string and also the atributes for the desired function. I find this extremly usefull and sexy. Can someone point me how write a function of such capabilities --

Fw: error in importing scipy

2008-02-13 Thread Mani Chandra
--- On Wed, 13/2/08, Mani Chandra [EMAIL PROTECTED] wrote: From: Mani Chandra [EMAIL PROTECTED] Subject: error in importing scipy To: [EMAIL PROTECTED] Date: Wednesday, 13 February, 2008, 9:30 PM Hi I get the following error while importing scipy.

Re: Unbuffered mode

2008-02-13 Thread Hamish Allan
Further to my query about trying to make Python run unbuffered, I have discovered that a SyntaxError seems to cause Python to close its SSH connection: $ ssh localhost python -u , File stdin, line 1 , ^ SyntaxError: invalid syntax $ Whereas a different sort of error (e.g. NameError)

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

2008-02-13 Thread Dotan Cohen
On 13/02/2008, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] 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 all, both are conversions of

Re: win32com.client question

2008-02-13 Thread Gerhard Häring
Juan_Pablo wrote: import win32com.client is posible in linux ? Not in any meaningful way. -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

noobie question regarding installing a package

2008-02-13 Thread A_H
HI, I'm trying to install NumPy and the instructions say: python setup.py install When I try that it says, unhelpfully: This is the wrong setup.py So what does this mean, and what is the right setup.py? Thanks, grg -- http://mail.python.org/mailman/listinfo/python-list

Re: regex question

2008-02-13 Thread Paul McGuire
On Feb 13, 6:53 am, mathieu [EMAIL PROTECTED] wrote: I do not understand what is wrong with the following regex expression. I clearly mark that the separator in between group 3 and group 4 should contain at least 2 white space, but group 3 is actually reading 3 +4 Thanks -Mathieu import

boost.python Event object wrapped with bp::object()

2008-02-13 Thread Alexander Eisenhuth
Hello everybody, I Use a C++ thread that is called from the python sides to provoke some activities. The calls set some booleans in the thread object and return. To synchrThreadClassonize the execution in the thread, the idea of me is, to give a Python Event() object as bp::object to the C++

Re: win32com.client question

2008-02-13 Thread Mike Driscoll
On Feb 13, 8:05 am, Juan_Pablo [EMAIL PROTECTED] wrote: import win32com.client is posible in linux ? No. It's a Windows only Python extension. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone help, please?

2008-02-13 Thread Douglas Wells
In article [EMAIL PROTECTED], maehhheeyy [EMAIL PROTECTED] writes: Hi, right now I'm using Python and Multicast. I have the code for Multicast receiver on Python but I keep getting this error; Hi, In the future please use a Subject: line that is relevant to your inquiry. Many people only

Fwd: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread Rafael Sachetto
with this works: return re.match(r^1?$|^(11+?)\1+$, convert) but it match the non-prime numbers. So re_prime(2) will return null and re_prime(4) will return a match 2008/2/13, Carsten Haese [EMAIL PROTECTED]: On Wed, 2008-02-13 at 07:31 -0800, [EMAIL PROTECTED] wrote: return

Re: Combinatorics

2008-02-13 Thread Thorsten Kampe
* Michael Robertson (Mon, 11 Feb 2008 23:52:31 -0800) Where is the python equivalent of: http://search.cpan.org/~fxn/Algorithm-Combinatorics-0.16/Combinatorics.pm combinations (with and without repetition) variations (with and without repetition) permutations Permutations are also with

ANN: Leo 4.4.7 beta 1 released

2008-02-13 Thread Edward K Ream
Leo 4.4.7 beta 1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 This version features the ipython plugin that provides a two-way bridge between Leo and IPython. See http://webpages.charter.net/edreamleo/IPythonBridge.html Leo's main discussion is

Re: fromfunc functions

2008-02-13 Thread Chris
On Feb 13, 5:51 pm, azrael [EMAIL PROTECTED] wrote: I came across the fromfunc() function in numpy where you pass as an argument the name of a function as a string and also the atributes for the desired function. I find this extremly usefull and sexy. Can someone point me how write a

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Rolf van de Krol
Neal Becker wrote: I'd like to output some data directly in .ods format. This format appears to be quite complex. Is there any python software available to do this? I did look at pyuno briefly. It looks pretty complicated also, and it looks like it uses it's own private version of python,

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

2008-02-13 Thread Jeff Schwab
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 all, both are conversions of incompatible measurements, ie, they

Re: Fw: error in importing scipy

2008-02-13 Thread Robert Kern
Mani Chandra wrote: --- On Wed, 13/2/08, Mani Chandra [EMAIL PROTECTED] wrote: From: Mani Chandra [EMAIL PROTECTED] Subject: error in importing scipy To: [EMAIL PROTECTED] Date: Wednesday, 13 February, 2008, 9:30 PM Hi I get the following error while importing scipy.

Re: Python equivt of __FILE__ and __LINE__

2008-02-13 Thread Jeff Schwab
alain wrote: On Feb 12, 7:44 pm, Jeff Schwab [EMAIL PROTECTED] wrote: It still would be nice to have syntax as clean as __FILE__ and __LINE__. There exists an undocumented builtin called __file__, but unfortunately no corresponding __line__ Drat! So close! Thanks for the info. Oh well,

ANN: NUCULAR B3 Full text indexing (now on Win32 too)

2008-02-13 Thread Aaron Watters
ANNOUNCE: NUCULAR Fielded Full Text Indexing, BETA 3 Nucular is a system for creating full text indices for fielded data. It can be accessed via a Python API or via a suite of command line interfaces. NEWS Nucular now supports WIN32. Current releases of Nucular abstract the file system in

Re: fromfunc functions

2008-02-13 Thread Chris
On Feb 13, 5:51 pm, azrael [EMAIL PROTECTED] wrote: I came across the fromfunc() function in numpy where you pass as an argument the name of a function as a string and also the atributes for the desired function. I find this extremly usefull and sexy. Can someone point me how write a

Re: fromfunc functions

2008-02-13 Thread Marc 'BlackJack' Rintsch
On Wed, 13 Feb 2008 07:51:36 -0800, azrael wrote: I came across the fromfunc() function in numpy where you pass as an argument the name of a function as a string and also the atributes for the desired function. If you mean `fromfunction()` then you don't give the name of the function as

Re: Unbuffered mode

2008-02-13 Thread Hamish Allan
Sorry to reply to myself again, but I think I now know the answer and wish to post it for the archives. Python run without '-i', if not sys.stdin.isatty(), expects to read a whole script before doing anything else (presuming to be reading it from a pipe). Therefore syntax errors are fatal, but

Cannot understand error message

2008-02-13 Thread Bill Davy
The following code produces an error message (using Idle with Py 2.4 and 2.5). There's an error in your program: EOL while scanning single-quoted string. It comes just after s = '' (put there to try and isolate the broken string). It would be good if the error message pointed me to the start

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Neal Becker
Rolf van de Krol wrote: Neal Becker wrote: I'd like to output some data directly in .ods format. This format appears to be quite complex. Is there any python software available to do this? I did look at pyuno briefly. It looks pretty complicated also, and it looks like it uses it's own

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread Carsten Haese
On Wed, 2008-02-13 at 10:40 -0800, [EMAIL PROTECTED] wrote: But why doesn't it work when you make that change? I can't answer that question, because it *does* work when you make that change. -- Carsten Haese http://informixdb.sourceforge.net --

RE: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 1:41 PM To: python-list@python.org Subject: Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread [EMAIL PROTECTED]
On Feb 13, 9:48 am, Carsten Haese [EMAIL PROTECTED] wrote: On Wed, 2008-02-13 at 07:31 -0800, [EMAIL PROTECTED] wrote:     return re.match(^1?$|^(11+?)\1+$, convert) That needs to be either return re.match(r^1?$|^(11+?)\1+$, convert) or return re.match(^1?$|^(11+?)\\1+$, convert) in

Re: Big time WTF with generators - bug?

2008-02-13 Thread Steve Holden
James Stroud wrote: [...] I then append the growing list of series generator into the serieses list (serieses is plural for series if your vocablulary isn't that big). Not as big as your ego, apparently ;-) And don't be coming back with any argumentses. regardses Steve -- Steve Holden

Re: OT: Speed of light

2008-02-13 Thread Jeff Schwab
Hrvoje Niksic wrote: Jeff Schwab [EMAIL PROTECTED] writes: 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: Word document accessing using python

2008-02-13 Thread Juan_Pablo
import win32com.client but, window32com.client is only functional in windows -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot understand error message

2008-02-13 Thread Chris
It doesn't like all that text in the previous one... Just before s = '' you have 4 double quotes to close to doc-string instead of 3. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyinstall and matplotlib

2008-02-13 Thread Russell E. Owen
In article [EMAIL PROTECTED], John Henry [EMAIL PROTECTED] wrote: On Feb 9, 2:53 pm, John Henry [EMAIL PROTECTED] wrote: Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not

Re: OT: Speed of light

2008-02-13 Thread Hrvoje Niksic
Jeff Schwab [EMAIL PROTECTED] writes: 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 all, both are conversions

Re: Big time WTF with generators - bug?

2008-02-13 Thread Jeff Schwab
Steve Holden wrote: James Stroud wrote: [...] I then append the growing list of series generator into the serieses list (serieses is plural for series if your vocablulary isn't that big). Not as big as your ego, apparently ;-) And don't be coming back with any argumentses. Nasty

Re: Cannot understand error message

2008-02-13 Thread Chris
On Feb 13, 7:29 pm, Bill Davy [EMAIL PROTECTED] wrote: The following code produces an error message (using Idle with Py 2.4 and 2.5). There's an error in your program: EOL while scanning single-quoted string. It comes just after s = '' (put there to try and isolate the broken string). It

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

2008-02-13 Thread Grant Edwards
On 2008-02-13, Jeff Schwab [EMAIL PROTECTED] wrote: Eh? Last I checked both pound and kilogram are units of mass, so where is the incompatibility? I've never heard of pound as a unit of mass. At least where I went to school (Boston, MA), pound is the English unit of force, slug is the

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

2008-02-13 Thread Jeff Schwab
Grant Edwards wrote: On 2008-02-13, Jeff Schwab [EMAIL PROTECTED] wrote: Eh? Last I checked both pound and kilogram are units of mass, so where is the incompatibility? I've never heard of pound as a unit of mass. At least where I went to school (Boston, MA), pound is the English unit of

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread [EMAIL PROTECTED]
On Feb 13, 12:53 pm, Carsten Haese [EMAIL PROTECTED] wrote: On Wed, 2008-02-13 at 10:40 -0800, [EMAIL PROTECTED] wrote: But why doesn't it work when you make that change? I can't answer that question, because it *does* work when you make that change. Well, the OP said the function was

Re: Combinatorics

2008-02-13 Thread Paul Hankin
On Feb 12, 7:52 am, Michael Robertson [EMAIL PROTECTED] wrote: Where is the python equivalent of: http://search.cpan.org/~fxn/Algorithm-Combinatorics-0.16/Combinatoric... combinations (with and without repetition) variations (with and without repetition) permutations partitions

Re: Recursive generator

2008-02-13 Thread Ben C
On 2008-02-12, Paul Hankin [EMAIL PROTECTED] wrote: On Feb 12, 10:17 pm, Ben C [EMAIL PROTECTED] wrote: On 2008-02-12, Paul Rubin wrote: Paul Hankin [EMAIL PROTECTED] writes: def genDescendants(self):     return chain([self], *[child.genDescendants()         for child in

Re: No Module Named pstats

2008-02-13 Thread Joshua Kugler
Chris wrote: On Feb 13, 11:20 am, Juha S. [EMAIL PROTECTED] wrote: Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File stdin, line 1, in module File

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread subeen
hmm... interesting here is another way you can find prime numbers http://love-python.blogspot.com/2008/02/find-prime-number-upto-100-nums-range2.html On Feb 13, 9:31 pm, [EMAIL PROTECTED] wrote: I was reading up on this site [http://www.noulakaz.net/weblog/

Re: Big time WTF with generators - bug?

2008-02-13 Thread James Stroud
Steve Holden wrote: James Stroud wrote: [...] I then append the growing list of series generator into the serieses list (serieses is plural for series if your vocablulary isn't that big). Not as big as your ego, apparently ;-) And don't be coming back with any argumentses. Where is this

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

2008-02-13 Thread Grant Edwards
On 2008-02-13, Jeff Schwab [EMAIL PROTECTED] wrote: Grant Edwards wrote: On 2008-02-13, Jeff Schwab [EMAIL PROTECTED] wrote: Eh? Last I checked both pound and kilogram are units of mass, so where is the incompatibility? I've never heard of pound as a unit of mass. At least where I went to

Re: fromfunc functions

2008-02-13 Thread azrael
Thaks guys. this helped -- http://mail.python.org/mailman/listinfo/python-list

Re: ways to declare empty set variable

2008-02-13 Thread Nick Craig-Wood
Ben Finney [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: Missing that, I think dict() and set() and tuple() and list() I often use these myself. They're slightly more explicit, which can help when I want the reader not to have to think too much, and they're not particularly

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

2008-02-13 Thread Jeroen Ruigrok van der Werven
-On [20080213 20:16], Jeff Schwab ([EMAIL PROTECTED]) wrote: So what is the mass of a slug, anyway? (I assume this is slug as in bullet, not slimy, creeping thing.) http://en.wikipedia.org/wiki/Slug_(mass) would be my guess. -- Jeroen Ruigrok van der Werven asmodai(-at-)in-nomine.org

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

2008-02-13 Thread Jeroen Ruigrok van der Werven
-On [20080213 18:46], Jeff Schwab ([EMAIL PROTECTED]) wrote: I've never heard of pound as a unit of mass. Then please correct/fix: http://en.wikipedia.org/wiki/Pound_(mass) Me being mainland European I know not this silly system called imperial. [Yes, partially in good jest...] -- Jeroen

Truncated postings

2008-02-13 Thread lloyd
Hello, Over the past 24 hours or so, all of my Python-List e-mails have been truncated to subject list only. No posts. Are others experiencing this problem? Or is it just on my end? Thanks, Lloyd R. Prentice -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >