Re: pygame and python 2.5

2007-02-09 Thread Ben Sizer
On Feb 9, 9:01 pm, [EMAIL PROTECTED] wrote: > Ben> If someone could explain the limitation in detail, I expect ways > Ben> could be found around it. After all, I don't know of any other > Ben> systems that require you to recompile all the extensions when you > Ben> upgrade the appli

Re: Calling J from Python

2007-02-09 Thread Martin Lüthi
Alexander Alexander Schmolck <[EMAIL PROTECTED]> writes: > I can think of two nice ways in J, 13 and 16 characters long respectively and > each expressing something essential and non-trival about the problem in a way > that would be more cumbersome in python. > > Here's the first one: > > (,,.~)^:

Re: Glob returning an empty list when passed a variable

2007-02-09 Thread Steven D'Aprano
On Fri, 09 Feb 2007 14:15:51 +, Steve Holden wrote: > area_name_string = '*% s*' % (Area_name) > > Interesting, I never realised until now that you can have spaces between > the percent sign and th format effector. Space is one of the flags. From the docs: The conversion flag characters a

Re: Best Free and Open Source Python IDE

2007-02-09 Thread dimitri pater
Hi, the hunt for free Python IDE's is a never ending journey... just make up your mind and invest some money in WingIDE. It is not *that* expensive and in the end it will save you lots of time (=money) hunting for the perfect "free" Python Ide. Just download the time limited free version of WingID

Re: interacting with shell - another newbie question

2007-02-09 Thread James Stroud
James wrote: > Hello, > > I work in this annoying company where I have to autheticate myself to > the company firewall every 30-50 minutes in order to access the > internet. (I think it's a checkpoint fw). > > I have to run "telnet what.ever.ip.address 259" then it prompts me > with userid, then

Matching Strings

2007-02-09 Thread rshepard
I'm not sure how to change a string so that it matches another one. My application (using wxPython and SQLite3 via pysqlite2) needs to compare a string selected from the database into a list of tuples with another string selected in a display widget. An extract of the relevant code is:

Re: Matching Strings

2007-02-09 Thread James Stroud
[EMAIL PROTECTED] wrote: > I'm not sure how to change a string so that it matches another one. > > My application (using wxPython and SQLite3 via pysqlite2) needs to compare > a string selected from the database into a list of tuples with another > string selected in a display widget. > > A

Re: Matching Strings

2007-02-09 Thread rshepard-at-appl-ecosys . com
On 2007-02-10, [EMAIL PROTECTED] wrote: > if item == selName: Slicing doesn't seem to do anything -- if I've done it correctly. I changed the above to read, if item[2:-2] == selName: but the output's the same. Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Retry:Question about optparse/OptionParser callback.

2007-02-09 Thread James Stroud
Steven W. Orr wrote: > I decided I could be more articulate. I hope this helps. > > I'm writing a program that needs to process options. Due to the nature > of the program with its large number of commandline options, I would > like to write a callback to be set inside add_option. > > Something

Re: doctests for interactive functions

2007-02-09 Thread Brian van den Broek
Neil Cerutti said unto the world upon 02/09/2007 08:52 AM: > On 2007-02-08, Brian van den Broek <[EMAIL PROTECTED]> wrote: >> Can I run the rough structure of my code past you to see if it >> is in the vicinity of what you mean? (I have removed some >> details for sake of a short(er :-)) post.) >

Re: resolve environment variables in string - regular expression

2007-02-09 Thread Paul McGuire
On Feb 9, 6:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 9 fév, 12:30, "Kai Rosenthal" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > how can I resolve envionment variables in a string. > > e.g. > > > strVar = /myVar > > resolve in > > nothing. This raises a SyntaxError. Python is *not

Re: Matching Strings

2007-02-09 Thread Paul McGuire
On Feb 9, 6:03 pm, [EMAIL PROTECTED] wrote: > I'm not sure how to change a string so that it matches another one. > > My application (using wxPython and SQLite3 via pysqlite2) needs to compare > a string selected from the database into a list of tuples with another > string selected in a displa

Re: Matching Strings

2007-02-09 Thread Larry Bates
rshepard-at-appl-ecosys.com wrote: > On 2007-02-10, [EMAIL PROTECTED] wrote: > >> if item == selName: > > Slicing doesn't seem to do anything -- if I've done it correctly. I > changed the above to read, > > if item[2:-2] == selName: > > but the output's the same. > > Rich Use th

Re: Matching Strings

2007-02-09 Thread Gabriel Genellina
En Fri, 09 Feb 2007 21:03:32 -0300, <[EMAIL PROTECTED]> escribió: > I'm not sure how to change a string so that it matches another one. > > My application (using wxPython and SQLite3 via pysqlite2) needs to > compare > a string selected from the database into a list of tuples with another

Re: Matching Strings

2007-02-09 Thread rshepard-at-appl-ecosys . com
On 2007-02-10, James Stroud <[EMAIL PROTECTED]> wrote: > Assuming item is "(u'ground water',)" > > import re > item = re.compile(r"\(u'([^']*)',\)").search(item).group(1) James, I solved the problem when some experimentation reminded me that 'item' is a list index and not a string variable. by

Re: Matching Strings

2007-02-09 Thread John Machin
On Feb 10, 11:03 am, [EMAIL PROTECTED] wrote: > I'm not sure how to change a string so that it matches another one. > > My application (using wxPython and SQLite3 via pysqlite2) needs to compare > a string selected from the database into a list of tuples with another > string selected in a disp

