Re: What text editor is everyone using for Python

2009-05-29 Thread Ben Finney
Gabor Urban 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 > independent o

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 undiscove

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 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 mentioned t

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? -- http://mail.p

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 w

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

2009-05-29 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Thu, 28 May 2009 20:57:13 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >>> >>>>>> db.literal((... "%wildcard%" ...)) >>>(... "'%wildcard%'" ...) >> >> Doesn't look like it worked, does it? > > If the

Re: Python, Tkinter and popen problem

2009-05-29 Thread Piet van Oostrum
> norseman (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 readi

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 f

Re: Global variables from a class

2009-05-29 Thread Piet van Oostrum
> Kless (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: >K>var = 'lala' >K> class Bar: >K>def __init__(self): >K> self.var = 'lele' >

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, 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 returning from a function?

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 wr

Re: python list pattern matching?

2009-05-29 Thread Chris Rebert
On Thu, May 28, 2009 at 3:57 PM, Terry Reedy 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: >>    se

Re: Tkinter file dialog

2009-05-29 Thread Chris Rebert
On Thu, May 28, 2009 at 7:48 PM, 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: > > > How would I print the directory path? p

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 used

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 used

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: > > >How would I print the directory path? try doing: self.filename = tkFileDial

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: How would I print the directory path? Perhaps you meant: self.file = tkFileDialo

Re: extract to dictionaries

2009-05-29 Thread Marius Retegan
Hi, On Fri, May 29, 2009 at 2:09 AM, Gary Herron wrote: > 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 >> en

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

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Benjamin Peterson
Joachim Dahl 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 instance

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
On Fri, 29 May 2009 11:44:30 +0100, Marius Retegan wrote: Hi, On Fri, May 29, 2009 at 2:09 AM, Gary Herron wrote: 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 k

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
On Fri, 29 May 2009 13:10:47 +0100, Rhodri James 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" 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, or use cr

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 var

Re: formating query with empty parameter

2009-05-29 Thread Aahz
In article , Tim Chase 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 = ', '.join('%s' for _ in values) > query = """ > BEGIN; > INSERT

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

2009-05-29 Thread Aahz
In article , Lawrence D'Oliveiro wrote: >In message , Steven >D'Aprano wrote: >> On Tue, 26 May 2009 18:31:56 +1200, Lawrence D'Oliveiro wrote: >>> In message >> b201-4b2445732...@v35g2000pro.googlegroups.com>, LittleGrasshopper >>> wrote: ... I am looking for suitable syntax files fo

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 m

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 s

Re: Global variables from a class

2009-05-29 Thread Dave Angel
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?

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 ter

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 I

Re: formating query with empty parameter

2009-05-29 Thread Tim Chase
Aahz wrote: Tim Chase 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 = ', '.join('%s' for _ in values) query = """ BEGIN; INSERT INTO table (a,b,c,d

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 containi

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

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

2009-05-29 Thread J Kenneth King
Piet van Oostrum writes: >> J Kenneth King (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 opening a python

try except inside exec

2009-05-29 Thread Michele Petrazzo
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 solution to convert or make this code work? Thanks, Michele My code: STR = """ err = 0

Re: how to change response code in CGIHTTPServer.py

2009-05-29 Thread Jeff McNeil
On May 28, 2:23 pm, Daniel 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, > self.send_response

Re: try except inside exec

2009-05-29 Thread Aaron Brady
On May 29, 8:21 am, Michele Petrazzo 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 solution to convert or make this co

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 mailto:gher...@islandtraining.com>> wrote: Marius Retegan wrote: Hello I have simple text file that I have to parse. It looks something like this: parameters1 key1

Re: Network programming ?

2009-05-29 Thread Aahz
In article , 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 ? Also, i want to >develop a gui for that program. What are the gui tool kits available >f

Re: formating query with empty parameter

2009-05-29 Thread Aahz
In article , Tim Chase wrote: >Aahz wrote: >> Tim Chase 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 = ', '.join('%s' fo

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

Re: try except inside exec

2009-05-29 Thread Michele Petrazzo
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 env try: env["a_funct"]() except ZeroDivisionError: import traceback err = traceback.for

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

IFL 2009: Second Call for Papers

2009-05-29 Thread IFL 2009
Call for Papers IFL 2009 Seton Hall University SOUTH ORANGE, NJ, USA http://tltc.shu.edu/blogs/projects/IFL2009/ ** NEW ** Accomodations information available: http://tltc.shu.edu/blogs/projects/IFL2009/accommodations.html Jane Street Capital has joined IFL 2009 as a sponsor * The

Re: try except inside exec

2009-05-29 Thread Emile van Sebille
On 5/29/2009 8:55 AM Michele Petrazzo said... Aaron Brady wrote: Then the formatted exception will be available in 'err'. Do you want the exception-handling to be part of the function you are entering into 'env'? My goal is to execute a function received from a third-part, so I cannot modi

Re: try except inside exec

2009-05-29 Thread David Stanek
On Fri, May 29, 2009 at 11:55 AM, Michele Petrazzo 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" > error message. This means that t

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 de

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

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 1 1 2 (or ideally bit I can always come back t

Re: Parsing DTDs

2009-05-29 Thread Piet van Oostrum
> Tom Anderson (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> featur

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 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 env > > t

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 scrip

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 pro

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()): newmatrix.append(_determinan

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 d

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" p

Re: try except inside exec

2009-05-29 Thread Carl Banks
On May 29, 7:21 am, Michele Petrazzo 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 solution to convert or make this co

[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 alr

Re: try except inside exec

2009-05-29 Thread Carl Banks
On May 29, 7:21 am, Michele Petrazzo 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 solution to convert or make this co

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 charac

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 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 want to create

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

2009-05-29 Thread Martin v. Löwis
>>> 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, or use crle(8). >> > I'm not sure I understand. It app

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

2009-05-29 Thread Marcelo de Moraes Serpa
stop! Use the editor you are comfortable with. No flame wars please, even though Emacs is the way to enlightenment :) On Fri, May 29, 2009 at 4:10 PM, Barry Warsaw wrote: > On May 28, 2009, at 7:09 AM, Andreas Roehler wrote: > > python-mode.el was its bloody-minded determination to regard '_' a

Re: Python, Tkinter and popen problem

2009-05-29 Thread norseman
Piet van Oostrum wrote: norseman (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 coding a pass throug

Re: DrPython (Windows) problems

2009-05-29 Thread Gabriel Genellina
En Fri, 29 May 2009 16:11:17 -0300, chrisv 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 http://drpython.sourceforge.net/help

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 able

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

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

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 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 checking for such an objec

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 ex

Re: newbie: popen question

2009-05-29 Thread Lie Ryan
thebiggestbangthe...@gmail.com wrote: > On May 28, 5:31 am, Sebastian Wiesner wrote: >> >> >>> 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. http://pexpect.sourceforge.net/pexpect.html >>> See

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 escribió: Joachim Dahl 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 u

Re: FILE object in Python3.0 extension modules

2009-05-29 Thread Benjamin Peterson
Gabriel Genellina 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 object. Well, in 3.x, file is not longer a builtin type. -- http://mail.python.org/mailma

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

2009-05-29 Thread John Machin
On May 30, 11:35 am, Lawrence D'Oliveiro wrote: > 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 li

Programming Praxis

2009-05-29 Thread Phil Bewig
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 submit their code to th

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 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 think you get the hierarc

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 escribió: Gabriel Genellina 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 object. Well, in 3.x, file is

Re: How does Python's OOP feel?

2009-05-29 Thread Benjamin Kaplan
On Fri, May 29, 2009 at 9:41 PM, Lie Ryan 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, > > abstract clas

problem with pylint + PyQt4

2009-05-29 Thread Vito De Tullio
I'm having probles using pylint on a PyQt4 application. $ cat TEST_pylint.py import PyQt4.QtCore from PyQt4.QtGui import QApplication $ python TEST_pylint.py # no import errors $ pylint --disable-msg=C0103 --disable-msg=C0111 --disable-msg=W0611 \ > TEST_pylint.py **