Elisa Media Center 0.5.35 Release

2009-04-07 Thread Olivier Tilloy
Dear Python users, The Elisa team is happy to announce the release of Elisa Media Center 0.5.35, code-named The Great Debate. Elisa is a cross-platform and open-source Media Center written in Python. It uses GStreamer [1] for media playback and pigment [2] to create an appealing and intuitive

Upcoming Python Bootcamps - May, June, and July 2009

2009-04-07 Thread Chander Ganesan
The Open Technology Group is pleased to announce three Upcoming Python Bootcamp's, scheduled : May 11-15, 2009 July 20-24, 2009 July 27-31, 2009 For complete course outline/syllabus, or to enroll, call us at 877-258-8987 or visit our web site at: http://www.otg-nc.com/python-bootcamp OTG's

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
The early-bird registration deadline for PyCon Tre (PyCon Italy 2009) is April 13th, just a few days from now. The conference will take place in Florence from May 8th till May 10th 2009, and features guests like Guido Van Rossum, Alex Martelli, Raymond Hettinger, Fredrik Lundh and Antonio

RELEASED Python 2.6.2 candidate 1

2009-04-07 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm happy to announce the release of Python 2.6.2 candidate 1. This release contains dozens of bug fixes since Python 2.6.1. Please see the NEWS file for a detailed list of changes. Barring unforeseen problems, Python 2.6.2 final will be

Re: decorator module in stdlib?

2009-04-07 Thread Michele Simionato
On Apr 7, 7:57 am, Daniel Fetchinson fetchin...@googlemail.com wrote: have always seen the decorator module as a temporary hack waiting for a proper solution at the language level. I wanted the possibility to modify the signature of a function. Everybody more or less agreed that this was

Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
I have a switch that I should connect to the parallel port, but had no luck with it. Tha guy that made it for me told me that it would be easyer to connect via parallel instead the USB So did anyone have success? I only get suckess!! :-)) tryed giveio.sys but it doesn't wort (can't figure

Re: C API String Parsing/Returning

2009-04-07 Thread k3xji
Whan I run the following function, I see a mem leak, a 20 mb of memory is allocated and is not freed. Here is the code I run: import esauth for i in range(100): ... ss = esauth.penc('sumer') ... for i in range(100): ... ss = esauth.penc('sumer') ... And here is the penc()

Python C API String Memory Consumption

2009-04-07 Thread k3xji
When I run the following function, I seem to have a mem leak, a 20 mb of memory is allocated and is not freed. Here is the code I run: import esauth for i in range(100): ... ss = esauth.penc('sumer') ... for i in range(100): ... ss = esauth.penc('sumer') ... And here is the

Re: How can I change size of GUI?

2009-04-07 Thread Eric Brunel
Muddy Coder wrote: Hi Folks, I copied code from book: class ScrolledText(Frame): def __init__(self, parent=None, text='', file=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) self.makeWidgets() self.settext(text, file) def

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread Daniel Fetchinson
I have a switch that I should connect to the parallel port, but had no luck with it. Tha guy that made it for me told me that it would be easyer to connect via parallel instead the USB So did anyone have success? I only get suckess!! :-)) tryed giveio.sys but it doesn't wort (can't

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread Peter Otten
MooMaster wrote: Now we can't calculate a meaningful Euclidean distance for something like Iris-setosa and Iris-versicolor unless we use string-edit distance or something overly complicated, so instead we'll use a simple quantization scheme of enumerating the set of values within the column

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread Peter Otten
Peter Otten wrote: MooMaster wrote: Now we can't calculate a meaningful Euclidean distance for something like Iris-setosa and Iris-versicolor unless we use string-edit distance or something overly complicated, so instead we'll use a simple quantization scheme of enumerating the set of

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread Carl Banks
On Apr 7, 12:38 am, Peter Otten __pete...@web.de wrote: MooMaster wrote: Now we can't calculate a meaningful Euclidean distance for something like Iris-setosa and Iris-versicolor unless we use string-edit distance or something overly complicated, so instead we'll use a simple quantization

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
I have a PC at work and at home. I wanted to write the errors it throws out when i try to use the module but now it work on this PC(the one at work). I don't get it?!?! I tryed so many things and now I can't remember what I have done :-))) This is worse than before! I will post the errors when

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
Yes that module is the one to blame for my headache! :-)) Have you tried http://pyserial.wiki.sourceforge.net/pyParallel ? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C API String Memory Consumption

