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/

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

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: 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

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: 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

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: 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://

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: 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: 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: 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 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 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: 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: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 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 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 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 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: multithreading concept

2007-02-09 Thread sturlamolden
On Feb 9, 4:00 pm, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > I am sorry if I sound foolish. > Suppose I split my Net application code using parallel python into several > processes based upon the number of CPU available. That means a single socket > descriptor is distributed across all processes.

Re: A little more advanced for loop

2007-02-09 Thread Larry Bates
Horta wrote: > On Feb 9, 9:00 am, Stephan Diehl <[EMAIL PROTECTED]> wrote: >> Horta wrote: >>> Hi folks, >>> Suppose I have to loop over 3 lists being the same size at the same >>> time and order. How can I do that without using the range() function >>> or whatever indexing? >>> Example using

Re: huge amounts of pure Python code broken by Python 2.5?

2007-02-09 Thread Klaas
On Feb 8, 6:37 pm, "kernel1983" <[EMAIL PROTECTED]> wrote: > On Feb 9, 10:29 am, "Klaas" <[EMAIL PROTECTED]> wrote: > > The changes listed dont' seem particularly huge considering the size, > > complexity, and boundary-pushingness of Twisted, coupled with the > > magnitude of the 2.5 release. > >

Re: interacting with shell - another newbie question

2007-02-09 Thread Larry Bates
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

Re: Database Programming with Python

2007-02-09 Thread fumanchu
On Feb 9, 11:03 am, [EMAIL PROTECTED] wrote: > There are no examples of Dejavu that I found yet. I have installed it > but don't know how to use or call its functions. Read http://projects.amor.org/docs/dejavu/1.5.0RC1/ to learn how to use Dejavu. It's short and should at least give you an idea wh

Re: python linux distro

2007-02-09 Thread Szabolcs Nagy
> Now what would be interesting (and *really* crazy) would be Linux (or > BSD or whatever) distro written almost entirely *in* Python, with the > goal of eliminating as much bash/sh as possible. > > That would be fun. actually there was(is) an os whitch is written "almost entirely *in* Python": h

Re: pygame and python 2.5

2007-02-09 Thread bearophileHUGS
Skip: > Python used to work that way. You'd then silently get errors if the API > changed between version A and version B and you neglected to recompile the > extensions you compiled against version A. Can't the compiled module have one or more test functions that can be used during linking to se

Re: Django, one more newbie question

2007-02-09 Thread Robert Kern
Boris Ozegovic wrote: > Umm, can somebody tell me which language is this one: > > {% if latest_poll_list %} > > {% for poll in latest_poll_list %} > {{ poll.question }} > {% endfor %} > > {% else %} > No polls are available. > {% endif %} > > Whole tutorial is on thi

Django, one more newbie question

2007-02-09 Thread Boris Ozegovic
Umm, can somebody tell me which language is this one: {% if latest_poll_list %} {% for poll in latest_poll_list %} {{ poll.question }} {% endfor %} {% else %} No polls are available. {% endif %} Whole tutorial is on this page: http://www.djangoproject.com/documentati

Retry:Question about optparse/OptionParser callback.

