Re: ANN: Wing IDE 3.2.3 released

2009-12-10 Thread Jean Guillaume Pyraksos
In article , Wingware wrote: > http://wingware.com/downloads/wingide-101/3.2 No Cocoa version for MacOS-X ? Shall we have to use X11 in 2009 ? How come ? JG -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing html with Beautifulsoup

2009-12-10 Thread Johann Spies
Gabriel Genellina het geskryf: En Thu, 10 Dec 2009 06:15:19 -0300, Johann Spies escribió: How do I get Beautifulsoup to render (taking the above line as example) sunentint for  sunetint and still provide the text-parts in the 's with plain text? Hard to tell if we don't see what's inside

Re: How do I Block Events in wxPython

2009-12-10 Thread Frank Millman
Stephen Hansen wrote: > > Well if you have a legitimate case for pre-empting the event loop with > these > periodic regular short blocking moments (it seems you may), I think what > you > want to do is overwrite FilterEvent on your App object. You can then make > that flag something you set on th

Re: When will Python 3 be fully deployed

2009-12-10 Thread Ben Finney
"Gabriel Genellina" writes: > In addition to Ned Deily's previous comments, I'd like to note that > 2to3 assumes the source is valid 2.6 code - you have to ensure the > code runs fine with Python 2.6 before using 2to3 to convert to 3.x To achieve that, you're strongly encouraged to follow Step 0

New user documentation for ‘python-daemon ’ (was: daemon.DaemonContext and logging)

2009-12-10 Thread Ben Finney
Sean DiZazzo writes: > On Dec 10, 5:37 pm, Sean DiZazzo wrote: > > I'm finally getting around to trying out the python-daemon module > > and have hit a wall.  I'm trying to set up logging inside of the > > "with daemon.DaemonContext" block.  But when I try to use a logger > > inside the block it

Re: umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread Robert Kern
On 2009-12-10 17:41 PM, hardcoreUFO wrote: On Dec 11, 12:29 pm, Robert Kern wrote: Don't specify LDFLAGS if you don't have to. It is obliterating the -l flag for the npy_math library that numpy builds internally and tries to link with. Unfortunately, that did not eliminate the error. I though

Re: umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread Robert Kern
On 2009-12-10 17:33 PM, hardcoreUFO wrote: Thanks Robert. I was not able to solve the problem on the Numpy list, so I had to broaden the search.Will try what you suggest, though. There's no one here who can help you with this who isn't on the numpy list. -- Robert Kern "I have come to believ

pyZui - anyone know about this?

2009-12-10 Thread Donn
Hi, I happened upon this youtube link: http://www.youtube.com/watch?v=57nWm984wdY It fairly blew my socks off. In it a fellow by the name of David Roberts demos a zui written in Python. Aside from the zooming (which is impressive enough) it show embedding of images, pdf files, web pages and text.

Re: daemon.DaemonContext and logging

2009-12-10 Thread Sean DiZazzo
On Dec 10, 5:37 pm, Sean DiZazzo wrote: > I'm finally getting around to trying out the python-daemon module and > have hit a wall.  I'm trying to set up logging inside of the "with > daemon.DaemonContext" block.  But when I try to use a logger inside > the block it throws an error: Got it! The D

Re: IndentationError

2009-12-10 Thread Peter Pearson
On Fri, 11 Dec 2009 12:57:15 +1100, Lie Ryan wrote: > On 12/10/2009 6:32 AM, hong zhang wrote: >> List, >> >> I got error says IndentationError in end of line. >> I could not figure out why. See following: >> >> $ ./cont-mcs >>File "./cont-mcs", line 264 >> mcs1 = ht_val+cck_val+green_val

CherryPy work with 64-bit version of Python 2.6?

2009-12-10 Thread python
Anyone know if CherryPy works with the 64-bit version of Python 2.6? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Runtime load python modules from memory

2009-12-10 Thread Gabriel Genellina
En Thu, 10 Dec 2009 12:13:15 -0300, scream...@gmail.com escribió: Is it possible to load python module from memory? For example, I can read python .pyc file into memory, preprocess it ( decrypt :-) ), and then import it. Is it possible? Sure. Frozen modules are exactly that; see Tools/fre

Re: switch

2009-12-10 Thread John Bokma
Tim Chase writes: Please don't delete attribution line(s), added: Asun Friere writes: >> >> phone.update_from_record(record) >> >> This switch statement belongs to one guy. One guy who wants to know >> how to do everything that needs to be done to Phones no matter who >> asks > > T