2009-04-07 Thread k3xji
Interestaing I changed malloc()/free() usage with PyMem_xx APIs and the problem resolved. However, I really cannot understand why the first version does not work. Here is the latest code that has no problems at all: static PyObject * penc(PyObject *self, PyObject *args) { PyObject *

pseudo-code

2009-04-07 Thread r-w
If no internet connection: if have files: run anyway, with warning else: ERROR else: if error getting hash/files: if have files: run anyway, with warning else: ERROR else: run --

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread Peter Otten
Carl Banks wrote: On Apr 7, 12:38 am, Peter Otten __pete...@web.de wrote: MooMaster wrote: Now we can't calculate a meaningful Euclidean distance for something like Iris-setosa and Iris-versicolor unless we use string-edit distance or something overly complicated, so instead we'll use a

Re: Python C API String Memory Consumption

2009-04-07 Thread Carl Banks
On Apr 7, 12:01 am, k3xji sum...@gmail.com wrote: When I run the following function, I seem to have a mem leak, a 20 mb of memory is allocated and is not freed. Here is the code I run: import esauth for i in range(100): ...     ss = esauth.penc('sumer') ... for i in

PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
Basically, I'd like to know how one (broadly, e.g., references in Win-land) does IP (image processing) and drawing techniques such as rubber lines, and dragging image objects across the canvas. I know there are some pretty powerful toolkits out there, but I'd like to limit this to PIL and

Re: Issue with subprocess Module

2009-04-07 Thread Dave Angel
tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script (test.py) in the same folder. And executed

Re: Some test fail on my new Python 2.6

2009-04-07 Thread R. David Murray
Sorin Schwimmer sx...@yahoo.com wrote: Run 'make test' instead of running them one by one. I did it *before* going one by one. I then tried individual tests in hope of getting hints of what to look for. Actualy, for the first three tests, the make test script commented that it is

On Integration Testing

2009-04-07 Thread Emanuele D'Arrigo
Hi everybody, I just finished unit-testing a couple of tightly related modules and it's now time to test them together to a) check if they do talk to each other in the ways they should, b) check how fast they can talk to each other. The problem? Well, the problem is that potentially they can have

Scraping a web page

2009-04-07 Thread Ronn Ross
I'm using the following to scrape a web page: import urllib f = urllib.urlopen(http://www.google.com;) s = f.read() It is working, but it's returning the source of the page. Is there anyway I can get almost a screen capture of the page? Dankon --

Re: Issue with subprocess Module

2009-04-07 Thread Tim Golden
Dave Angel wrote: tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script (test.py) in the same folder.

Re: Python C API String Memory Consumption

2009-04-07 Thread MRAB
k3xji wrote: Interestaing I changed malloc()/free() usage with PyMem_xx APIs and the problem resolved. However, I really cannot understand why the first version does not work. Here is the latest code that has no problems at all: static PyObject * penc(PyObject *self, PyObject *args) {

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread andrew cooke
Carl Banks wrote: import collections import itertools def createInitialCluster(fileName): fixedPoints = [] # quantization is a dict that assigns sequentially-increasing numbers # to values when reading keys that don't yet exit quantization =

Re: building release - assert-free python library

2009-04-07 Thread Ben Finney
grbgooglefan ganeshbo...@gmail.com writes: I would like to avoid [exceptions] when compiling the libpython.a library because when this libpython gets used for production purpose and it aborts, the application goes down without any means of graceful handling that error condition. How can we

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread M.-A. Lemburg
[Resent due to a python.org mail server problem] On 2009-04-03 22:07, Martin v. Löwis wrote: I'd like to extend the proposal to Python 2.7 and later. I don't object, but I also don't want to propose this, so I added it to the discussion. My (and perhaps other people's) concern is that 2.7

cgi file limit size?

2009-04-07 Thread R. David Murray
davidj411 davidj...@gmail.com wrote: I am wondering where the limitation of filesize comes from when i upload a large file. it uploads when the filesize is less than 20 MB (but not if larger). the script does not limit the filesize so it is either an HTTP specification or a webserver limit,

Re: building release - assert-free python library

2009-04-07 Thread Ulrich Eckhardt
grbgooglefan wrote: How can I build a release and not the debug version of libpython.a? I have seen that there are assert, abort statements in lot many functions in Python code. I would like to avoid those when compiling the libpython.a library because when this libpython gets used for

Re: pseudo-code

2009-04-07 Thread Chris Rebert
On Tue, Apr 7, 2009 at 2:00 AM, r-w r...@inet.net.au wrote: If no internet connection:    if have files:        run anyway, with warning    else:        ERROR else:    if error getting hash/files:        if have files:            run anyway, with warning        else:            ERROR  

Re: Issue with subprocess Module

2009-04-07 Thread Albert Hopkins
On Tue, 2009-04-07 at 07:53 -0400, Dave Angel wrote: subprocess.Popen() is expecting the name of a program, which should normally have an extension of .exe You're handing it a .bat file, which is not executable. It only executes in the context of a command interpreter (shell), such

Re: Some test fail on my new Python 2.6

2009-04-07 Thread Sorin Schwimmer
Run 'make test' instead of running them one by one. I did it *before* going one by one. I then tried individual tests in hope of getting hints of what to look for. Actualy, for the first three tests, the make test script commented that it is unusual for them to fail on my platform (linux2).

Issue with subprocess Module

2009-04-07 Thread tarun
Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script (test.py) in the same folder. And executed 'test.py' (Please

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread Eric Brunel
W. eWatson wrote: Basically, I'd like to know how one (broadly, e.g., references in Win-land) does IP (image processing) and drawing techniques such as rubber lines, and dragging image objects across the canvas. I know there are some pretty powerful toolkits out there, but I'd like to limit

Re: Eval Problem

2009-04-07 Thread Victor Subervi
Yes, Python is dynamic, but my server farm, in this era of big business screwing the client and cutting all services and customer support, uses such crappy hardware that all normal code breaks, so I am forced to find work-arounds. Here is more complete code: ourFile = string.split(__file__, /) p

nonlocal in Python 2.6

2009-04-07 Thread Kay Schluehr
I always wondered about the decision to omit the nonlocal statement from the Python 2.X series because it seems to be orthogonal to Python 2.5. Are there any chances for it to be back ported? -- http://mail.python.org/mailman/listinfo/python-list

Re: Web validation

2009-04-07 Thread J. Clifford Dyer
On Tue, 2009-04-07 at 08:44 +1000, r-w wrote: If no internet connection: if have files: run anyway, with warning else: ERROR else: if error getting hash/files: if have files: run anyway, with warning else:

Re: How to go about. On read/write locks

2009-04-07 Thread Piet van Oostrum
Diez B. Roggisch de...@nospam.web.de (DBR) wrote: This is a classical synchronization problem with a classical solution: You treat the readers as a group, and the writers individually. So you have a write lock that each writer has to acquire and release, but it is acquired only by the first

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread R. David Murray
andrew cooke and...@acooke.org wrote: Carl Banks wrote: import collections import itertools def createInitialCluster(fileName): fixedPoints = [] # quantization is a dict that assigns sequentially-increasing numbers # to values when reading keys that don't yet exit

building release - assert-free python library

2009-04-07 Thread grbgooglefan
How can I build a release and not the debug version of libpython.a? I have seen that there are assert, abort statements in lot many functions in Python code. I would like to avoid those when compiling the libpython.a library because when this libpython gets used for production purpose and it

Re: Scraping a web page

2009-04-07 Thread Tim Chase
f = urllib.urlopen(http://www.google.com;) s = f.read() It is working, but it's returning the source of the page. Is there anyway I can get almost a screen capture of the page? This is the job of a browser -- to render the source HTML. As such, you'd want to look into any of the

Re: pseudo-code

2009-04-07 Thread Steven D'Aprano
On Tue, 07 Apr 2009 19:00:30 +1000, r-w wrote: If no internet connection: if have files: run anyway, with warning else: ERROR else: if error getting hash/files: if have files: run anyway, with warning else:

Re: extract Infobox contents

2009-04-07 Thread J. Clifford Dyer
On Mon, 2009-04-06 at 23:41 +0100, Rhodri James wrote: On Mon, 06 Apr 2009 23:12:14 +0100, Anish Chapagain anishchapag...@gmail.com wrote: Hi, I was trying to extract wikipedia Infobox contents which is in format like given below, from the opened URL page in Python. {{ Infobox

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread M.-A. Lemburg
On 2009-04-03 02:44, P.J. Eby wrote: At 10:33 PM 4/2/2009 +0200, M.-A. Lemburg wrote: Alternative Approach: - Wouldn't it be better to stick with a simpler approach and look for __pkg__.py files to detect namespace packages using that O(1) check ? One of the namespace

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread MRAB
Carl Banks wrote: MooMaster wrote: So I'm reading in values from a file, and for each column I need to dynamically discover the range of possible values it can take and quantize if necessary. This is the solution I've come up with: [snip] #harvested from

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread andrew cooke
just playing around - doesn't work with 3.0 due to lack of pattern binding (which i think is coming back in 3.1?) from collections import defaultdict from itertools import count def mkdict(): return defaultdict(count().next) ... converters = defaultdict(mkdict) def to_float((i, s)): ...

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread andrew cooke
R. David Murray wrote: [...] try: dimensions.append(float(s)) except: dimensions.append(float(quantization[s])) No, no, no; never use a bare except! :) can you explain why? i can't think of any reason why the code would be better catching a specific exception. as a general

Re: Issue with subprocess Module

2009-04-07 Thread Tim Golden
tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script (test.py) in the same folder. And executed

Re: Re: How can I change size of GUI?

2009-04-07 Thread John Posner
For what definition of 'did not work'? Seems perfectly fine to me. Just try to add the lines: root = Tk() Try adding a line like this: root.geometry(400x300+100+75) ... which means: make the window 400 pixels wide and 300 pixels high, with the upperleft corner at point (100,75)

Re: Python C API String Memory Consumption

2009-04-07 Thread John Machin
On Apr 7, 9:19 pm, MRAB goo...@mrabarnett.plus.com wrote: k3xji wrote: Interestaing I changed malloc()/free() usage with PyMem_xx APIs and the problem resolved. However, I really cannot understand why the first version does not work. Here is the latest code that has no problems at all:

Re: Issue with subprocess Module

2009-04-07 Thread MRAB
Tim Golden wrote: tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script (test.py) in the same folder.

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread MRAB
andrew cooke wrote: R. David Murray wrote: [...] try: dimensions.append(float(s)) except: dimensions.append(float(quantization[s])) No, no, no; never use a bare except! :) can you explain why? i can't think of any reason why the code would be better catching a specific

hashing and collision detection

2009-04-07 Thread Aaron Brady
Hi group, You are making good on your promise from a year ago: This is a helpful group. Give us more to go on, and you are likely to receive thousands of dollars worth of consulting for free. http://groups.google.com/group/comp.lang.python/msg/2e2906eaa804812c - Bryan Olson I have an idea, which

Re: Weird Tk Canvas coordinate issue

2009-04-07 Thread Tim Shannon
Here's my actual code, but I've tried to strip out the irrelevant parts, but it should compile. FYI, I'm using 2.6 not 3. The code is basically drawing a grid with points in it. I'm fairly new to Python, so constructive criticism is appreciated. class Editor: GSPACE = 80 OFFSET = 50

Re: Eval Problem

2009-04-07 Thread J. Cliff Dyer
OK. You still haven't shown the code where tableTop gets defined, so your code is unrunnable. However, I think your problem is that wherever tableTop lives, it isn't part of your globals or locals in eval. See the documentation on evals here: http://www.python.org/doc/1.4/lib/node26.html

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread R. David Murray
On Tue, 7 Apr 2009 at 09:01, andrew cooke wrote: R. David Murray wrote: [...] try: dimensions.append(float(s)) except: dimensions.append(float(quantization[s])) No, no, no; never use a bare except! :) can you explain why? i can't think of any reason why the code would be

RE: Scraping a web page

2009-04-07 Thread Support Desk
You could do something like below to get the rendered page. Import os site = 'website.com' X = os.popen('lynx --dump %s' % site).readlines() -Original Message- From: Tim Chase [mailto:python.l...@tim.thechases.com] Sent: Tuesday, April 07, 2009 7:45 AM To: Ronn Ross Cc:

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread W. eWatson
You got it. That lamda did look a little odd. The white background is opaque and the telescope is seen as green. The program will ask for a file. I didn't write the code. Eric Brunel wrote: W. eWatson wrote: Basically, I'd like to know how one (broadly, e.g., references in Win-land) does IP

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread P.J. Eby
At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: Wouldn't it be better to stick with a simpler approach and look for __pkg__.py files to detect namespace packages using that O(1) check ? Again - this wouldn't be O(1). More importantly, it breaks system packages, which now again have to deal

PyXML and Python-2.6

2009-04-07 Thread Andrew MacKeith
The Python.org SIG for XML Processing in Python page indicates that The SIG, through the mailing list and the PyXML project hosted on SourceForge The PyXML project on SourceForge is no longer maintained. , so perhaps the SIG page could be updated. Is there a guide to porting projects

Re: nonlocal in Python 2.6

2009-04-07 Thread Benjamin Peterson
Kay Schluehr kay.schluehr at gmx.net writes: I always wondered about the decision to omit the nonlocal statement from the Python 2.X series because it seems to be orthogonal to Python 2.5. Are there any chances for it to be back ported? The only reason it was not backported was that either

Re: Python C API String Memory Consumption

2009-04-07 Thread Benjamin Peterson
Carl Banks pavlovevidence at gmail.com writes: However, Python apparently does leak a reference if passed a Unicode object; PyArg_ParseTuple automatically creates an encoded string but never decrefs it. (That might be necessary evil to preserve compatibility, though. PyString_AS_STRING does

Re: Issue with subprocess Module

2009-04-07 Thread Dave Angel
Tim Golden wrote: div class=moz-text-flowed style=font-family: -moz-fixedDave Angel wrote: tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both,

Re: in place list modification necessary? What's a better idiom?

2009-04-07 Thread andrew cooke
MRAB wrote: andrew cooke wrote: R. David Murray wrote: [...] try: dimensions.append(float(s)) except: dimensions.append(float(quantization[s])) No, no, no; never use a bare except! :) can you explain why? i can't think of any reason why the code would be better catching a

Python syntax

2009-04-07 Thread janus99
well i'm pretty much a newb on python, it's my first comp lang. and i've been having some diffuclties, i want to get the hang of it and i'm wondering if u could help me understand the syntax structure. I messed around with my own comp (windos xp) command prompt and i currently play a mud, but the

Adding method to class at run-time: bad style?

2009-04-07 Thread Grant Edwards
I realize that technically all methods are added to classes at run-time, but what I'm talking about is this: import ClientForm def controlEqual(self,other): return (self.type == other.type) and \ (self.name == other.name) and \ (self.value == other.value)

Re: Adding method to class at run-time: bad style?

2009-04-07 Thread Michele Simionato
On Apr 7, 4:37 pm, Grant Edwards inva...@invalid wrote: I realize that technically all methods are added to classes at run-time, but what I'm talking about is this: snip Raymond Hettinger solves this problem nicely with a class decorator: http://code.activestate.com/recipes/576685/ --

Re: Python syntax

2009-04-07 Thread dorzey
http://wiki.python.org/moin/BeginnersGuide is probably a good place to start. I found lots of useful info from the links on this page when I started programming in Python. Dorzey -- http://mail.python.org/mailman/listinfo/python-list

Re: PyXML and Python-2.6

2009-04-07 Thread Paul Boddie
On 7 Apr, 16:01, Andrew MacKeith and...@mackeith.net wrote: The Python.org SIG for XML Processing in Python page indicates that The SIG, through the mailing list and the PyXML project hosted on SourceForge The PyXML project on SourceForge is no longer maintained. , so perhaps the SIG

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread M.-A. Lemburg
On 2009-04-07 16:05, P.J. Eby wrote: At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: Wouldn't it be better to stick with a simpler approach and look for __pkg__.py files to detect namespace packages using that O(1) check ? Again - this wouldn't be O(1). More importantly, it breaks

Expression

2009-04-07 Thread Lydia
I am working on calculating one of the fields in a feature class based on other 2 fields. The logic is, A (the resulting field) is calculated from B, but C and D have part of the value that could fill the blank of B, which meaning that combine three fields of values can make A. Field A is

RE: Scraping a web page

2009-04-07 Thread Support Desk
If your only interested in the Images, perhaps you want to use wget like: wget -r --accept=jpg,jpeg www.xyz.org or maybe this http://www.vex.net/~x/python_stuff.html BackCrawler http://www.vex.net/%7Ex/files/backcrawler.zip 1.1 A crude web spider with only one purpose:

Re: Scraping a web page

2009-04-07 Thread cgoldberg
Is there anyway I can get almost a screen capture of the page? I'm not sure exactly what you mean by screen capture. But the webbrowser module in the standard lib might be of some help. You can use it to drive a web browser from Python. to load a page in your browser, you can do something

Re: New online docs broken?

2009-04-07 Thread Jim Garrison
Ye Liu wrote: On Apr 6, 6:33 pm, Jim Garrison j...@acm.org wrote: I notice the online docs (at docs.python.org/3.0/index.html) were updated today. It seems some of the top-level pages, like Tutorial, Using Python, Language Reference are truncated after the first few paragraphs. Yea, same

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread David Cournapeau
On Tue, Apr 7, 2009 at 11:58 PM, M.-A. Lemburg m...@egenix.com wrote: This means your proposal actually doesn't add any benefit over the status quo, where you can have an __init__.py that does nothing but declare the package a namespace.  We already have that now, and it doesn't need a new

SoHo Book Problem

2009-04-07 Thread David C. Ullrich
Just curious - has anyone else bought the printed Python 3 Reference Manual published by SoHo Books? Talking about what they call Part 2 of their Python Documentation. I haven't looked in detail - Part 1 seems fine, but the typesetting in Part 2 is totally screwed up. I mean totally - on more or

Re: Best way to start

2009-04-07 Thread Tairic
I was looking for a language that seemed easier to learn and that was powerful, so I just started learning Python myself. I'm using some online tutorials and The book Python Power! by Matt Telles. Some of the O'Reilley books looked ok (I spent a while in the bookstore deciding), but this one was a

Re: Python C API String Memory Consumption

2009-04-07 Thread Floris Bruynooghe
On Apr 7, 2:10 pm, John Machin sjmac...@lexicon.net wrote: On Apr 7, 9:19 pm, MRAB goo...@mrabarnett.plus.com wrote: k3xji wrote: Interestaing I changed malloc()/free() usage with PyMem_xx APIs and the problem resolved. However, I really cannot understand why the first version does

Re: Delicious API and urllib2

2009-04-07 Thread Max Erickson
Bill bsag...@gmail.com wrote: The delicious api requires http authorization (actually https). A generic delicious api post url is https:// username:passw...@api.api.del.icio.us/v1/posts/add?url=http:// example.com/description=interestingtags=whatever. The simplest way is probably to

Re: Issue with subprocess Module

2009-04-07 Thread R. David Murray
Tim Golden m...@timgolden.me.uk wrote: tarun wrote: Hello All, I've a batch file to be invoke using a python script. The batch file has pause, and the time, I need to send some command to the batch file from my scripts. I placed both, the batch file (test.bat) and the python script

Re: On Integration Testing

2009-04-07 Thread Scott David Daniels
Emanuele D'Arrigo wrote: Hi everybody, I just finished unit-testing a couple of tightly related modules and it's now time to test them together to a) check if they do talk to each other in the ways they should, b) check how fast they can talk to each other. The problem? Well, the problem is

