HDF5 for Python 0.3.0

2008-08-15 Thread Andrew Collette
=== Announcing HDF5 for Python (h5py) 0.3.0 === HDF5 for Python (h5py) is a general-purpose Python interface to the Hierarchical Data Format library, version 5. HDF5 is a versatile, mature scientific software library

ANN: Mercurial 1.0.2

2008-08-15 Thread Martin Geisler
I would like to announce the release of Mercurial 1.0.2! Mercurial is a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects. It scales all the way from big projects like Xen, Mozilla and OpenJDK down to single-man projects.

organizing python code with tests

2008-08-15 Thread eliben
Hello, At the moment, I place all the code of my project in a src/ directory, and all the tests in a sibling tests/ directory, so for instance a sample project can look like this: doc/ ... src/ play.py write.py tests/ test_play.py test_write.py While this works fine, I have a couple

Re: precedence of [] vs .

2008-08-15 Thread Fredrik Lundh
Calvin Spealman wrote:e attribute access (foo.bar) binds more tightly than subscripting (foo[bar]). no, they have the same binding power; here's the relevant part of the grammar: trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME note however that . only binds to a name,

Re: precedence of [] vs .

2008-08-15 Thread Fredrik Lundh
Carl Banks wrote: http://docs.python.org/ref/summary.html I think the summary is correct (am not going to bother to double- check), but there's a subtle point you're missing. Here is a simplified explanation. the rendered summary is broken; see my other post. /F --

Re: negative numbers are not equal...

2008-08-15 Thread Fredrik Lundh
ariel ledesma wrote: i see now, so i guess that's also why id() returns the same address for them as well... i'll dive into the implementation file, it may be a bit out of my league but i'll see what i can gather, and hey, that's how it works, right? :-) well, there's another strategy, of

Re: The python not starting under cmd.exe

2008-08-15 Thread [EMAIL PROTECTED]
Hi! nntpman68 írta: Did you try start test.py from the command line? Normally this tries to behave as if you clicked on the file from the explorer? bye The associations, filetypes are good: H:\Dev\ImgOrderASSOC .py .py=Python.File H:\Dev\ImgOrderftype python.file

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread [EMAIL PROTECTED]
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=sangeetha777 * --

Re: The python not starting under cmd.exe

2008-08-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: H:\Dev\ImgOrderftype python.file python.file=C:\Python25\python.exe %1 %* But the start not working. And not only Python Program, but all start failed... In other machines the start anything.xls, or anything.html or anything.jpg is working good, it is starts the

getattr nested attributes

2008-08-15 Thread Gregor Horvath
Hi, class A(object): test = test class B(object): a = A() In [36]: B.a.test Out[36]: 'test' In [37]: getattr(B, a.test) --- type 'exceptions.AttributeError'Traceback (most recent call last) /ipython

Re: getattr nested attributes

2008-08-15 Thread Christian Heimes
Gregor Horvath wrote: any help? I guess you missunderstood the sentence For example, getattr(x, 'foobar') is equivalent to x.foobar.. getattr(x, foo.bar) is not equivalant to x.foo.bar. -- http://mail.python.org/mailman/listinfo/python-list

Re: getattr nested attributes

2008-08-15 Thread Peter Otten
Gregor Horvath wrote: Hi, class A(object): test = test class B(object): a = A() In [36]: B.a.test Out[36]: 'test' In [37]: getattr(B, a.test) --- type 'exceptions.AttributeError'Traceback

Re: getattr nested attributes

2008-08-15 Thread Gregor Horvath
Peter Otten schrieb: make your own function that loops over the attributes, or spell it reduce(getattr, a.test.split(.), B) 'test' Thank's, but this does not work for this case: class A(object): test = test class B(object): a = [A(),] In [70]: reduce(getattr,

Re: organizing python code with tests

