Davy's Ironpython Editor 00.01.71

2009-05-29 Thread daftspan...@gmail.com
DIE 00.01.71 Released Davy's Ironpython Editor (DIE) is a clutter free IronPython editor written in IronPython with some basic IDE features. http://code.google.com/p/davysironpythoneditor/ Here's the detail in what has changed in 00.01.71: + Mobile Version which stores options in same dir. +

PyPy Europython Sprint Announcement

2009-05-29 Thread Carl Friedrich Bolz
== Birmingham (UK) EuroPython PyPy Sprints 28-29 June/ 3-4 July 2009 == The PyPy team is sprinting at EuroPython again. This year there are `sprint days`_ before (28-29

Python-URL! - weekly Python news and links (May 29)

2009-05-29 Thread Gabriel Genellina
QOTW: Death To Wildcard Imports - Lawrence D'Oliveiro http://groups.google.com/group/comp.lang.python/msg/835cf7f35ed f4897 How to ask questions having a chance of being answered: http://groups.google.com/group/comp.lang.python/t/17b15282d07770d1/

Re: How can 'type' be an instance of itself?

2009-05-29 Thread Terry Reedy
LittleGrasshopper wrote: On May 28, 4:37 pm, Christian Heimes li...@cheimes.de wrote: LittleGrasshopper wrote: This is probably trivial, but it's driving me mad somehow. All (new style) classes are instances of 'type' by default, unless a custom metaclass is specified. I take this to mean that

Re: Python, Tkinter and popen problem

2009-05-29 Thread Peter Otten
norseman wrote: The direct question comes back to: How does one force a sync or flush() to take effect in Python with Tkinter in use? Or just in Python period. The keyword being force. Here's some truly minimal code which shows the same buffering behaviour: $ cat master.py #!/usr/bin/env

Re: How can 'type' be an instance of itself?

2009-05-29 Thread LittleGrasshopper
On May 28, 11:07 pm, Terry Reedy tjre...@udel.edu wrote: LittleGrasshopper wrote: On May 28, 4:37 pm, Christian Heimes li...@cheimes.de wrote: LittleGrasshopper wrote: This is probably trivial, but it's driving me mad somehow. All (new style) classes are instances of 'type' by default,

Re: python list pattern matching?

2009-05-29 Thread Peter Otten
Terry Reedy wrote: a,b,*rest = list(range(10)) The list() call is superfluous. -- http://mail.python.org/mailman/listinfo/python-list

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Gabriel Rossetti
Diez B. Roggisch wrote: Gabriel Rossetti wrote: Hello everyone, I am trying to use dbapi with mysql and I get this error: Traceback (most recent call last): File stdin, line 1, in module File stdin, line 2, in getUnitParams File /var/lib/python-support/python2.5/MySQLdb/cursors.py,

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Gabriel Rossetti
Paul Boddie wrote: On 26 Mai, 13:46, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: def getParams(curs): curs.execute(select * from param where id=%d, 1001) First of all, you should use the database module's parameter style, which is probably %s - something I've thought

Re: What text editor is everyone using for Python

2009-05-29 Thread Gabor Urban
Hi guys, I would like to reflect this issue for the last time, though I found this thread to be quite inspiring. In one the last postings about this topic Steven D'Aprano has written: As a general rule, menus are discoverable, while keyboard commands aren't. There's nothing inherent to text

Re: What text editor is everyone using for Python

2009-05-29 Thread Ben Finney
Gabor Urban urbang...@gmail.com writes: This is a Python mailing list, which supposed to be a forum of people using the Python programming language. Agreed so far. As a summary, any open source editor should be perfect, which is extensible, optionally language-sensitive, portable, basically

Re: What text editor is everyone using for Python

2009-05-29 Thread Steven D'Aprano
On Fri, 29 May 2009 08:57:18 +0200, Gabor Urban wrote: In one the last postings about this topic Steven D'Aprano has written: As a general rule, menus are discoverable, while keyboard commands aren't. There's nothing inherent to text editing functions which makes then inherently

Re: AOPython Question

2009-05-29 Thread Diez B. Roggisch
Roastie schrieb: I installed the AOPython module: % easy_install aopython That left an aopython-1.0.3-py2.6.egg at C:\mystuff\python\python_2.6.2\Lib\site-packages. I entered the interpreter: import aopython All is well. But I was uncomfortable, since I was used to seeing directories

Re: What text editor is everyone using for Python

2009-05-29 Thread Lie Ryan
norseman wrote: jeffFromOz wrote: On May 26, 10:07 pm, Lacrima lacrima.ma...@gmail.com wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? No one

Global variables from a class

2009-05-29 Thread Kless
I usually use a class to access to global variables. So, which would be the correct way to set them --since the following classes--: class Foo: var = 'lala' class Bar: def __init__(self): self.var = 'lele' Or is it the same? --

Re: What text editor is everyone using for Python

2009-05-29 Thread Lawrence D'Oliveiro
In message 003b3d8c$0$9673$c3e8...@news.astraweb.com, Steven D'Aprano wrote: On Fri, 29 May 2009 14:00:19 +1200, Lawrence D'Oliveiro wrote: In message 003af57e$0$9673$c3e8...@news.astraweb.com, Steven D'Aprano wrote: On Fri, 29 May 2009 09:04:39 +1200, Lawrence D'Oliveiro wrote: In

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Lawrence D'Oliveiro
In message mailman.867.1243574504.8015.python-l...@python.org, Dennis Lee Bieber wrote: On Thu, 28 May 2009 20:57:13 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand declaimed the following in gmane.comp.python.general: db.literal((... %wildcard% ...)) (...

Re: Python, Tkinter and popen problem

2009-05-29 Thread Piet van Oostrum
norseman norse...@hughes.net (n) wrote: n I have tried both and Popen2.popen2(). n os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? n # master.py n import os n #both lines work same Of course, because 'r' is the default, and the bufsize for

FILE object in Python3.0 extension modules

2009-05-29 Thread Joachim Dahl
In Python2.x, I used PyFile_Check(obj) to check if a parameter was a file object. Now, in Python3.0 the same object (obtained as open('file.bin','wb')) is an io.BufferedWriter object. How do I perform type checking for such an object in the extension module, and how do I extract a FILE * object

Re: Global variables from a class

2009-05-29 Thread Piet van Oostrum
Kless jonas@googlemail.com (K) wrote: K I usually use a class to access to global variables. So, which would K be the correct way to set them --since the following classes--: K K class Foo: Kvar = 'lala' K class Bar: Kdef __init__(self): K self.var =

Re: Unpack less values from function's return values

2009-05-29 Thread MRAB
Chris Rebert wrote: On Thu, May 28, 2009 at 3:19 AM, dudeja.ra...@gmail.com wrote: Hi, I'm using Python 2.5.2. I'm getting this error whenever I try to unpack less values from a function. ValueError: too many values to unpack I want to know if there is a way I can unpack less values

Re: Python, Tkinter and popen problem

2009-05-29 Thread MRAB
norseman wrote: [snip] I have tried both and Popen2.popen2(). os.popen runs both way, contrary to docs. # master.py import os #both lines work same #xx= os.popen(/mnt/mass/py/z6.py).readlines() xx= os.popen(/mnt/mass/py/z6.py,'r',1).readlines() readlines() returns only when

How do you serve Cheetah in production? webpy+cheetah

2009-05-29 Thread mobiledreamers
How do you serve *Cheetah* in *production*? Guys can you share the setup on how to precompile and serve cheetah in production Since we dont compile templates in webpy it is getting upstream time out errors. If you could share a good best practise it would help * Jeremy jeremy.ja...@gmail.com

Re: python list pattern matching?

2009-05-29 Thread Chris Rebert
On Thu, May 28, 2009 at 3:57 PM, Terry Reedy tjre...@udel.edu wrote: guthrie wrote: I want to do a functional like pattern match to get teh first two elements, and then the rest of an array return value. For example, assume that perms(x) returns a list of values, and I want to do this:    

Re: Tkinter file dialog

2009-05-29 Thread Chris Rebert
On Thu, May 28, 2009 at 7:48 PM, Ronn Ross ronn.r...@gmail.com wrote: I'm using Tkinter file selector to get a direcotry path. I'm using: self.file = tkFileDialog.askdirectory(title=Please select your directory)     print file but all it prints out is: type 'file' How would I print

PYTHONPATH var

2009-05-29 Thread Sergey Dikovitsky
Hi guys. I have a question regarding runtime definition of the variable PYTHONPATH. Do you know how without modifying of source code change the value for this var. Value stores in the system var sys.path, but the first item of this list, path[0], is the directory containing the script that was

PYTHONPATH var

2009-05-29 Thread insfor
Hi guys. I have a question regarding runtime definition of the variable PYTHONPATH. Do you know how without modifying of source code change the value for this var. Value stores in the system var sys.path, but the first item of this list, path[0], is the directory containing the script that was

Re: Tkinter file dialog

2009-05-29 Thread Hendrik van Rooyen
Ronn Ross wrote: I'm using Tkinter file selector to get a direcotry path. I'm using: self.file = tkFileDialog.askdirectory(title=Please select your directory) print file but all it prints out is: type 'file' How would I print the directory path? try doing: self.filename =

Re: Tkinter file dialog

2009-05-29 Thread MRAB
Ronn Ross wrote: I'm using Tkinter file selector to get a direcotry path. I'm using: self.file = tkFileDialog.askdirectory(title=Please select your directory) print file but all it prints out is: type 'file' How would I print the directory path? Perhaps you meant: self.file =

Re: extract to dictionaries

2009-05-29 Thread Marius Retegan
Hi, On Fri, May 29, 2009 at 2:09 AM, Gary Herron gher...@islandtraining.comwrote: Marius Retegan wrote: Hello I have simple text file that I have to parse. It looks something like this: parameters1 key1 value1 key2 value2 end parameters2 key1 value1 key2 value2 end

Re: Global variables from a class

2009-05-29 Thread Javier Collado
Hello, First thing is a class variable (one for every instance) and second one an instance variable (one per instance). For further information, please take a look at: http://diveintopython.org/object_oriented_framework/class_attributes.html Best regards, Javier 2009/5/29 Kless

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Benjamin Peterson
Joachim Dahl dahl.joachim at gmail.com writes: How do I perform type checking for such an object in the extension module, and how do I extract a FILE * object from it? I browsed the C API documentation, but couldn't find an answer. You use PyObject_IsInstance to test if the object is an

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
On Fri, 29 May 2009 11:44:30 +0100, Marius Retegan marius.s.rete...@gmail.com wrote: Hi, On Fri, May 29, 2009 at 2:09 AM, Gary Herron gher...@islandtraining.comwrote: Marius Retegan wrote: Hello I have simple text file that I have to parse. It looks something like this: parameters1

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
On Fri, 29 May 2009 13:10:47 +0100, Rhodri James rho...@wildebst.demon.co.uk wrote: current_name = dummy Gah! I meant, of course, current_name = 'dummy' -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-05-29 Thread John Center
On May 28, 6:03 pm, Martin v. Löwis mar...@v.loewis.de wrote: I think the problem is it should be built with v9.S for 64-bit, not v8.S.  Is that correct?  If so, how do I get it to use the right one? The Solaris dynamic loader can't find it. Set LD_LIBRARY_PATH or LD_RUN_PATH appropriately,

Re: Global variables from a class

2009-05-29 Thread Steven D'Aprano
On Fri, 29 May 2009 12:04:53 +0200, Javier Collado wrote: Hello, First thing is a class variable (one for every instance) and second one an instance variable (one per instance). One of these things don't belong: A string variable is a variable holding a string. A float variable is a

Re: formating query with empty parameter

2009-05-29 Thread Aahz
In article mailman.717.1243258005.8015.python-l...@python.org, Tim Chase python.l...@tim.thechases.com wrote: To stave off this problem, I often use: values = [ data['a'], data['b'], data['c'], data['d'], data['e'], data['f'], data['g'], ] params = ',

Syntax highlighting, round 42 (was Re: What text editor is everyone using for Python)

2009-05-29 Thread Aahz
In article gvg5d7$38...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message pan.2009.05.26.06.39...@remove.this.cybersource.com.au, Steven D'Aprano wrote: On Tue, 26 May 2009 18:31:56 +1200, Lawrence D'Oliveiro wrote: In message d6d05d39-98e7-4c28-

Re: Global variables from a class

2009-05-29 Thread Jean-Michel Pichavant
Kless wrote: I usually use a class to access to global variables. So, which would be the correct way to set them --since the following classes--: class Foo: var = 'lala' class Bar: def __init__(self): self.var = 'lele' Or is it the same?

Re: PYTHONPATH var

2009-05-29 Thread Steven D'Aprano
On Fri, 29 May 2009 03:50:54 -0700, insfor wrote: Hi guys. I have a question regarding runtime definition of the variable PYTHONPATH. Do you know how without modifying of source code change the value for this var. Syntax error: sentence seems to be a question, but is missing a question

Parsing DTDs

2009-05-29 Thread Tom Anderson
Hello! I would like to parse XML DTDs. The goal is to be able to validate XML-like object structures against DTDs in a fairly flexible way, although i can get from a parsed DTD to a validation engine myself, so that's not an essential feature of the parser (although it would be nice!). What

pygame error: file is not a windows bmp file

2009-05-29 Thread Djames Suhanko
Hello, all! pygame error: file is not a windows bmp file I couldn't found a solution for this problem. My python script run fine in local machine using cxfreeze, but don't work when copied to my live linux system. If I put bmp image, works fine, but png don't. Can you help me? (and sorry my

Re: Deletion/record visibility error in PG with Python...

2009-05-29 Thread Durumdara
Hi! Sorry for rtfm mail... I forgot to remove max_usage param in my real application... This parameter is limiting the number of cursor usage, and if max reached, the DBUtils is automatically open a new cursor in the background! This is break out of the actual transaction context... Uh

Re: PYTHONPATH var

2009-05-29 Thread Dave Angel
Sergey Dikovitsky wrote: Hi guys. I have a question regarding runtime definition of the variable PYTHONPATH. Do you know how without modifying of source code change the value for this var. Value stores in the system var sys.path, but the first item of this list, path[0], is the directory

Re: Global variables from a class

2009-05-29 Thread Javier Collado
You're right. I agree on that it's important to use proper words. Thanks for the correction. Best regards, Javier 2009/5/29 Steven D'Aprano st...@remove-this-cybersource.com.au: On Fri, 29 May 2009 12:04:53 +0200, Javier Collado wrote: Hello, First thing is a class variable (one for

Re: what I would like python.el to do (and maybe it does)

2009-05-29 Thread J Kenneth King
Piet van Oostrum p...@cs.uu.nl writes: J Kenneth King ja...@agentultra.com (JKK) wrote: JKK I find that it does work, but unlike SLIME for lisp, it just imports the statement. JKK It confused me at first, but basically the interpreter doesn't provide JKK any feedback to emacs. JKK Try

Re: how to change response code in CGIHTTPServer.py

2009-05-29 Thread Jeff McNeil
On May 28, 2:23 pm, Daniel daniel.watr...@gmail.com wrote: Hello, Python 2.5.2 WinXP I'm using CGIHTTPServer.py and want to return a response code of 400 with a message in the event that the cgi script fails for some reason.  I notice that run_cgi(self): executes this line of code,

Re: try except inside exec

2009-05-29 Thread Aaron Brady
On May 29, 8:21 am, Michele Petrazzo michele.petra...@remove_me_unipex.it wrote: Hi all, I want to execute a python code inside a string and so I use the exec statement. The strange thing is that the try/except couple don't catch the exception and so it return to the main code. Is there a

Re: extract to dictionaries

2009-05-29 Thread Gary Herron
Marius Retegan wrote: Hi, On Fri, May 29, 2009 at 2:09 AM, Gary Herron gher...@islandtraining.com mailto:gher...@islandtraining.com wrote: Marius Retegan wrote: Hello I have simple text file that I have to parse. It looks something like this:

Re: Network programming ?

2009-05-29 Thread Aahz
In article ce229a0d-4ebe-4e42-8638-4b1ee1dbd...@z5g2000vba.googlegroups.com, thushiantha...@gmail.com wrote: I am planning to develop a chatting software in Python, for my college project. I am using Windows Vista. Is it possible to do sockets programming in Python ? Any books or websites ?

Re: formating query with empty parameter

2009-05-29 Thread Aahz
In article mailman.892.1243603377.8015.python-l...@python.org, Tim Chase python.l...@tim.thechases.com wrote: Aahz wrote: Tim Chase python.l...@tim.thechases.com wrote: To stave off this problem, I often use: values = [ data['a'], data['b'], data['c'], data['d'],

Re: extract to dictionaries

2009-05-29 Thread Emile van Sebille
On 5/28/2009 4:03 PM Marius Retegan said... Hello I have simple text file that I have to parse. It looks something like this: parameters1 key1 value1 key2 value2 end parameters2 key1 value1 key2 value2 end So I want to create two dictionaries parameters1={key1:value1,

PyPy Europython Sprint Announcement

2009-05-29 Thread Carl Friedrich Bolz
== Birmingham (UK) EuroPython PyPy Sprints 28-29 June/ 3-4 July 2009 == The PyPy team is sprinting at EuroPython again. This year there are `sprint days`_ before (28-29

Re: try except inside exec

2009-05-29 Thread David Stanek
On Fri, May 29, 2009 at 11:55 AM, Michele Petrazzo michele.petra...@remove_me_unipex.it wrote: My goal is to execute a function received from a third-part, so I cannot modify as you made in your first piece of code. I want a clean exception with the real line code/tb so I can show a real

Re: What text editor is everyone using for Python

2009-05-29 Thread Falcolas
I am a long time VIM user, and I likely will not change that. The speed, ease of use and functionality, for me, is worth the time spent learning how to use it. My secondary editor on the desktop is UltraEdit, which does a fine job as a text editor and has all the same functionality of VIM - yet

Python-URL! - weekly Python news and links (May 29)

2009-05-29 Thread Gabriel Genellina
QOTW: Death To Wildcard Imports - Lawrence D'Oliveiro http://groups.google.com/group/comp.lang.python/msg/835cf7f35ed f4897 How to ask questions having a chance of being answered: http://groups.google.com/group/comp.lang.python/t/17b15282d07770d1/

Trying to get cleaner XML output from a text file

2009-05-29 Thread iainemsley
I'm using Python2.5 to try and convert some text files into XML using xml.minidom. I'm currently doing some plays which have a structure like Scene 1 Act 1 blah blah Act2 blah blah Scene 2 Act 1 and so on. I'm trying to turn it into div type=scene1 div type=act1 speech / /div div

Re: Parsing DTDs

2009-05-29 Thread Piet van Oostrum
Tom Anderson t...@urchin.earth.li (TA) wrote: TA Hello! TA I would like to parse XML DTDs. The goal is to be able to validate XML-like TA object structures against DTDs in a fairly flexible way, although i can get TA from a parsed DTD to a validation engine myself, so that's not an essential TA

Re: python list pattern matching?

2009-05-29 Thread Terry Reedy
Peter Otten wrote: Terry Reedy wrote: a,b,*rest = list(range(10)) The list() call is superfluous. Agreed, even in Py3 when range() returns a range object rather than a list. -- http://mail.python.org/mailman/listinfo/python-list

Re: try except inside exec

2009-05-29 Thread Aaron Brady
On May 29, 9:55 am, Michele Petrazzo michele.petra...@remove_me_unipex.it wrote: Aaron Brady wrote: STR = class Globals:    err = 0 def a_funct():    try:       1/0    except ZeroDivisionError:       import traceback       Globals.err = traceback.format_exc() exec STR in

Questions about regex

2009-05-29 Thread Jared . S . Bauer
Hello, I'm new to python and I'm having problems with a regular expression. I use textmate as my editor and when I run the regex in textmate it works fine, but when I run it as part of the script it freezes. Could anyone help me figure out why this is happening and how to fix it. Here is the

Re: Programming Praxis

2009-05-29 Thread namekuseijin
Phil Bewig escreveu: Please visit my blog, Programming Praxis, which presents a collection of programming etudes. Newbies will find exercises that extend their programming abilities. Savvy programmers can use the exercises to sharpen their skills or learn a new language. Brave programmers can

DrPython (Windows) problems

2009-05-29 Thread chrisv
Running DrPython under Linux works great. However, when I run it under Windows: 1) I need to Open programs twice. That's right, File, Open, and select the program. First time, nothing. Repeat, and there's the program! 2) Run I run a program, the execution box comes-up and shows the

NameError function not found

2009-05-29 Thread Cameron Pulsford
Hey everyone, I am extremely stumped on this. I have 2 functions.. def _determinant(m): return m[0][0] * m[1][1] - m[1][0] * m[0][1] def cofactor(self): Returns the cofactor of a matrix. newmatrix = [] for i, minor in enumerate(self.minors()):

Re: NameError function not found

2009-05-29 Thread Jason Tackaberry
On Fri, 2009-05-29 at 15:13 -0400, Cameron Pulsford wrote: def _determinant(m): return m[0][0] * m[1][1] - m[1][0] * m[0][1] Given that this has no self argument, I'm assuming this is not a class method. def cofactor(self): Returns the cofactor of a matrix. Given that this does, I

CRLF when doing os.system(ls -l) while using curses !!!

2009-05-29 Thread lkennedy5
Here is the code and as you can see for yourself, the output is not coming out on the screen with CRLF like it should. How do I fix this? import curses, os screen = curses.initscr() os.system(ls -l) curses.endwin() -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacing module with a stub for unit testing

2009-05-29 Thread s4g
Try import sys import ExpensiveModuleStub sys.modules['ExpensiveModule'] = ExpensiveModuleStub sys.modules['ExpensiveModule'].__name__ = 'ExpensiveModule' Should do the trick -- Vyacheslav -- http://mail.python.org/mailman/listinfo/python-list

Re: CRLF when doing os.system(ls -l) while using curses !!!

2009-05-29 Thread Emile van Sebille
On 5/29/2009 1:34 PM lkenne...@gmail.com said... Here is the code and as you can see for yourself, the output is not coming out on the screen with CRLF like it should. Mine did: [r...@falcon]# python2 Python 2.3.3 (#1, May 11 2004, 14:44:08) [GCC 2.96 2731 (Red Hat Linux 7.1 2.96-85)] on

Re: [Python-mode] What text editor is everyone using for Python

2009-05-29 Thread Barry Warsaw
On May 28, 2009, at 7:09 AM, Andreas Roehler wrote: python-mode.el was its bloody-minded determination to regard '_' as a word character, something which caused me more typing that it ever saved. Its just one line to comment in python-mode.el, like this: ;; (modify-syntax-entry ?\_ w

Re: try except inside exec

2009-05-29 Thread Carl Banks
On May 29, 7:21 am, Michele Petrazzo michele.petra...@remove_me_unipex.it wrote: Hi all, I want to execute a python code inside a string and so I use the exec statement. The strange thing is that the try/except couple don't catch the exception and so it return to the main code. Is there a

[JOB] Plone Developer, Washington, D.C. - Relo OK | 55-75k

2009-05-29 Thread OSS
Plone Developer, Washington, D.C. - Relo OK | 55-75k shiverat** Government security clearance required ** ** Relocation assistance provided ** My client is seeking a full-time Plone Developer for work with the federal government. The applicant will be responsible for standardizing web formats

Re: try except inside exec

2009-05-29 Thread Carl Banks
On May 29, 7:21 am, Michele Petrazzo michele.petra...@remove_me_unipex.it wrote: Hi all, I want to execute a python code inside a string and so I use the exec statement. The strange thing is that the try/except couple don't catch the exception and so it return to the main code. Is there a

Re: CRLF when doing os.system(ls -l) while using curses !!!

2009-05-29 Thread Piet van Oostrum
lkenne...@gmail.com (l) wrote: l Here is the code and as you can see for yourself, the output is not l coming out on the screen with CRLF like it should. How do I fix this? Don't use curses. Curses puts the terminal in raw mode (more or less) which doesn't translate the newline character into

Re: [JOB] Plone Developer, Washington, D.C. - Relo OK | 55-75k

2009-05-29 Thread Scott David Daniels
OSS wrote: Plone Developer, Washington, D.C. - Relo OK | 55-75k You should post this to the Python Jobs board, and not here. http://www.python.org/community/jobs/ --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

Re: extract to dictionaries

2009-05-29 Thread Mike Kazantsev
On Thu, 28 May 2009 16:03:45 -0700 (PDT) Marius Retegan marius.s.rete...@gmail.com wrote: Hello I have simple text file that I have to parse. It looks something like this: parameters1 key1 value1 key2 value2 end parameters2 key1 value1 key2 value2 end So I

Re: Python, Tkinter and popen problem

2009-05-29 Thread norseman
Piet van Oostrum wrote: norseman norse...@hughes.net (n) wrote: n I have tried both and Popen2.popen2(). n os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? It reads from child while console writes directly to child - thus eliminating the problem of

Re: DrPython (Windows) problems

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 16:11:17 -0300, chrisv chr...@nospam.invalid escribió: Running DrPython under Linux works great. However, when I run it under Windows: Better to ask questions specific to a certain program, in its specific forum/mailing list/whatever. In this case, try

MySQLdb 1.2.2 + python 2.6.2

2009-05-29 Thread monogeo
Hi all, Are MySQLdb 1.2.2 and python 2.6.2 compatible? I went to http://sourceforge.net/project/showfiles.php?group_id=22307, it doesn't say it is compatible or not. When trying to install MySQLdb 1.2.2 on my machine which is running python 2.6.2 and windows XP, I get this error below. I am

Re: Questions about regex

2009-05-29 Thread Bobby
On May 29, 1:26 pm, jared.s.ba...@gmail.com wrote: Hello, I'm new to python and I'm having problems with a regular expression. I use textmate as my editor and when I run the regex in textmate it works fine, but when I run it as part of the script it freezes. Could anyone help me figure out

Re: DB-API execute params, am I missing something?

2009-05-29 Thread Lawrence D'Oliveiro
In message 0dcfcb4a-8844-420b-b2e2- c8e684197...@p6g2000pre.googlegroups.com, John Machin wrote: If you need to escape % or _ in a LIKE argument, do whatever the host convention is. E.g. you are searching for text that contains literally 5% discount, with SQLite you could do: [avoiding

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 06:52:15 -0300, Joachim Dahl dahl.joac...@gmail.com escribió: In Python2.x, I used PyFile_Check(obj) to check if a parameter was a file object. Now, in Python3.0 the same object (obtained as open('file.bin','wb')) is an io.BufferedWriter object. How do I perform type

Re: How does Python's OOP feel?

2009-05-29 Thread Lie Ryan
Ikon wrote: I'm rather new to Python. I have PHP for my main language and I do some Java. They all have a very strict OO schema. As I red through Python's tutorial it seams it has nothing of those rules. No statical, abstract classes, functions, or variables. I wish someone, who has

Re: newbie: popen question

2009-05-29 Thread Lie Ryan
thebiggestbangthe...@gmail.com wrote: On May 28, 5:31 am, Sebastian Wiesner basti.wies...@gmx.net wrote: Sean DiZazzo – Donnerstag, 28. Mai 2009 10:11 Your best bet is to make sudo not ask for a password. :) If you don't have the rights, then you can use pexpect to do what you want to do.

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 08:48:26 -0300, Benjamin Peterson benja...@python.org escribió: Joachim Dahl dahl.joachim at gmail.com writes: How do I perform type checking for such an object in the extension module, and how do I extract a FILE * object from it? I browsed the C API documentation,

Programming Praxis

2009-05-29 Thread Phil Bewig
Please visit my blog, a href=programmingpraxis.wordpress.comProgramming Praxis/a, which presents a collection of programming etudes. Newbies will find exercises that extend their programming abilities. Savvy programmers can use the exercises to sharpen their skills or learn a new language.

Re: Trying to get cleaner XML output from a text file

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 14:09:10 -0300, iainemsley iainems...@googlemail.com escribió: I'm using Python2.5 to try and convert some text files into XML using xml.minidom. I'm currently doing some plays which have a structure like Scene 1 Act 1 blah blah Act2 blah blah Scene 2 Act 1 and so on. (I

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 23:24:32 -0300, Benjamin Peterson benja...@python.org escribió: Gabriel Genellina gagsl-py2 at yahoo.com.ar writes: But you have to import the io module first, don't you? That's not usually necesary for most built in types -- e.g. PyFloat_Check just checks for a float

Re: How does Python's OOP feel?

2009-05-29 Thread Benjamin Kaplan
On Fri, May 29, 2009 at 9:41 PM, Lie Ryan lie.1...@gmail.com wrote: Ikon wrote: I'm rather new to Python. I have PHP for my main language and I do some Java. They all have a very strict OO schema. As I red through Python's tutorial it seams it has nothing of those rules. No statical,

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I can reproduce refleaks with only test_distutils now. E:\python-dev\py3k\Lib\testpy3k regrtest.py -R3:2: test_distutils test_distutils beginning 5 repetitions 12345 . test_distutils leaked [280, 280] references, sum=560 1 test

[issue6097] Encoded surrogate characters on command line not escaped in sys.argv

2009-05-29 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6097 ___ ___ Python-bugs-list

[issue5274] sys.exc_info()[1] - different handling from str() and unicode() - py 2.6

2009-05-29 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Duplicate of #6108. -- nosy: +georg.brandl resolution: - duplicate status: open - closed superseder: - unicode(exception) behaves differently on Py2.6 when len(exception.args) 1 ___ Python tracker

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Thanks, it fixed it. Applied in the trunk. Can you guys merge r73008 into Py3k please ? I have a problem today, I can't build py3k on Mac OS X anymore, I am trying to figure out why. -- ___

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Done in r73010. I think it would be better to patch release26maint.patch for release26-maint (and same patch for release30-maint) to complete super() issue. -- ___ Python tracker

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file14110/release26maint.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6131 ___

[issue4829] confusing error for file(foo, w++)

2009-05-29 Thread John Szakmeister
John Szakmeister j...@szakmeister.net added the comment: On trunk, it seems that it's perfectly happy if you specify more than one '+': Python 2.7a0 (trunk, May 29 2009, 05:57:26) [GCC 4.0.1 (Apple Inc. build 5470) (Aspen 5470.3)] on darwin Type help, copyright, credits or license for more

[issue6141] missing first argument on subprocess.Popen w/ executable

2009-05-29 Thread Lie Ryan
New submission from Lie Ryan lie.1...@gmail.com: Following from http://comments.gmane.org/gmane.comp.python.tutor/55576 import subprocess subprocess.Popen(['a', 'b', 'c', 'd'], executable='echo') subprocess.Popen object at 0x7fdf7bb2bd50 b c d instead of the (what I) expected result a b c d

[issue3329] API for setting the memory allocator used by Python

2009-05-29 Thread John Szakmeister
Changes by John Szakmeister j...@szakmeister.net: -- nosy: +jszakmeister ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___ ___

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done thx for the help. Do you happen to know the exact reason why using super rather than an explicit call avoids the leaking ? -- status: open - closed versions: +Python 2.6, Python 2.7, Python 3.0

[issue4618] print_function and unicode_literals don't work together

2009-05-29 Thread John Szakmeister
Changes by John Szakmeister j...@szakmeister.net: -- nosy: +jszakmeister ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4618 ___ ___

[issue6131] test_modulefinder leaks when run after test_distutils

2009-05-29 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Well, I don't know... But probably mixing super() and non super() caused too many call of setUp() or tearDown(). I saw such case before. To track down this, probably this info helps. 1. Revert to previous revision of distutils 2.

  1   2   >