Re: Adding method to class at run-time: bad style?

2009-04-07 Thread Scott David Daniels
Grant Edwards wrote: I realize that technically all methods are added to classes at run-time, but what I'm talking about is this: import ClientForm def controlEqual(self,other): return (self.type == other.type) and \ (self.name == other.name) and \

named pipe and Linux

2009-04-07 Thread akineko
Hello everyone, I'm trying to use named pipes to fuse a Python program and a C program. One side creates pipes using os.mkfifo() and both sides use the same named pipes (one side reads, another side writes). The read side uses select.select() to wait for incoming messages and read the message

extracting plain text from RTF-file ?

2009-04-07 Thread Stef Mientki
hello, I'm looking for a library to extract plain text from RTF-files. I found these only RTF generation http://pyrtf.sourceforge.net/ should be able to parse, but no download files http://code.google.com/p/pyrtf-ng/ any suggestions ? thanks, Stef Mientki --

Re: extracting plain text from RTF-file ?

2009-04-07 Thread Brent Bloxam
Stef Mientki wrote: hello, I'm looking for a library to extract plain text from RTF-files. I found these only RTF generation http://pyrtf.sourceforge.net/ should be able to parse, but no download files http://code.google.com/p/pyrtf-ng/ any suggestions ? thanks, Stef Mientki --