2008-08-15 Thread Alex Marandon
eliben wrote: Hello, At the moment, I place all the code of my project in a src/ directory, and all the tests in a sibling tests/ directory, so for instance a sample project can look like this: doc/ ... src/ play.py write.py tests/ test_play.py test_write.py While this works fine, I

Re: getattr nested attributes

2008-08-15 Thread Peter Otten
Gregor Horvath wrote: Peter Otten schrieb: make your own function that loops over the attributes, or spell it reduce(getattr, a.test.split(.), B) 'test' Thank's, but this does not work for this case: class A(object): test = test class B(object): a = [A(),] In

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

Re: getattr nested attributes

2008-08-15 Thread Wojtek Walczak
On Fri, 15 Aug 2008 11:12:04 +0200, Gregor Horvath wrote: Thank's, but this does not work for this case: class A(object): test = test class B(object): a = [A(),] In [70]: reduce(getattr, a[0].test.split(.), B)

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

EARN MONEY $1500-$5000 PER MONTH

2008-08-15 Thread pooja
EARN MONEY $1500-$5000 PER MONTH SIMPLE ONLINE SURVEY CREATE UR ACCOUNT AND EARN IMMEDIATLY * http://www.AWSurveys.com/HomeMain.cfm?RefID=kingraja666 * --

Re: Suggestion for improved ImportError message

2008-08-15 Thread Lie
On Aug 14, 5:10 pm, Wojtek Walczak [EMAIL PROTECTED] wrote: On Thu, 14 Aug 2008 01:35:44 + (UTC), Kent Tenney wrote: Then go for it  You can prepare a patch and ask on python-dev if the developers are interested. hehe, I'll get a C level patch accepted right after I out-swim Mike

Re: You advice please

2008-08-15 Thread Lie
On Aug 13, 6:14 pm, Hussein B [EMAIL PROTECTED] wrote: Hey, I'm a Java/Java EE developer and I'm playing with Python these days. I like the Python language so much and I like its communities and the Django framework. My friends are about to open a Ruby/Rails shop and they are asking me to

Re: a podcast for music algo-comped with python

2008-08-15 Thread Paul Boddie
On 15 Aug, 05:50, castironpi [EMAIL PROTECTED] wrote: On Aug 14, 4:01 pm, Paul Boddie [EMAIL PROTECTED] wrote: I'm not sure if I follow the question. I don't have much experience with making sound effects, preferring to compose and pre-render my music, but I imagine there are some tricks

Re: Python regex question

2008-08-15 Thread Tim N. van der Leeuw
Hey Gerhard, Gerhard Häring wrote: Tim van der Leeuw wrote: Hi, I'm trying to create a regular expression for matching some particular XML strings. I want to extract the contents of a particular XML tag, only if it follows one tag, but not follows another tag. Complicating this, is

Re: Fixed-length text file to database script

2008-08-15 Thread Lie
On Aug 15, 7:12 am, John Machin [EMAIL PROTECTED] wrote: On Aug 15, 4:55 am, [EMAIL PROTECTED] wrote: #your thought is right. === def sizes2fields(sizes):    d = []    begin = 0    for i in sizes:       if begin:          end =

framework for web-based data visualization

2008-08-15 Thread JustWant2Ask JustWant2Ask
Hi, I would like to hear peoples opinion on different frameworks available (django, turbogears, pylon ...) that can provide a quick start into building web applications with the following features: - Server-side scripting - Connection to MySQL - Ease for large data-sets store in memory

Re: getattr nested attributes

2008-08-15 Thread Steven D'Aprano
On Fri, 15 Aug 2008 11:12:04 +0200, Gregor Horvath wrote: Peter Otten schrieb: make your own function that loops over the attributes, or spell it reduce(getattr, a.test.split(.), B) 'test' Thank's, but this does not work for this case: class A(object): test = test class

Re: Don´t find HTMLgen