2007-02-09 Thread Steven W. Orr
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 like this: parser.add_option("-b"

Re: pygame and python 2.5

2007-02-09 Thread skip
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 application. Python used to work that way. You'd then

interacting with shell - another newbie question

2007-02-09 Thread James
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 password, then I have to sel

Re: Sending CTRL-C event to console application

2007-02-09 Thread Daniel Clark
On Feb 9, 9:12 am, "Daniel Clark" <[EMAIL PROTECTED]> wrote: > I'm going to try taking a different approach by using a GUI Automation > tool like WATSUP [1] or pywinauto[2] next. This works: AutoIT [1] code (compiled to an executable): Run(@ComSpec & ' /k ' & $CmdLineRaw ) This was necessary

[pywin32] - Excel COM problem

2007-02-09 Thread Andrea Gavana
Hi All, I have a very simple python script that tries to put a rectangular shape in a worksheet and then add some text inside that shape. The main problem, is that as usual Excel doesn't like input strings longer than 200 and something characters. So, by just recording a macro in Excel, I tried

Re: os.popen and broken pipes

2007-02-09 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Philipp Pagel <[EMAIL PROTECTED]> wrote: > Antoon Pardon <[EMAIL PROTECTED]> wrote: > > On 2007-02-09, Philipp Pagel <[EMAIL PROTECTED]> wrote: > > > for filename in file_list: > > > file = os.popen('uncompress -c '+filename, 'r') > > > do_something(file) >

Re: ANN: Wing IDE 2.1.4 Released

2007-02-09 Thread Robert Kern
Damjan wrote: >> This is a bug fix release that among other things fixes handling of >> UTF-8 byte order marks, > > What are UTF-8 byte order marks ?!? > There's only one order in the UTF-8 bytes! It's a misnomer, but one that persists. http://unicode.org/unicode/faq/utf_bom.html#29 -- Rob

Re: ANN: Wing IDE 2.1.4 Released

2007-02-09 Thread Damjan
> This is a bug fix release that among other things fixes handling of > UTF-8 byte order marks, What are UTF-8 byte order marks ?!? There's only one order in the UTF-8 bytes! -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and python 2.5

2007-02-09 Thread Ben Sizer
On Feb 9, 5:53 pm, [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? By putting an intermediate layer between the extensions and th

Re: python linux distro

2007-02-09 Thread [EMAIL PROTECTED]
Try this. It's a pre-build VMware image. Torrent hasn't worked for me. I tracked down a physical copy. http://www.vmware.com/vmtn/appliances/directory/289 -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and python 2.5

2007-02-09 Thread skip
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? Mike> Sure, write your wrapper-style extensions in ctypes :). I was think more along the lines of ho

Re: Thanks to all

2007-02-09 Thread Grant Edwards
On 2007-02-09, jiddu <[EMAIL PROTECTED]> wrote: > Thanks for all the input guys, I know it is difficult, but the > calculators and statistic sites/books are missing some things > which I need for my play so I guess I have no choice but to > study up and work. You're most welcome. Though I really

Re: Best Free and Open Source Python IDE

2007-02-09 Thread Stef Mientki
Szabolcs Nagy wrote: > Srikanth wrote: >> Yes, >> >> All I need is a good IDE, I can't find something like Eclipse (JDT). >> Eclipse has a Python IDE plug-in but it's not that great. Please >> recommend. >> >> Thanks, >> Srikanth > > try pida > http://pida.co.uk/index.php/Main_Page > nice idea to

Re: Referencing vars, methods and classes by name

2007-02-09 Thread Terry Reedy
"Sagari" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Thanks to everyone for all the comments. I am migrating from PHP to | Python and I am looking for the means to port a controller code that | would, roughly speaking, call a certain method of a certain class | (both class and m

Re: pygame and python 2.5

2007-02-09 Thread Mike C. Fletcher
[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? > Sure, write your wrapper-style extensions in ctypes :) . For example, pygam

Thanks to all

2007-02-09 Thread jiddu
Thanks for all the input guys, I know it is difficult, but the calculators and statistic sites/books are missing some things which I need for my play so I guess I have no choice but to study up and work. When I was learning C++ I wrote some code to calculate simple things like probability of 1 or

Re: from __future__ import absolute_import ?

2007-02-09 Thread Ron Adam
Peter Otten wrote: > Ron Adam wrote: > >> Peter Otten wrote: >>> Ron Adam wrote: >>> work | |- foo.py# print "foo not in bar" | `- bar | |- __init__.py | |- foo.py# print "foo in bar" |

Re: Can't import Stackless in Pythonwin

2007-02-09 Thread Gabriel Genellina
En Fri, 09 Feb 2007 13:50:56 -0300, <[EMAIL PROTECTED]> escribió: > I am getting started in Python, and I have looked on both the > stackless page and python.org and cannot find the answer to what I > think is a simple problem. > > If I start the python command line or idle, i can import stac

Re: Database Programming with Python

2007-02-09 Thread Finger . Octopus
> You could use Dejavu 1.5, which has its own wrapper [1] for ADO (both > MS Access and SQL Server/MSDE). No ODBC necessary or desired. > > If you want an ADO wrapper without the full Dejavu ORM, it's possible > (but not heavily documented) to use dejavu's geniusql layer on its > own. That would gi

Re: Best Free and Open Source Python IDE

2007-02-09 Thread Szabolcs Nagy
Srikanth wrote: > Yes, > > All I need is a good IDE, I can't find something like Eclipse (JDT). > Eclipse has a Python IDE plug-in but it's not that great. Please > recommend. > > Thanks, > Srikanth try pida http://pida.co.uk/index.php/Main_Page -- http://mail.python.org/mailman/listinfo/python

ANN: Wing IDE 2.1.4 Released

2007-02-09 Thread Wingware Announce
Hi, I'm happy to announce version 2.1.4 of Wing IDE, an integrated development environment for the Python programming language. This is a bug fix release that among other things fixes handling of UTF-8 byte order marks, improves auto-completion for PyQt 4, reports exceptions correctly in Pytho

Re: Best Free and Open Source Python IDE

2007-02-09 Thread km
check out SPE (StanisPpython Editor) KM On 9 Feb 2007 10:43:00 -0800, Bastos <[EMAIL PROTECTED]> wrote: On Feb 8, 10:03 am, "Srikanth" <[EMAIL PROTECTED]> wrote: > Yes, > > All I need is a good IDE, I can't find something like Eclipse (JDT). > Eclipse has a Python IDE plug-in but it's not that

Re: Best Free and Open Source Python IDE

2007-02-09 Thread Bastos
On Feb 8, 10:03 am, "Srikanth" <[EMAIL PROTECTED]> wrote: > Yes, > > All I need is a good IDE, I can't find something like Eclipse (JDT). > Eclipse has a Python IDE plug-in but it's not that great. Please > recommend. > > Thanks, > Srikanth Gedit and some plugins, definitely. -- http://mail.pyth

Re: pygame and python 2.5

2007-02-09 Thread John Nagle
Ben Sizer wrote: > The problem is something like this: > - Python extensions written in C require recompilation for each new > version of Python, due to Python limitations. > - Recompiling such an extension requires you to have a C compiler set > up on your local machine. > - Windows doesn't co

Re: pygame and python 2.5

2007-02-09 Thread skip
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? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and python 2.5

2007-02-09 Thread Ben Sizer
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 recompiling an extension, such as > Pygame, from source code to Windows? Is it a

Re: Database Programming with Python

2007-02-09 Thread fumanchu
On Feb 9, 7:28 am, [EMAIL PROTECTED] wrote: > I wanted to connect Python to Ms-Access database using ADO or ODBC. I > have Python 2.5 and on mxODBC site, it has no higher version build > than 2.4. Moreoever, mxODBC is required for ADODB. > Can anyone guide me on this what should I do to make it wor

Can't import Stackless in Pythonwin

2007-02-09 Thread archaegeo
I am getting started in Python, and I have looked on both the stackless page and python.org and cannot find the answer to what I think is a simple problem. If I start the python command line or idle, i can >>>import stackless If I start pythonwin I get the following error ...No Module named Stack

Question about optparse/OptionParser callback.

2007-02-09 Thread Steven W. Orr
I'm new to python and I have a need to do this. The Cookbook almost takes me there with: def check_order(option, opt_str, value, parser): if parser.values.b: raise OptionValueError("can't use %s after -b" % opt_str) setattr(parser.values, option.dest, 1) but warns that the "it

Re: *** Short Course: THE SECRET HISTORY OF THE UNITED STATES OF AMERICA ***

2007-02-09 Thread thermate2
Excellent Course Professor !!! On Jan 9, 7:28 pm, [EMAIL PROTECTED] wrote: > Here is a short course, enjoyment and fun: > > Audio speech by Benjamin Freedman in his own voice you can hear here : > > http://video.google.com/videoplay?docid=3552214685532803163&q > > Free Science History Ebook: THE M

Re: Calling J from Python

2007-02-09 Thread Alexander Schmolck
[restoring context] "Ant" <[EMAIL PROTECTED]> writes: > > On Feb 6, 12:21 am, greg <[EMAIL PROTECTED]> wrote: > > > > Alexander Schmolck wrote: > > > For example I once wrote this (slow) code to display > > > part of a mandelbrot fractal: > > > load'viewmat' > > > viewmat+/2&>:|((j.~/~(%~i:

MOSSAD AND 911 - Zack was the anthrax mailer ?

2007-02-09 Thread stj911
WHAT DID ISRAEL KNOW IN ADVANCE OF THE SEPTEMBER 11 ATTACKS? * Those Celebrating "Movers" and Art Student Spies * Who were the Israelis living next to Mohammed Atta? * What was in that Moving Van on the New Jersey shore? * How did two hijackers end up on the Watch List weeks before 9/11? At

Re: multithreading concept

2007-02-09 Thread Paul Rubin
"S.Mohideen" <[EMAIL PROTECTED]> writes: > Suppose I split my Net application code using parallel python into > several processes based upon the number of CPU available. That means a > single socket descriptor is distributed across all processes. Is > parallelity can be acheived using the processes

NYC Python User Group Meeting

2007-02-09 Thread John Clark
Greetings! The next New York City Python Users Group meeting is this Tuesday, Feb. 13th, 6:30pm at at the Millennium Partners office at 666 Fifth Avenue (53rd St. and 5th Ave.) on the 8th Floor. We welcome all those in the NYC area who are interested in Python to attend. However, we need a list of

Re: pyExcelerator - Protecting Cells

2007-02-09 Thread John Machin
On 9/02/2007 6:36 PM, Chris wrote: > I'm sitting with a bit of an issue with pyExcelerator and creating an > Excel file with certain cells protected while the rest of the > spreadsheet is password protected. > > The Protection class under Formatting has 2 variables for cell_locked > and formula_hi

Database Programming with Python

2007-02-09 Thread Finger . Octopus
Hi I wanted to connect Python to Ms-Access database using ADO or ODBC. I have Python 2.5 and on mxODBC site, it has no higher version build than 2.4. Moreoever, mxODBC is required for ADODB. Can anyone guide me on this what should I do to make it work on Python 2.5? I have python 2.5 running on se

Re: pycallgraph 0.1.0

2007-02-09 Thread Gerald Kaszuba
On 2/10/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > ... but isn't "__main__." non-information ? Good point -- I'll consider removing it in the next version. Gerald -- http://mail.python.org/mailman/listinfo/python-list

Re: multithreading concept

2007-02-09 Thread S.Mohideen
I am sorry if I sound foolish. Suppose I split my Net application code using parallel python into several processes based upon the number of CPU available. That means a single socket descriptor is distributed across all processes. Is parallelity can be acheived using the processes send/recv on t

Re: unique elements from list of lists

2007-02-09 Thread Tekkaman
Thanks everybody! Azrael: your suggestions involve python-level membership testing and dummy list construction just like my uniter3 example, so I'm afraid they would not go any faster. There's no built-in sequence flattening function that I know of btw. bearophile: your implementation is very simil

Re: Is Python for me?

2007-02-09 Thread Neil Cerutti
On 2007-02-09, jiddu <[EMAIL PROTECTED]> wrote: > Hi, > > I'm planning to create a poker calculator, I learned some basic > in highschool years ago and I was told for beginners Python is > a good language to start. Python *is* a good language to start. > What I wanted to do is to first write a pr

Re: doctests for interactive functions

2007-02-09 Thread Neil Cerutti
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.) Yes, this is a good way to think about it. Separate input from val

Re: excel find last column

2007-02-09 Thread Tim Golden
Lance Hoffmeyer wrote: > I ran makepy.py and loaded Microsoft Excel Object Library 11.0 > I have imported: > > import win32com.client > from win32com.client import constants > import re > import codecs,win32com.client > import time > import datetime > import win32com.client.dynamic > > > using t

Re: pycallgraph 0.1.0

2007-02-09 Thread Stef Mientki
Gerald Kaszuba wrote: > Hi > > I've just released the first version of Python Call Graph. I haven't > tested it too much so don't expect it not to crash :) > > An example of its output is: > http://pycallgraph.slowchop.com/files/examples/mongballs-client.png > > It's easy to use... you just need

Re: Glob returning an empty list when passed a variable

2007-02-09 Thread Neil Webster
On 9 Feb, 14:15, Steve Holden <[EMAIL PROTECTED]> wrote: > Neil Webster wrote: > > Hi, > > > I was wondering whether anybody could help me out. > > > I have a program, for part of it I am trying to pass a variable to a > > glob function, this returns an empty list. The strange thing is when > > I

Re: python shelve on win vs unix

2007-02-09 Thread Istvan Albert
On Feb 9, 6:06 am, Tor Erik Soenvisen <[EMAIL PROTECTED]> wrote: > Any suggestions for a quick and dirty solution (such as alternatives to > shelve for persistent storage) to this problem would be appreciated. the easiest might be to just pickle your data into files. You could also use Durus htt

Re: Glob returning an empty list when passed a variable

2007-02-09 Thread Steve Holden
Neil Webster wrote: > Hi, > > I was wondering whether anybody could help me out. > > I have a program, for part of it I am trying to pass a variable to a > glob function, this returns an empty list. The strange thing is when > I hard code in the variable the glob section works. > > Does anybody

Re: Glob returning an empty list when passed a variable

2007-02-09 Thread Philipp Pagel
Neil Webster <[EMAIL PROTECTED]> wrote: > area_name_string = '"*% s*"' % (Area_name) > os.chdir(Input) > filename = glob.glob(area_name_string) Too many quotation marks. >>> Area_name='Foo' >>> '"*% s*"' % (Area_name) '"*Foo*"' Unless there are files with funny names containing '"' you will not

Re: Sending CTRL-C event to console application

2007-02-09 Thread Daniel Clark
On Feb 8, 9:12 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 08 Feb 2007 15:54:05 -0300, Daniel Clark <[EMAIL PROTECTED]> > escribió: > > I have a Windows command line based application that only shuts down > > cleanly if it sees "CTRL-C" on the console. I need to automate the > > ru

Re: TimedRotatingFileHandler() isn't rotating at midnight?

2007-02-09 Thread skip
>> Rotating should happen when the logging process creates the handler >> before midnight and makes a logging call destined for that handler >> after midnight. Chris> Ah, then maybe I'm expecting the wrong thing. The python code is Chris> invoked from cron every 10 minutes or

Re: TimedRotatingFileHandler() isn't rotating at midnight?

2007-02-09 Thread Chris Shenton
"Vinay Sajip" <[EMAIL PROTECTED]> writes: > It might. I assume you have a long-running process which runs past > midnight - that's the scenario that TimedRotatingFileHandler is meant > for. Can you post a complete minimal example which shows the problem? > Rotating should happen when the logging

Glob returning an empty list when passed a variable

2007-02-09 Thread Neil Webster
Hi, I was wondering whether anybody could help me out. I have a program, for part of it I am trying to pass a variable to a glob function, this returns an empty list. The strange thing is when I hard code in the variable the glob section works. Does anybody have any ideas as why it is not worki

Re: excel find last column

2007-02-09 Thread Lance Hoffmeyer
I ran makepy.py and loaded Microsoft Excel Object Library 11.0 I have imported: import win32com.client from win32com.client import constants import re import codecs,win32com.client import time import datetime import win32com.client.dynamic using this expression lastcol = sh.UsedRange.Find("*",

Re: unique elements from list of lists

2007-02-09 Thread bearophileHUGS
Tekkaman: If the sublists contain hashable elements you can use this: def uniter(lists): merge = set() for sub in lists: merge = merge.union(sub) for el in merge: yield el data = [['a', 'b', 'd'], ['b', 'c'], ['a', 'c', 'd']] print list(uniter(data)) But often this t

pygame and python 2.5

2007-02-09 Thread siggi
@Ben Sizer Hi Ben, in January I received your message re Pygame and Python 2.5: >pygame and python 2.5 >Ben Sizer kylotan at gmail.com >Fri Jan 12 11:01:00 CET 2007 > > >siggi wrote: > >> when I rtry to install pygam

pycallgraph 0.1.0

2007-02-09 Thread Gerald Kaszuba
Hi I've just released the first version of Python Call Graph. I haven't tested it too much so don't expect it not to crash :) An example of its output is: http://pycallgraph.slowchop.com/files/examples/mongballs-client.png It's easy to use... you just need Graphviz installed and in your path and

Re: UNIX shell in Python?

2007-02-09 Thread Deniz Dogan
Bart Ogryczak wrote: > On Feb 9, 8:49 am, Deniz Dogan <[EMAIL PROTECTED]> wrote: >> Hello. >> >> I was thinking about writing a UNIX shell program using Python. Has >> anyone got any experience on this? Is it even possible? > > Use the Google, Luke. > http://sourceforge.net/projects/pyshell/ >

Re: Strings in Python

2007-02-09 Thread Johny
Thanks ALL for help and ideas L -- http://mail.python.org/mailman/listinfo/python-list

Re: Object type check

2007-02-09 Thread Steven D'Aprano
On Thu, 08 Feb 2007 03:00:39 -0800, king kikapu wrote: >> def modify(list_of_x): >> for x in list_of_x: >> try: >> x.change_in_place # don't call the method, just check it exists > > XX...what exactly is going on here ? I mean, what is actually > happens if you omit t

Re: Newbie Question

2007-02-09 Thread Stef Mientki
>> will explain the rest > > Delphi is a (dying) proprietary, MS-Windows-only[1] software relying > on a low-level language. > Well it may be dying, but for the moment it beats Python with a factor of 10, when it comes to user (the majority of PC users) friendly GUI ;-) cheers Stef Mientki -- h

Re: Is Python for me?

2007-02-09 Thread [EMAIL PROTECTED]
On Feb 9, 5:08 am, "jiddu" <[EMAIL PROTECTED]> wrote: > I'm planning to create a poker calculator, I learned some basic in > highschool years ago and I was told for beginners Python is a good > language to start. Be sure to check out the Python411 podcast http://awaretek.com/python/index.html Tak

  1   2   >