Re: Call to PyEval_EvalCodeEx crashes in PyFrame_New with abort

2009-04-07 Thread Aahz
[posted and e-mailed] In article 72593fd7-4500-4ea9-b54e-1637d07b5...@s12g2000prc.googlegroups.com, grbgooglefan ganeshbo...@gmail.com wrote: I've emabedded Python(2.6) in my C++ application and using on Solaris 5.10. When the application calls Py_Eval, it causes an abort application core

Re: UnknownTimeZoneError

2009-04-07 Thread Aahz
[posted e-mailed] In article 7c101864-308c-468a-9053-819af2f57...@o6g2000yql.googlegroups.com, Brian bdele...@gmail.com wrote: I'm running App Engine with Django. I'm having troubles executing timezone conversion via pytz. What version of Python are you using? IIRC, GAE uses Python 2.3. Do

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-07 Thread P.J. Eby
At 04:58 PM 4/7/2009 +0200, M.-A. Lemburg wrote: On 2009-04-07 16:05, P.J. Eby wrote: At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: Wouldn't it be better to stick with a simpler approach and look for __pkg__.py files to detect namespace packages using that O(1) check ? Again - this

Re: python for loop

2009-04-07 Thread Aahz
In article pecora-d381e9.08361703042...@ra.nrl.navy.mil, Lou Pecora pec...@anvil.nrl.navy.mil wrote: In article 5c92e9bd-1fb4-4c01-a928-04d7f6733...@e21g2000yqb.googlegroups.com, Aaron Brady castiro...@gmail.com wrote: Did I tell you guys that 'natural' has 38 definitions at dictionary.com?