2008-08-15 Thread econtreras . bantech
On 15 ago, 00:10, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 14 Aug 2008 17:10:26 -0300, [EMAIL PROTECTED]   escribi : I am looking for HTMLgen module but not to find this, the link referenced inwww.python.orgit does not exist. I have need to develop in cgi and would want to do

Re: Suggestion for improved ImportError message

2008-08-15 Thread bearophileHUGS
Lie: I'm not sure there are any reason to test for failed import in doctest) I have code that uses numpy if available, otherwise uses slower normal Python code. Inside the doctests I'd like to test both situations... Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: negative numbers are not equal...

2008-08-15 Thread Steven D'Aprano
On Thu, 14 Aug 2008 20:44:32 -0700, castironpi wrote: For a= 6 b= a the test a is b should clearly return true. Since Python promises not to make a copy of a when you execute b = a, then I think that such behaviour is guaranteed by the language. Python distinguishes what

Passing an object through COM which acts like str but isn't

2008-08-15 Thread Rafe
Forgive me if I mangle any terminology here, but please correct me if I do... I have an object which acts exactly like a string as long as I stay in Python land. However, I am using the object in Softimage|XSI a 3D application on Windows. It was created while (briefly) owned by Microsoft, so

Re: Passing an object through COM which acts like str but isn't

2008-08-15 Thread Rafe
The previous message was posted prematurely. Please ignore it. (I hit enter witht he wrong focus I guess...no confirmation or edit available? This was my first post.) - Rafe -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyglet 1.1

2008-08-15 Thread Alex Holkner
pyglet 1.1 has been released, with many new features since pyglet 1.0 (scroll down for details). http://www.pyglet.org --- pyglet provides an object-oriented programming interface for developing games and other visually-rich applications for Windows, Mac OS X and Linux. Some of the features of

Re: getattr nested attributes