Re: Parsing html with Beautifulsoup

2009-12-10 Thread Gabriel Genellina
En Thu, 10 Dec 2009 06:15:19 -0300, Johann Spies escribió: How do I get Beautifulsoup to render (taking the above line as example) sunentint for  sunetint and still provide the text-parts in the 's with plain text? Hard to tell if we don't see what's inside those 's - please provide at

Re: When will Python 3 be fully deployed

2009-12-10 Thread Gabriel Genellina
En Thu, 10 Dec 2009 05:18:13 -0300, John Nagle escribió: Luis M. González wrote: On Dec 6, 3:21 pm, vsoler wrote: I'd argue against using Python 2.6 for production work. Either use Python 2.5, which is stable, or 3.x, which is bleeding-edge. 2.6 has some of the features of Python

Re: KeyboardInterrupt

2009-12-10 Thread Gabriel Genellina
En Thu, 10 Dec 2009 20:43:48 -0300, mattia escribió: Il Thu, 10 Dec 2009 23:10:02 +, Matthew Barnett ha scritto: Only the main thread can receive the keyboard interrupt. Ok, so is there any way to stop all the threads if the keyboard interrupt is received? If all other threads (except

Re: KeyboardInterrupt

2009-12-10 Thread Lie Ryan
On 12/11/2009 10:43 AM, mattia wrote: Ok, so is there any way to stop all the threads if the keyboard interrupt is received? You can't stop a thread from outside. The thread has to end itself (by ending the function). Usually, in the thread, you will check the value of a variable. If it's fal

Re: Porting pyftpdlib to Python 3.x: question about tarball naming convention

2009-12-10 Thread Gabriel Genellina
En Wed, 09 Dec 2009 20:13:17 -0300, Giampaolo Rodola' escribió: I've started the (hard) process of porting pyftpdlib [1] to Python 3. In order to do that I'm working on a separate SVN branch and I plan to maintain two different releases of my software, one for 2.x and another one for 3.x. I

Re: using freeze.py with python3

2009-12-10 Thread Gabriel Genellina
En Wed, 09 Dec 2009 17:04:45 -0300, Patrick Stinson escribió: Has anyone tried using Python-3.1.1/Tools/freeze/freeze.py with the encodings package? It appears that encodings is required to intialize the interpreter, but PyImport_ImportFrozenModule is failing for the "encodings" module in mar

daemon.DaemonContext and logging

2009-12-10 Thread Sean DiZazzo
I'm finally getting around to trying out the python-daemon module and have hit a wall. I'm trying to set up logging inside of the "with daemon.DaemonContext" block. But when I try to use a logger inside the block it throws an error: ~~ from __future__ import with_

Re: IndentationError

2009-12-10 Thread Gabriel Genellina
En Wed, 09 Dec 2009 16:32:18 -0300, hong zhang escribió: I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val

urllib post and redirect = fail

2009-12-10 Thread LoD MoD
I'm trying to do a post to log into a simple admin console. All I get is a simple you need to log in error. I already mapped the form id's to make sure they are correct, but it still seems to deny. I know mechanize would probably do a better job of this than urllib, but their docs for python aren't

Re: Float precision and float equality

2009-12-10 Thread Raymond Hettinger
[Carl Banks] > > You're talking about machine epsilon?  I think everyone else here is > > talking about a number that is small relative to the expected smallest > > scale of the calculation. That was also my reading of the OP's question. The suggestion to use round() was along the lines of perfor

Re: IndentationError

2009-12-10 Thread Terry Reedy
hong zhang wrote: List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError: unindent do

Re: freeze in python3

2009-12-10 Thread Patrick Stinson
awesome! On Thu, Dec 10, 2009 at 2:17 PM, Martin v. Loewis wrote: >> For example, initerrno should now be PyInit_errno. Am I missing something? > > No; freeze hasn't been ported to Python 3 yet. Contributions are welcome. > > Regards, > Martin > -- > http://mail.python.org/mailman/listinfo/python

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-10 Thread Valery
Hi Klauss, > How's the layout of your data, in terms # of objects vs. bytes used? dict (or list) of 10K-100K objects. The objects are lists or dicts. The whole structure eats up to 2+ Gb RAM > Just to have an idea of the overhead involved in refcount > externalization (you know, what I mentione

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-10 Thread Klauss
On Dec 9, 11:58 am, Valery wrote: > Hi all, > > Q: how to organize parallel accesses to a huge common read-only Python > data structure? > > Details: > > I have a huge data structure that takes >50% of RAM. > My goal is to have many computational threads (or processes) that can > have an efficient

Re: KeyboardInterrupt

2009-12-10 Thread mattia
Il Wed, 09 Dec 2009 16:19:24 -0800, Jon Clements ha scritto: > On Dec 9, 11:53 pm, mattia wrote: >> Hi all, can you provide me a simple code snippet to interrupt the >> execution of my program catching the KeyboardInterrupt signal? >> >> Thanks, >> Mattia > > Errr, normally you can just catch th

Re: KeyboardInterrupt

2009-12-10 Thread Jon Clements
On Dec 9, 11:53 pm, mattia wrote: > Hi all, can you provide me a simple code snippet to interrupt the > execution of my program catching the KeyboardInterrupt signal? > > Thanks, > Mattia Errr, normally you can just catch the KeyboardInterrupt exception -- is that what you mean? Jon. -- http://

Re: Implementation suggestions for creating a Hierarchical circuit database

2009-12-10 Thread Keith Thompson
nick writes: > I am writing a personal software that will read circuit design/ > netlist. I will be using the MCNC benchmarks that contain different > types of designs in SPICE netlist format. [snip] You cross-posted this question to comp.theory, comp.lang.c++, comp.lang.c, comp.lang.python, and

Re: Brent's variation of a factorization algorithm

2009-12-10 Thread n00m
On Dec 10, 2:59 am, Irmen de Jong wrote: > On 12/10/09 12:52 AM, n00m wrote: > > > On Dec 10, 1:11 am, Irmen de Jong  wrote: > >> 9 > >> == 27 * 37037037 > > >> What gives? Isn't this thing supposed to factor numbers into the product > >> of two primes? > > >> -irmen > > > Only if you yiel

Re: Brent's variation of a factorization algorithm

2009-12-10 Thread Irmen de Jong
On 12/10/09 12:52 AM, n00m wrote: On Dec 10, 1:11 am, Irmen de Jong wrote: 9 == 27 * 37037037 What gives? Isn't this thing supposed to factor numbers into the product of two primes? -irmen Only if you yield to it a SEMIprime =) A 'semiprime' being a product of 2 prime numbers, I s

Re: Brent's variation of a factorization algorithm

2009-12-10 Thread n00m
On Dec 10, 1:11 am, Irmen de Jong wrote: > 9 > == 27 * 37037037 > > What gives? Isn't this thing supposed to factor numbers into the product > of two primes? > > -irmen Only if you yield to it a SEMIprime =) > 27 * 37037037 Now you can apply brent() to these numbers, and so on -- http://

Re: Brent's variation of a factorization algorithm

2009-12-10 Thread n00m
PPS The code was successfully tested e.g. here: http://www.spoj.pl/ranks/FACT1/ (see my 2nd and 4th places). They confused versions: the 2nd is in Python 2.5, not 2.6.2. PPPS Funnilly... almost only Python on the 1st page =) -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: WHIFF.0.7 += GAE + jQueryUI + internationalization + testdrive = (last beta?)

2009-12-10 Thread Aaron Watters
> That was a joke in the tree view.  You clicked on the "science link" > in the tree hierarchy.  I will fix it due to your complaint. Fixed. Now clicking on the same link goes to "Scientific American". http://whiffdoc.appspot.com/ Is that humourless enough for you? :) You are now immortaliz

Implementation suggestions for creating a Hierarchical circuit database

2009-12-10 Thread nick
Hi, I am writing a personal software that will read circuit design/ netlist. I will be using the MCNC benchmarks that contain different types of designs in SPICE netlist format. I need some pointers/papers/suggestions on creating a "hierarchical" netlist database. The netlist database can, at tim

"file" does not work with the "with" statement!

2009-12-10 Thread Michele Simionato
I have just discovered that the syntax with file(name, 'w') as f: do_something(f) does not close the file at the end of the with statement! On the contrary with open(name, 'w') as f: do_something(f) works fine. The docs say "When opening a file, it’s preferable to use open() instead of in

Issues with multiprocessing

2009-12-10 Thread Joshi, Yateen
Hi, I have an application that uses multiprocessing pools (multiprocessing.Pool(processes=.)). There are multiple such pools and each pool has configurable number of processes. Once the process is spawned, it keeps on executing and does the needed processing. If there is nothing to process

IndentationError

2009-12-10 Thread hong zhang
List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError: unindent does not match any oute

Issues with multiprocessing

2009-12-10 Thread Joshi, Yateen
Hi, I have an application that uses multiprocessing pools (multiprocessing.Pool(processes=.)). There are multiple such pools and each pool has configurable number of processes. Once the process is spawned, it keeps on executing and does the needed processing. If there is nothing to process

Re: KeyboardInterrupt

2009-12-10 Thread mattia
Il Thu, 10 Dec 2009 23:10:02 +, Matthew Barnett ha scritto: > mattia wrote: >> Il Thu, 10 Dec 2009 04:56:33 +, Brad Harms ha scritto: >> >>> On Thu, 10 Dec 2009 00:29:45 +, mattia wrote: >>> Il Wed, 09 Dec 2009 16:19:24 -0800, Jon Clements ha scritto: > On Dec 9, 11:53 p

Re: umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread hardcoreUFO
On Dec 11, 12:29 pm, Robert Kern wrote: > Don't specify LDFLAGS if you don't have to. It is obliterating the -l flag for > the npy_math library that numpy builds internally and tries to link with. Unfortunately, that did not eliminate the error. I thought it was something that was changed in Nump

Re: umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread hardcoreUFO
On Dec 11, 12:29 pm, Robert Kern wrote: > On 2009-12-10 17:09 PM, hardcoreUFO wrote: > > > For the past several weeks, I have been unable to build numpy from > > source, at least nothing that works. The issue is that symbols appear > > to be missing from umath. When numpy is imported, I get the fo

Re: umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread Robert Kern
On 2009-12-10 17:09 PM, hardcoreUFO wrote: For the past several weeks, I have been unable to build numpy from source, at least nothing that works. The issue is that symbols appear to be missing from umath. When numpy is imported, I get the following: You will want to ask numpy questions on the

Re: KeyboardInterrupt

2009-12-10 Thread Matthew Barnett
mattia wrote: Il Thu, 10 Dec 2009 04:56:33 +, Brad Harms ha scritto: On Thu, 10 Dec 2009 00:29:45 +, mattia wrote: Il Wed, 09 Dec 2009 16:19:24 -0800, Jon Clements ha scritto: On Dec 9, 11:53 pm, mattia wrote: Hi all, can you provide me a simple code snippet to interrupt the execu

umath import error for Numpy builds on OSX 10.6

2009-12-10 Thread hardcoreUFO
For the past several weeks, I have been unable to build numpy from source, at least nothing that works. The issue is that symbols appear to be missing from umath. When numpy is imported, I get the following: In [1]: import numpy Tracebac

Re: KeyboardInterrupt

2009-12-10 Thread Daniel Stutzbach
On Thu, Dec 10, 2009 at 4:42 PM, mattia wrote: > def go(): >threads = [Thread(target=do_work, args=()) for _ in range(2)] >for t in threads: >t.start() >for t in threads: >t.join() > The KeyboardInterrupt goes to the main thread, which is sitting there in t.join() wit

Re: KeyboardInterrupt

2009-12-10 Thread mattia
Il Thu, 10 Dec 2009 04:56:33 +, Brad Harms ha scritto: > On Thu, 10 Dec 2009 00:29:45 +, mattia wrote: > >> Il Wed, 09 Dec 2009 16:19:24 -0800, Jon Clements ha scritto: >> >>> On Dec 9, 11:53 pm, mattia wrote: Hi all, can you provide me a simple code snippet to interrupt the e

Re: Float precision and float equality

2009-12-10 Thread Carl Banks
On Dec 10, 10:46 am, dbd wrote: > On Dec 7, 12:58 pm, Carl Banks wrote: > > > On Dec 7, 10:53 am, dbd wrote: > > > ... > > > You're talking about machine epsilon?  I think everyone else here is > > talking about a number that is small relative to the expected smallest > > scale of the calculatio

Re: freeze in python3

2009-12-10 Thread Martin v. Loewis
> For example, initerrno should now be PyInit_errno. Am I missing something? No; freeze hasn't been ported to Python 3 yet. Contributions are welcome. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing local variables from the pdb debugger

2009-12-10 Thread Lie Ryan
On 12/11/2009 12:37 AM, Jean-Michel Pichavant wrote: Diez B. Roggisch wrote: By just inserting the print foo statement right after changing foo's value, I've rolled back the value to 'foo' ??? A hell of a wtf pdb feature ! Apparently it's fixed in 2.7 and 3.1 D:\Lie Ryan\Desktop>python27 d.py

Re: Perl to Python conversion

2009-12-10 Thread Martin Schöön
Thanks all, great response! A little more background: I am not a programmer but I have done some programming in the past. This was all humble number crunching as part of my PhD project using FORTRAN. I also did some Rocky Mountain Basic coding for programs manipulating measurement instruments. An

Re: plain text parsing to html (newbie problem)

2009-12-10 Thread Lie Ryan
On 12/10/2009 11:17 PM, João wrote: Thanks for the output. akean, I've installed ipython and I'm exploring it. Thanks. Terry, from what I've read stringIO allows us to store strings in a 'virtual' file. Can you please write just 2 lines exemplifying a write to and a read from an OS level file?

Re: C to Python

2009-12-10 Thread Benjamin Peterson
Emeka gmail.com> writes: > > > Hello All, >   > I am finding it difficult getting my head around PyObject_CallObject(x,y). I need a gentle and thorough introduction to it. I also need examples. Could someone come to my need? PyObject_CallFunction is probably easier to use. http://docs.python.o

Re: Perl to Python conversion

2009-12-10 Thread J Kenneth King
martin.sch...@gmail.com (Martin Schöön) writes: > First off: I am new here and this is my first post after > lurking for quite some time. Hi. > Second off: I don't know much Python---yet. It's not a very big language. If you have experience programming in other languages, you can probably pick

Re: no module named error

2009-12-10 Thread Joe
> Your installation process is botched (no idea why, you don't show us > setup.py or anything else I asked for). Sorry, but I do know how it's currently installed is exactly the way I need it to be installed. > > > All that is missing is what I've asked you now several times before: > _moda.so

Re: Float precision and float equality

2009-12-10 Thread dbd
On Dec 7, 12:58 pm, Carl Banks wrote: > On Dec 7, 10:53 am, dbd wrote: > > ... > > You're talking about machine epsilon?  I think everyone else here is > talking about a number that is small relative to the expected smallest > scale of the calculation. > > Carl Banks When you implement an algori

ANN: Wing IDE 3.2.3 released

2009-12-10 Thread Wingware
Hi, Wingware has released version 3.2.3 of Wing IDE, our integrated development environment for the Python programming language. Wing IDE can be used on Windows, Linux, and OS X to develop Python code for web, GUI, and embedded scripting applications. Wing IDE provides auto-completion, call tip

Re: switch

2009-12-10 Thread MRAB
Steven D'Aprano wrote: On Wed, 09 Dec 2009 18:50:29 +, Nobody wrote: On Tue, 08 Dec 2009 21:02:44 -0800, Kee Nethery wrote: I string together a bunch of elif statements to simulate a switch if foo == True: blah elif bar == True: blah blah elif bar == False: blarg

Re: switch

2009-12-10 Thread Nobody
On Thu, 10 Dec 2009 05:47:19 +, Steven D'Aprano wrote: >>> I string together a bunch of elif statements to simulate a switch >>> >>> if foo == True: >>> blah >>> elif bar == True: >>> blah blah >>> elif bar == False: >>> blarg >>> elif >> >> This isn't what would normally be

Re: Moving from Python 2 to Python 3: A 4 page "cheat sheet"

2009-12-10 Thread Vinay Sajip
On Dec 3, 12:12 am, Terry Reedy wrote: > At the moment (3.1) there are, unfortunately, library packages that > require % for formatting (logging, I believe, for one). There has been > discussion on adding a new option for 3.2, but I do not know what will > happen. Depends on whether you want to be

Re: switch

2009-12-10 Thread Ethan Furman
Asun Friere wrote: On Dec 10, 2:00 pm, Carl Banks wrote: On Dec 9, 5:02 pm, Asun Friere wrote: On Dec 9, 7:08 pm, Carl Banks wrote: What if the object is a string you just read from a file? How do you dispatch using polymorphism in that case? This would be a pertinent question, w

Re: Immediate Help with python program!

2009-12-10 Thread Grant Edwards
On 2009-12-10, Rhodri James wrote: > Ahem. This is a newsgroup/mailing list, not IM. I happen to have seen > this within half an hour of you posting it, but that's just luck. > Expecting an "immediate" response is unrealistic. > > Furthermore, this is comp.lang.python, a group right up ther

Re: How do I Block Events in wxPython

2009-12-10 Thread Stephen Hansen
On Thu, Dec 10, 2009 at 6:01 AM, Frank Millman wrote: > > Another approach is to use wnd.CaptureMouse() on a particular control > > which > > doesn't really respond to anything. Just be sure to ReleaseMouse() later > > and > > follow the instructions in the docs about capturing that cancel-captur

Re: Graph library for Python

2009-12-10 Thread Bearophile
Geremy Condra: > is there a particular way you want your attribution line to read? You can just use my nickname (in all lowercase), with the list of parts you have used. Don't worry. > Well, we all seem to have reinvented the wheel differently ;) Maybe also because they are designed for differ

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
the problem was that i had never installed python on my workstation. just had a Python25 folder with a batch-file that was adjustin the PATH and executing %PYTHONHOME%python.exe installed Python properly and now everything works fine -- http://mail.python.org/mailman/listinfo/python-list

Re: no module named error

2009-12-10 Thread Diez B. Roggisch
Joe wrote: >> No, the import-mechanism of python doesn't take LD_LIBRARY_PATH into >> account, and even if it did - _moda.la is a simple archive-file, not a >> shared library. It can't be dynamically loaded. Something in your >> build-process is not working. > > So how should my stuff find these

ctypes / cygwin / django+geos

2009-12-10 Thread kiorky
I am encountering errors with ctypes and geos. The same configuration (geos-3.0 or geos-3.2) runs fine under classical unixes like freebsd, mac or linux but do not pass with cygwin with 'free' function not found. My configuration is 2.6.4 Release, and a little patch for ctypes which lets all it

ctypes / cygwin / django+geos

2009-12-10 Thread kiorky
I am encountering errors with ctypes and geos. The same configuration (geos-3.0 or geos-3.2) runs fine under classical unixes like freebsd, mac or linux but do not pass with cygwin with 'free' function not found. My configuration is 2.6.4 Release, and a little patch for ctypes which lets all it

Re: ctypes / cygwin / django+geos

2009-12-10 Thread kiorky
Oups, i forgot to say that the tests i am excuting are from Django. (django.gis.tests.test_geos, tag 1.0.2) You can have it online here: http://code.djangoproject.com/browser/django/tags/releases/1.0.2/django/contrib/gis/tests/test_geos.py -- Cordialement, KiOrKY GPG Key FingerPrint: 0x1A1194B7

Re: Question on Python as career

2009-12-10 Thread Aahz
In article , Tim Roberts wrote: > >There are very, very few full-time Python jobs anywhere in the world, >although many people use Python as one tool in their toolbox. Depending on how you define "Python job", I disagree with you. All my employment in the last decade, including three different

Runtime load python modules from memory

2009-12-10 Thread scream...@gmail.com
Hello! Is it possible to load python module from memory? For example, I can read python .pyc file into memory, preprocess it ( decrypt :-) ), and then import it. Is it possible? -- http://mail.python.org/mailman/listinfo/python-list

Re: no module named error

2009-12-10 Thread Benjamin Kaplan
On Thu, Dec 10, 2009 at 9:56 AM, Joe wrote: >> No, the import-mechanism of python doesn't take LD_LIBRARY_PATH into >> account, and even if it did - _moda.la is a simple archive-file, not a >> shared library. It can't be dynamically loaded. Something in your >> build-process is not working. > > So

Re: no module named error

2009-12-10 Thread Joe
> No, the import-mechanism of python doesn't take LD_LIBRARY_PATH into > account, and even if it did - _moda.la is a simple archive-file, not a > shared library. It can't be dynamically loaded. Something in your > build-process is not working. So how should my stuff find these libs? Here's what I

Re: Redirect stdout to a buffer [Errno 9]

2009-12-10 Thread Ecir Hana
I tried to replace official Python dll with the one built with MinGW and it works. The problem is, that port is very old and so far it seems that official support for building Python under MinGW is nowhere near. I really don't want to use MSVC, so if there's any other way around this, please, let

Re: switch

2009-12-10 Thread Tim Chase
Great example Tim. This is something that many of us must be dealing with on a daily basis. The problem has enough details (bar one), to allow an answer and not so detailed as to be confusing. And for me it's a particularly good example, because your need accommodate mulitple provider formats

Re: Graph library for Python

2009-12-10 Thread geremy condra
On Thu, Dec 10, 2009 at 7:48 AM, Tiago de Paula Peixoto wrote: > On 12/08/2009 01:27 PM, Robin Becker wrote: >> I don't want to sound pessimistic, but graph and digraph theory has a >> lot of history, especially in computer science. There are already very >> many implementations eg >> >> http://co

Re: How do I Block Events in wxPython

2009-12-10 Thread Frank Millman
Stephen Hansen wrote: > On Wed, Dec 9, 2009 at 10:21 PM, Frank Millman wrote: > >> I also need to block events in my wxPython app, though the time duration >> is >> very short. I have a separate thread that sends notification of gui >> events >> to a server, and waits for a response. I do not w

Re: accessing local variables from the pdb debugger

2009-12-10 Thread Jean-Michel Pichavant
Diez B. Roggisch wrote: Jean-Michel Pichavant wrote: Guys, I have some problem changing method locals with pdb: import pdb def test(): foo = 'foo' pdb.set_trace() test() --Return-- > /home/jeanmichel/trunk/tnt/test.py(5)test()->None -> pdb.set_trace() (Pdb) print foo foo (Pdb) f

Re: switch

2009-12-10 Thread Carl Banks
On Dec 10, 3:34 am, Asun Friere wrote: > On Dec 10, 2:00 pm, Carl Banks wrote: [snip most of questionable, verly verbose reply] > > You argued that a decent language OO should never > > have a switch statement because polymorphic dispatch is the right way > > to handle it in OO languages, which

Re: web crawler in python

2009-12-10 Thread Philip Semanchuk
On Dec 9, 2009, at 7:39 PM, my name wrote: I'm currently planning on writing a web crawler in python but have a question as far as how I should design it. My goal is speed and maximum efficient use of the hardware\bandwidth I have available. As of now I have a Dual 2.4ghz xeon box, 4gb ram,

Re: Python for Newbies

2009-12-10 Thread rm
On Dec 9, 11:56 pm, geremy condra wrote: > > The N900 is what I consider the coolest portable device ever: > > >http://temporaryland.wordpress.com/2009/10/09/nokian900-not-just-an-i... > > >http://www.themaemo.com/and-now-for-something-completely-different-th... > > Dunno if you intended to, but i

Re: accessing local variables from the pdb debugger

2009-12-10 Thread Diez B. Roggisch
Jean-Michel Pichavant wrote: > Guys, > > I have some problem changing method locals with pdb: > > import pdb > > def test(): > foo = 'foo' > pdb.set_trace() > > test() > --Return-- > > /home/jeanmichel/trunk/tnt/test.py(5)test()->None > -> pdb.set_trace() > (Pdb) print foo > foo > (Pd

accessing local variables from the pdb debugger

2009-12-10 Thread Jean-Michel Pichavant
Guys, I have some problem changing method locals with pdb: import pdb def test(): foo = 'foo' pdb.set_trace() test() --Return-- > /home/jeanmichel/trunk/tnt/test.py(5)test()->None -> pdb.set_trace() (Pdb) print foo foo (Pdb) foo = 'bar' (Pdb) print foo foo (Pdb) I tried us

Re: Graph library for Python

2009-12-10 Thread geremy condra
On Thu, Dec 10, 2009 at 5:18 AM, Bearophile wrote: > geremy condra: > >> Since that's released under the python license, I'm going to >> go ahead and commit the version that includes the topo >> traversal, but if you have any objections you only need to >> say the word and I'll take it down. > > N

Re: Graph library for Python

2009-12-10 Thread Tiago de Paula Peixoto
On 12/08/2009 01:27 PM, Robin Becker wrote: > I don't want to sound pessimistic, but graph and digraph theory has a > lot of history, especially in computer science. There are already very > many implementations eg > > http://code.google.com/p/igraph > http://www.boost.org/doc/libs/release/libs/gr

Re: switch

2009-12-10 Thread Asun Friere
On Dec 10, 6:57 am, Tim Chase wrote: > Carl Banks wrote: > > What if the object is a string you just read from a file? > > > How do you dispatch using polymorphism in that case? > > This is where I most miss a switch/case statement in Python...I > do lots of text-file processing (cellular provider

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
On 10 Dez., 11:52, "Michel Claveau - MVP" wrote: > Hi ! > > Warning with lower/uppercases! > Try to make two versions of your methods (ex.: "add" & "ADD"), for study. > > @+ > -- > MCI The error comes already at the first line of Excel/VBA code: Set ex = CreateObject("MyPython.Example") rgds,e

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
On 10 Dez., 11:52, "Michel Claveau - MVP" wrote: > Hi ! > > Warning with lower/uppercases! > Try to make two versions of your methods (ex.: "add" & "ADD"), for study. > > @+ > -- > MCI The error comes already at the first line of Excel/VBA code: Set ex = CreateObject("MyPython.Example") rgds,e

Re: plain text parsing to html (newbie problem)

2009-12-10 Thread João
Thanks for the output. akean, I've installed ipython and I'm exploring it. Thanks. Terry, from what I've read stringIO allows us to store strings in a 'virtual' file. Can you please write just 2 lines exemplifying a write to and a read from an OS level file? MRAB, that 'mail' object should've bee

Re: plain text parsing to html (newbie problem)

2009-12-10 Thread João
Thanks for the output. akean, I've installed ipython and I'm exploring it. Thanks. Terry, from what I've read stringIO allows us to store strings in a 'virtual' file. Can you please write just 2 lines exemplifying a write to and a read from an OS level file? MRAB, that 'mail' object should've bee

Re: Generating diagrams from PostgreSQL with Python (Re: postgresql_autodoc in Python?)

2009-12-10 Thread Chris Rebert
On Thu, Dec 10, 2009 at 3:48 AM, Diez B. Roggisch wrote: > Wolfgang Keller wrote: > >> Hello, >> >> I will re-precise my question: >> >> Has anyone ever implemented a script in Python that generates >> documentation (especially diagrams, in a format such as e.g. Dia, Inkscape >> SVG or Tikz) for a

Re: "file" does not work with the "with" statement!

2009-12-10 Thread Michele Simionato
On Dec 10, 11:59 am, Christian Heimes wrote: > In Python 2.5 you have to implement your own __enter__ and __exit__ > methods if you subclass from file. The file.__exit__ function doesn't > call f.close(). Yes, that was my problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: freeze in python3

2009-12-10 Thread Almar Klein
Hi Patrick, It's not exactly what you asked, but I've been able to freeze a Python 3 project using cx_Freeze. Almar 2009/12/10 Patrick Stinson : > NOTE: This is related but is not a duplicate of my post from yesterday. > > Has anyone used Tools/freeze/freeze.py in python3? I tried it with a > c

Re: Generating diagrams from PostgreSQL with Python (Re: postgresql_autodoc in Python?)

2009-12-10 Thread Diez B. Roggisch
Wolfgang Keller wrote: > Hello, > > I will re-precise my question: > > Has anyone ever implemented a script in Python that generates > documentation (especially diagrams, in a format such as e.g. Dia, Inkscape > SVG or Tikz) for a PostgreSQL database either from an SQL script or by > connecting

Re: switch

2009-12-10 Thread Asun Friere
On Dec 10, 2:00 pm, Carl Banks wrote: > On Dec 9, 5:02 pm, Asun Friere wrote: > > > On Dec 9, 7:08 pm, Carl Banks wrote: > > > > What if the object is a string you just read from a file? > > > > How do you dispatch using polymorphism in that case? > > > This would be a pertinent question, were I

Generating diagrams from PostgreSQL with Python (Re: postgresql_autodoc in Python?)

2009-12-10 Thread Wolfgang Keller
Hello, I will re-precise my question: Has anyone ever implemented a script in Python that generates documentation (especially diagrams, in a format such as e.g. Dia, Inkscape SVG or Tikz) for a PostgreSQL database either from an SQL script or by connecting to the database? Postgresql_autodoc i

C to Python

2009-12-10 Thread Emeka
Hello All, I am finding it difficult getting my head around PyObject_CallObject(x,y). I need a gentle and thorough introduction to it. I also need examples. Could someone come to my need? Thanks. Janus. -- http://mail.python.org/mailman/listinfo/python-list

Re: "file" does not work with the "with" statement!

2009-12-10 Thread Peter Otten
Michele Simionato wrote: > On Dec 10, 11:04 am, "Diez B. Roggisch" wrote: >> Are you sure? For me on python2.5, it works as advertised: >> >> from __future__ import with_statement >> >> def test(outf): >> with outf: >> outf.write("test\n") >> try: >> outf.write("test\n") >> assert False, "Not clo

Re: "file" does not work with the "with" statement!

2009-12-10 Thread Christian Heimes
Michele Simionato wrote: > Python 2.5, but it could be an artifact of the way I am looking if a > file is closed. > I have subclassed the file builtin, added a .close method and it was > not called by the > "with" statement. This during debugging, but now I have found another > reason to explain wh

  1   2   >