Re: PyXML and Python-2.6

2009-04-07 Thread Stefan Behnel
Andrew MacKeith wrote: The Python.org SIG for XML Processing in Python page indicates that The SIG, through the mailing list and the PyXML project hosted on SourceForge The PyXML project on SourceForge is no longer maintained. , so perhaps the SIG page could be updated. Is there a

Re: Q: Best book for teaching

2009-04-07 Thread Mike Driscoll
On Apr 6, 9:37 am, grkunt...@gmail.com wrote: I am considering teaching an introduction to programming course for continuing education adults at a local  community college. These would people with no programming experience, but I will require a reasonable facility with computers. What would

Re: Adding method to class at run-time: bad style?

2009-04-07 Thread Grant Edwards
On 2009-04-07, Grant Edwards inva...@invalid wrote: On 2009-04-07, Scott David Daniels scott.dani...@acm.org wrote: Grant Edwards wrote: I realize that technically all methods are added to classes at run-time, but what I'm talking about is this: ... ClientForm.Control.__eq__ =

3D plotting in a GUI

2009-04-07 Thread Baris Demir
Hi all, I need to develop a GUI for some scientific data processing operations and this GUI should work well with a 3D plotting module, also with NumPy and SciPy for sure. I made a search about packages but, there are plenty of these modules available. What kind of a package or a package of