2008-08-15 Thread Paul Boddie
On 15 Aug, 10:35, Gregor Horvath [EMAIL PROTECTED] wrote: type 'exceptions.AttributeError': type object 'B' has no attribute 'a.test' You have to realise that attributes can have names beyond those supported by the usual attribute access syntax. For example: class C: pass setattr(C, x.y,

Re: negative numbers are not equal...

2008-08-15 Thread Dan Lenski
On Thu, 14 Aug 2008 17:18:55 -0300, ariel ledesma wrote: hello guys i just ran into this when comparing negative numbers, they start returning False from -6 down, but only when comparing with 'is' m = -5 a = -5 m is a True m = -6 a = -6 m is a False m == a True i

Re: Passing an object through COM which acts like str but isn't

2008-08-15 Thread Rafe
Forgive me if I mangle any terminology here, but please correct me if I do... I have an object which acts exactly like a string as long as I stay in Python land. However, I am using the object in Softimage|XSI, a 3D application on Windows. I'm getting variant erros when trying to use my instances

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-15 Thread Mudcat
Thanks for all the input! I was able to install 2.6 with the wrapper file and get up and running quickly. I like this. I can pass the style object to a separate stylesheet file where I can create all the definitions. That cleans up a lot of clutter around the gui widgets. In the past there just

Re: help on import libxml2

2008-08-15 Thread jianbing . chen
Paul, Thanks. This helped. Jianbing On Aug 14, 4:10 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 14 Aug, 22:43, [EMAIL PROTECTED] wrote: Traceback (most recent call last):   File stdin, line 1, in module   File /sea/local/lib/python2.5/site-packages/libxml2.py, line 1, in module    

Re: getattr nested attributes

2008-08-15 Thread Fredrik Lundh
Gregor Horvath wrote: Thank's, but this does not work for this case: class A(object): test = test class B(object): a = [A(),] In [70]: reduce(getattr, a[0].test.split(.), B) --- type 'exceptions.AttributeError'

Parsing and Editing Source

2008-08-15 Thread Paul Wilson
Hi all, I'd like to be able to do the following to a python source file programmatically: * Read in a source file * Add/Remove/Edit Classes, methods, functions * Add/Remove/Edit Decorators * List the Classes * List the imported modules * List the functions * List methods of classes And

Re: Don´t find HTMLgen

2008-08-15 Thread Walter Dörwald
Gabriel Genellina wrote: En Thu, 14 Aug 2008 17:10:26 -0300, [EMAIL PROTECTED] escribi�: I am looking for HTMLgen module but not to find this, the link referenced in www.python.org it does not exist. I have need to develop in cgi and would want to do it of the possible traditional form

Re: Cannot download SendKeys module

2008-08-15 Thread kpd
Thanks Stef. The Rutherfurd.net site is back online this morning too. -- http://mail.python.org/mailman/listinfo/python-list

Early halt for iterating a_list and iter(a_list)

2008-08-15 Thread Lie
When you've got a nested loop a StopIteration in the Inner Loop would break the loop for the outer loop too: a, b, c = [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5] def looper(a, b, c): for a_ in a: for b_ in b: for c_ in c: print a_, b_, c_ looper(a, b, c) #

Re: Parsing and Editing Source

2008-08-15 Thread eliben
On Aug 15, 4:21 pm, Paul Wilson [EMAIL PROTECTED] wrote: Hi all, I'd like to be able to do the following to a python source file programmatically:  * Read in a source file  * Add/Remove/Edit Classes, methods, functions  * Add/Remove/Edit Decorators  * List the Classes  * List the imported

How do I control output buffering on Win32?

2008-08-15 Thread Grant Edwards
When I ssh in to my Windows XP box and run Python apps, output from print and and sys.stdout.write() is being buffered so that none of the output shows up until the program exits. From within my program how do I set output buffering to either line-buffered or un-buffered? [I'm looking for the

Re: Parsing and Editing Source

2008-08-15 Thread Wilson
On Aug 15, 3:45 pm, eliben [EMAIL PROTECTED] wrote: On Aug 15, 4:21 pm, Paul Wilson [EMAIL PROTECTED] wrote: Hi all, I'd like to be able to do the following to a python source file programmatically:  * Read in a source file  * Add/Remove/Edit Classes, methods, functions  *

Re: Early halt for iterating a_list and iter(a_list)

2008-08-15 Thread Fredrik Lundh
Lie wrote: When you've got a nested loop a StopIteration in the Inner Loop would break the loop for the outer loop too: a, b, c = [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5] def looper(a, b, c): for a_ in a: for b_ in b: for c_ in c: print a_, b_, c_

Re: How do I control output buffering on Win32?

2008-08-15 Thread Fredrik Lundh
Grant Edwards wrote: When I ssh in to my Windows XP box and run Python apps, output from print and and sys.stdout.write() is being buffered so that none of the output shows up until the program exits. From within my program how do I set output buffering to either line-buffered or

Re: negative numbers are not equal...

2008-08-15 Thread Carl Banks
On Aug 14, 4:42 pm, Christian Heimes [EMAIL PROTECTED] wrote: Integers between -5 and +256 are singletons as are some other objects like strings with one element or empty tuples. Not quite. Python 2.5.2 (r252:60911, May 28 2008, 08:35:32) [GCC 4.2.4 (Debian 4.2.4-1)] on linux2 Type help,

Re: How do I control output buffering on Win32?

2008-08-15 Thread Grant Edwards
On 2008-08-15, Fredrik Lundh [EMAIL PROTECTED] wrote: Grant Edwards wrote: When I ssh in to my Windows XP box and run Python apps, output from print and and sys.stdout.write() is being buffered so that none of the output shows up until the program exits. From within my program how do I set

Re: How do I control output buffering on Win32?

2008-08-15 Thread Grant Edwards
On 2008-08-15, Grant Edwards [EMAIL PROTECTED] wrote: I'm not sure you can do that from within the program [1]; to do it from the outside, set the PYTHONUNBUFFERED environment variable to something, or pass -u to the interpreter. I had seen references to PYTHONUNBUFFERED in my Google search,

Re: Parsing and Editing Source

2008-08-15 Thread Rafe
On Aug 15, 9:21 pm, Paul Wilson [EMAIL PROTECTED] wrote: Hi all, I'd like to be able to do the following to a python source file programmatically: * Read in a source file * Add/Remove/Edit Classes, methods, functions * Add/Remove/Edit Decorators * List the Classes * List the imported

Re: How do I control output buffering on Win32?

2008-08-15 Thread Wojtek Walczak
On Fri, 15 Aug 2008 09:47:34 -0500, Grant Edwards wrote: When I ssh in to my Windows XP box and run Python apps, output from print and and sys.stdout.write() is being buffered so that none of the output shows up until the program exits. From within my program how do I set output buffering to

Re: Passing an object through COM which acts like str but isn't

2008-08-15 Thread Wolfgang Grafen
Rafe schrieb: Forgive me if I mangle any terminology here, but please correct me if I do... I have an object which acts exactly like a string as long as I stay in Python land. However, I am using the object in Softimage|XSI, a 3D application on Windows. I'm getting variant erros when trying to

Re: Passing an object through COM which acts like str but isn't

2008-08-15 Thread Rafe
On Aug 15, 10:27 pm, Wolfgang Grafen [EMAIL PROTECTED] wrote: Rafe schrieb: Forgive me if I mangle any terminology here, but please correct me if I do... I have an object which acts exactly like a string as long as I stay in Python land. However, I am using the object in Softimage|XSI,

Re: Parsing and Editing Source

2008-08-15 Thread Wilson
On Aug 15, 4:16 pm, Rafe [EMAIL PROTECTED] wrote: On Aug 15, 9:21 pm, Paul Wilson [EMAIL PROTECTED] wrote: Hi all, I'd like to be able to do the following to a python source file programmatically:  * Read in a source file  * Add/Remove/Edit Classes, methods, functions  *

python/python output buffers

2008-08-15 Thread sandro dentella
Hi, I'm having a little problem while using python mode. I'm used to hit C-c C-c and have a Python Output buffer opened with the output. Now, on Ubuntu 7.10 and 8.04, C-c C-c sends to the Python buffer that is not raised in a window. I need to hit C-c C-z to see it. First of all I'm puzzled

ANN: Leo 4.5 beta 3 released

2008-08-15 Thread Edward K Ream
Leo 4.5 beta 3 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.5 contains many important new features. See below for details. Leo is a text editor, data organizer, project manager and much more. See:

wxPython beginners problem

2008-08-15 Thread Ivan Reborin
Hello all, I'm new to python, new as newbies get, so please, don't take wrongly if this seems like a stupid or overly simple question. I'm going through examples in a book I have (Beginning python, by Hetland Marcus) and I just started doing wxPython examples. But every sample I try, for

emacs python modes [was Re: python/python output buffers]

2008-08-15 Thread Bruno Desthuilliers
sandro dentella a écrit : Hi, I'm having a little problem while using python mode. I'm used to hit C-c C-c and have a Python Output buffer opened with the output. Now, on Ubuntu 7.10 and 8.04, C-c C-c sends to the Python buffer that is not raised in a window. I need to hit C-c C-z to see it.

Re: You advice please

2008-08-15 Thread Bruno Desthuilliers
Hussein B a écrit : (snip) But this critisim looks so serious: http://en.wikipedia.org/wiki/Ruby_programming_language#Criticism Most of what's written here could apply to Python too - all the part which mostly reflects the usual paranoïa from bondagediscipline langages addicts wrt/ dynamic

Re: negative numbers are not equal...

2008-08-15 Thread castironpi
On Aug 15, 8:56 am, Dan Lenski [EMAIL PROTECTED] wrote: On Thu, 14 Aug 2008 17:18:55 -0300, ariel ledesma wrote: hello guys i just ran into this when comparing negative numbers, they start returning False from -6 down, but only when comparing with 'is'   m = -5   a = -5   m is a

Re: wxPython beginners problem

2008-08-15 Thread Ivan Reborin
On Fri, 15 Aug 2008 18:31:16 +0200, Ivan Reborin [EMAIL PROTECTED] wrote: Hello all, I'm new to python, new as newbies get, so please, don't take wrongly if this seems like a stupid or overly simple question. I'm going through examples in a book I have (Beginning python, by Hetland Marcus) and

Re: You advice please

2008-08-15 Thread castironpi
On Aug 15, 10:05 am, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Hussein B a écrit : (snip) But this critisim looks so serious: http://en.wikipedia.org/wiki/Ruby_programming_language#Criticism (snip) the usual paranoïa from bondagediscipline language addicts Ooo... well said. --

Re: negative numbers are not equal...

2008-08-15 Thread Bruno Desthuilliers
castironpi a écrit : (snip) It would be nice to put together a really canonical case of the use of the 'is' comparison. FTSOA for the sake of argument, when do you use it? When I want to test objects identity. An idenity test is an identity test is an identity test is an Why is it

Create a process with a time to live

2008-08-15 Thread Carl J. Van Arsdall
Hey python[], I want to create a process that would expire if it didn't complete in a set amount of time. I don't seem to see any timeout values to pass os.system - does anyone know of a good way to do this? So far all I can think of is some kind of watchdog thread - but that seems like

Re: Digitally sign PDF files

2008-08-15 Thread Hartmut Goebel
haxier schrieb: M2Crypto? I didn't know of it... surely I must check it. It's a very delicate component (security and reliability is a must) and don't know how openssl works in windows environments. M2crypto is available for windows, too. So I would not expect any problems here. The best

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-15 Thread Maric Michaud
Le Thursday 14 August 2008 20:14:19 Christian Heimes, vous avez écrit : Diez B. Roggisch wrote: But that's a great deal more complicated! It requires merging, and while this of course is possible, you should have mentioned it because otherwise the OP might run into problems. A lock

Re: wxPython beginners problem

2008-08-15 Thread Brian Victor
Ivan Reborin wrote: win.Show This line isn't doing anything. It needs to be: win.Show() # note the parentheses -- Brian -- http://mail.python.org/mailman/listinfo/python-list

Re: negative numbers are not equal...

2008-08-15 Thread Fredrik Lundh
castironpi wrote: This case actually misses handleC(). The solution is that the function that is returning '-10' cannot return -10, it has to return flagC. This can cause difficulties in cases when you're doing operations on flags. Worse, if flagC is nested somewhere, say

Re: emacs python modes [was Re: python/python output buffers]

2008-08-15 Thread sandro dentella
This has been the subject of a recent thread here. Emacs now ships with a different python mode named python.el. You'll have to manually (re)install the original python-mode.el. HTH Thanks. I did search for it and got lost in too many different post on python mode... Now I found it.

Re: Create a process with a time to live

2008-08-15 Thread John Krukoff
On Fri, 2008-08-15 at 10:00 -0700, Carl J. Van Arsdall wrote: Hey python[], I want to create a process that would expire if it didn't complete in a set amount of time. I don't seem to see any timeout values to pass os.system - does anyone know of a good way to do this? So far all I

Re: Digitally sign PDF files

2008-08-15 Thread John Krukoff
On Mon, 2008-08-11 at 14:13 -0700, haxier wrote: On 11 ago, 22:29, Hartmut Goebel [EMAIL PROTECTED] wrote: I'm developing an application with some reports and we're looking for advice. This reports should be openoffice.org .odf files, pdf files, and perhaps microsoft word files (.doc,

Re: wxPython beginners problem

2008-08-15 Thread s0suk3
On Aug 15, 11:31 am, Ivan Reborin [EMAIL PROTECTED] wrote: Hello all, I'm new to python, new as newbies get, so please, don't take wrongly if this seems like a stupid or overly simple question. I'm going through examples in a book I have (Beginning python, by Hetland Marcus) and I just

Handling Property and internal ('__') attribute inheritance and creation

2008-08-15 Thread Rafe
Hi, I've been thinking in circles about these aspects of Pythonic design and I'm curious what everyone else is doing and thinks. There are 3 issues here: 1) 'Declaring' attributes - I always felt it was good code practice to declare attributes in a section of the class namespace. I set anything

Re: wxPython beginners problem

2008-08-15 Thread Mike Driscoll
On Aug 15, 11:31 am, Ivan Reborin [EMAIL PROTECTED] wrote: Hello all, I'm new to python, new as newbies get, so please, don't take wrongly if this seems like a stupid or overly simple question. I'm going through examples in a book I have (Beginning python, by Hetland Marcus) and I just

Re: Create a process with a time to live

2008-08-15 Thread Fredrik Lundh
Carl J. Van Arsdall wrote: I want to create a process that would expire if it didn't complete in a set amount of time. I don't seem to see any timeout values to pass os.system - does anyone know of a good way to do this? So far all I can think of is some kind of watchdog thread - but that

Re: Passing an object through COM which acts like str but isn't

2008-08-15 Thread Wolfgang Grafen
Rafe schrieb: On Aug 15, 10:27 pm, Wolfgang Grafen [EMAIL PROTECTED] wrote: Rafe schrieb: Now if I try to pass this as I would a string, roughly like so... s = StrLike(test) Application.AnObject.attribute = test # works fine Application.AnObject.attribute = s ERROR : Traceback (most recent

Re: precedence of [] vs .

2008-08-15 Thread Terry Reedy
Fredrik Lundh wrote: Calvin Spealman wrote:e attribute access (foo.bar) binds more tightly than subscripting (foo[bar]). no, they have the same binding power; here's the relevant part of the grammar: trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME note however that .

Re: negative numbers are not equal...

2008-08-15 Thread Mel
castironpi wrote: It would be nice to put together a really canonical case of the use of the 'is' comparison. FTSOA for the sake of argument, when do you use it? Why is it even in the language? My poster child use case is in a MUDD game. For instance, the player represented by `this_player`

Re: Missing exceptions in PEP 3107

2008-08-15 Thread Christoph Zwerschke
Matimus wrote: Christoph wrote: Maybe the following syntax would be even more intuitive: def foo(a: a info, b: b info) return ret info raise exc info: return hello world That seems much more intuitive and extensible. The - syntax has always bothered me. The main issue I see with

Re: negative numbers are not equal...

2008-08-15 Thread Terry Reedy
Mel wrote: castironpi wrote: It would be nice to put together a really canonical case of the use of the 'is' comparison. FTSOA for the sake of argument, when do you use it? Why is it even in the language? My poster child use case is in a MUDD game. For instance, the player represented by

Pre-university student looking to contribute to OS project

2008-08-15 Thread Jason Walsh
I'm a pre-university student with about 7 months Python experience looking for an open source project to get involved in (learn the code, do bug fixes, etc). I've searched freshmeat.net, SourceForge, and Google Code, and found a few possibilities, but I thought I'd ask the list and see if there

Re: Missing exceptions in PEP 3107

2008-08-15 Thread Christoph Zwerschke
Carl Banks wrote: I think you're missing the point here. PEP 3017 is policy-neutral: it describes a mechanism to annotate functions and arguments, and that's it. That's not quite true: PEP 3017 describes a mechanism for annotating function parameters *and return values*, and my point was why

Re: Pre-university student looking to contribute to OS project

2008-08-15 Thread Stef Mientki
Jason Walsh wrote: I'm a pre-university student with about 7 months Python experience looking for an open source project to get involved in (learn the code, do bug fixes, etc). I've searched freshmeat.net, SourceForge, and Google Code, and found a few possibilities, but I thought I'd ask the

Re: Handling Property and internal ('__') attribute inheritance and creation

2008-08-15 Thread Bruno Desthuilliers
Rafe a écrit : Hi, I've been thinking in circles about these aspects of Pythonic design and I'm curious what everyone else is doing and thinks. There are 3 issues here: 1) 'Declaring' attributes There's nothing like declaration of variables/attributes/whatever in Python. - I always felt

Re: negative numbers are not equal...

2008-08-15 Thread Bruno Desthuilliers
Terry Reedy a écrit : Mel wrote: castironpi wrote: It would be nice to put together a really canonical case of the use of the 'is' comparison. FTSOA for the sake of argument, when do you use it? Why is it even in the language? My poster child use case is in a MUDD game. For instance,

Job: Turbogears

2008-08-15 Thread Shemia Miller
I have the site up. The programmer has installed it. I now need a simple admin panel to go with it. Please let me know if you, or you know anyone who could create one? -- Phone Number: (641) 715-3900 Extension: 66984# Please allow 24-48 hrs. --

Re: negative numbers are not equal...

2008-08-15 Thread Dan Lenski
On Fri, 15 Aug 2008 08:03:23 -0700, Carl Banks wrote: On Aug 14, 4:42 pm, Christian Heimes [EMAIL PROTECTED] wrote: Integers between -5 and +256 are singletons as are some other objects like strings with one element or empty tuples. Not quite. Python 2.5.2 (r252:60911, May 28 2008,

Re: Handling Property and internal ('__') attribute inheritance and creation

2008-08-15 Thread Christian Heimes
Bruno Desthuilliers wrote: How often do you really need to override a property ? (hint : as far as I'm concerned, it never happened so far). Now you have two solutions : either redefine the whole property in the derived class, or, if you really intend your property to be overriden, provide a

Re: negative numbers are not equal...

2008-08-15 Thread ariel ledesma
well, i'm glad i stumbled upon this detail early on (i only had to fix about one page of code)... i'll just stick to 'is' when it concerns checking if it is the *same* object (memorywise) instead of an *equivalent* one... just before wrapping up, the special methods __eq__ and __ne__ are

New sample codes, building CGameMain class - Game programming

2008-08-15 Thread smartx
New sample codes, direct x game programming at: http://gptutors.com With best wishes, smartx. -- http://mail.python.org/mailman/listinfo/python-list

Code works in current dir only?

2008-08-15 Thread Paxton Sanders
Does anyone know why the following code successfully labels (with [f|d|?]) entries in the current directory, but not in any other directory? (All other directories' entries print [?].) I'm using Python 2.5.1 on Cygwin. Thanks! import os # collect all files and their paths def

Re: Code works in current dir only?

2008-08-15 Thread Dieter Deyke
Paxton Sanders [EMAIL PROTECTED] writes: Does anyone know why the following code successfully labels (with [f|d|?]) entries in the current directory, but not in any other directory? (All other directories' entries print [?].) I'm using Python 2.5.1 on Cygwin. Thanks! import os #

Re: Code works in current dir only?

2008-08-15 Thread Paxton Sanders
Does anyone know why the following code successfully labels (with [f|d|?]) entries in the current directory, but not in any other directory? (All other directories' entries print [?].) n = os.path.join(path, n) ### == you need this Oops, there it is: my stupidity on display

Re: negative numbers are not equal...

2008-08-15 Thread Christian Heimes
ariel ledesma wrote: well, i'm glad i stumbled upon this detail early on (i only had to fix about one page of code)... i'll just stick to 'is' when it concerns checking if it is the *same* object (memorywise) instead of an *equivalent* one... just before wrapping up, the special methods __eq__

  1   2   >