Re: Matching Strings

2007-02-09 Thread John Machin
On Feb 10, 12:01 pm, rshepard-at-appl-ecosys.com wrote: > On 2007-02-10, James Stroud <[EMAIL PROTECTED]> wrote: > > > Assuming item is "(u'ground water',)" > > > import re > > item = re.compile(r"\(u'([^']*)',\)").search(item).group(1) > > James, > > I solved the problem when some experimentatio

Re: Matching Strings

2007-02-09 Thread John Machin
On Feb 10, 11:58 am, Larry Bates <[EMAIL PROTECTED]> wrote: > rshepard-at-appl-ecosys.com wrote: > > On 2007-02-10, [EMAIL PROTECTED] wrote: > > >> if item == selName: > > > Slicing doesn't seem to do anything -- if I've done it correctly. I > > changed the above to read, > > >if item[2

Re: Calling J from Python

2007-02-09 Thread bearophileHUGS
ant: > and in debugging it far outweighs the time you'd spend on all > of that typing in a clean but more verbose language such as Python. Typing time counts a bit too. A language like Java is even more verbose than Python, and that probably slows down the actual programming, compared to less verb

Re: Matching Strings

2007-02-09 Thread Steven D'Aprano
On Fri, 09 Feb 2007 16:17:31 -0800, James Stroud wrote: > Assuming item is "(u'ground water',)" > > import re > item = re.compile(r"\(u'([^']*)',\)").search(item).group(1) Using a regex is a lot of overhead for a very simple operation. If item is the string "(u'ground water',)" then item[3:-3]

Re: Calling J from Python

2007-02-09 Thread George Sakkis
On Feb 9, 9:20 pm, [EMAIL PROTECTED] wrote: > ant: > > > and in debugging it far outweighs the time you'd spend on all > > of that typing in a clean but more verbose language such as Python. > > Typing time counts a bit too. A language like Java is even more > verbose than Python, and that probably

Re: Calling J from Python

2007-02-09 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: > On Thu, 8 Feb 2007 10:55:17 +0200, "Hendrik van Rooyen" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > I am under the impression that Loki had a daughter called Hel ... > > > One of his few "normal" offspring... After al

Re: pygame and python 2.5

2007-02-09 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: "Ben Sizer" <[EMAIL PROTECTED]> wrote: > Ben> Python extensions written in C require recompilation for each new > Ben> version of Python, due to Python limitations. > > Can you propose a means to eliminate this limitation? > Yes. - Instead of calling someth

Re: Can Parallel Python run on a muti-CPU server ?

2007-02-09 Thread parallelpython
Hi, That is definitely possible! To achieve the best performance split your calculation either into 128 equal parts or int >>128 part of any size (then load balancing will spread workload equally). Let us know the results, if need any help with parallelization feel free to request it here: http://

LoadLibrary(pythondll) failed

2007-02-09 Thread acncgc
I get an following error as I turn on my laptop; LoadLibrary(pythondll) failed After this error internet browser ( IE or mozilla) doesn't connect. I can't browse any site. Any idea?? -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and python 2.5

2007-02-09 Thread [EMAIL PROTECTED]
On Feb 9, 11:39�am, "Ben Sizer" <[EMAIL PROTECTED]> wrote: > On Feb 9, 1:48 pm, "siggi" <[EMAIL PROTECTED]> wrote: > > > @Ben Sizer > > Lucky I spotted this... > > > As a Python (and programming ) newbie �allow me a �- certainly naive - > > question: > > > What is this time consuming part of recomp

Embedding, "import site", PYTHONHOME, and an old, old issue

2007-02-09 Thread Jim Hill
Well, I've found about a hundred thousand web pages where people have had the same problem I have but nary a page with a solution that works for me. I want to do a simple embed, so I've followed the example in the Extending and Embedding documentation: In the .c file, #include int routine() {

Re: Embedding, "import site", PYTHONHOME, and an old, old issue

2007-02-09 Thread Jim Hill
Jim Hill (that'd be me) wrote: I forgot one more key thing: the compiled code is being run via mpirun (LAM/MPI). Might that have something to do with my pain and heartache? Jim (original post reproduced below in shocking breach of etiquette on the off chance someone's interested in this post a

pycallgraph 0.2.0

2007-02-09 Thread Gerald Kaszuba
Hi I just released a new version of pycallgraph. It has many improvements over 0.1.0. Here is an example of a call graph made in pycallgraph 0.2.0: http://pycallgraph.slowchop.com/pycallgraph/wiki/RegExpExample There are more examples on the web site: http://pycallgraph.slowchop.com/ The changes

Re: pygame and python 2.5: switch to linux?

2007-02-09 Thread Siggi
"Ben Sizer" wrote: [snip] > Hopefully in the future, some of those convoluted steps will be fixed, > but that requires someone putting in the effort to do so. As is often > the case with Python, and indeed many open source projects, the people > who are knowledgeable enough to do such things usuall

Re: Retry:Question about optparse/OptionParser callback.

2007-02-09 Thread Peter Otten
Steven W. Orr wrote: > I decided I could be more articulate. I hope this helps. In case James did not guess right: try to provide more details about /what/ you want to achieve rather than /how/ you want to get there. And please don't open a third thread for it. Peter -- http://mail.python.org/

<    1   2