Re: Tkinter, tkFileDialog - how to select multiple files ?

2009-04-07 Thread Steve Offutt
Hmm ... sorry folks - this works for me everywhere except on the machine I wrote it on ... Must be some sort of configuration problem... Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Issue with subprocess Module

2009-04-07 Thread Tim Golden
Tim Golden wrote: So it looks as though the MS docs are simply wrong? I haven't tried it with ctypes or a native C program, but I can't see that they should be any different. If I get a chance later I'll knock something up in C. OK, copying the standard MS example for creating a process:

Re: Python syntax

2009-04-07 Thread Dave Angel
janus99 wrote: well i'm pretty much a newb on python, it's my first comp lang. and i've been having some diffuclties, i want to get the hang of it and i'm wondering if u could help me understand the syntax structure. I messed around with my own comp (windos xp) command prompt and i currently

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
The early-bird registration deadline for PyCon Tre (PyCon Italy 2009) is April 13th, just a few days from now. The conference will take place in Florence from May 8th till May 10th 2009, and features guests like Guido Van Rossum, Alex Martelli, Raymond Hettinger, Fredrik Lundh and Antonio

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
The early-bird registration deadline for PyCon Tre (PyCon Italy 2009) is April 13th, just a few days from now. The conference will take place in Florence from May 8th till May 10th 2009, and features guests like Guido Van Rossum, Alex Martelli, Raymond Hettinger, Fredrik Lundh and Antonio

  1   2   3   >