[ANNOUNCE] PyGobject 2.18.0 - stable

2009-05-25 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.18.0 of the Python bindings for GObject. The new release is available from ftp.gnome.org as and its mirrors as soon as its synced correctly: http://download.gnome.org/sources/pygobject/2.18/ What's new since PyGObject 2.17.0? - Improve gio docs

[ANNOUNCE] PyGTK 2.15.1 - unstable

2009-05-25 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings for GTK+ has been released. The new release is available from ftp.gnome.org and its mirrors as soon as its synced correctly: http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.15/ Blurb: GTK+ is a toolkit for developing graphical

Version 0.12.0 of CodeInvestigator was released on May 26.

2009-05-25 Thread hans moleman
CodeInvestigator version 0.12.0 was released on May 26. Bug fixes: - A garbage collect issue with GTK - Aborting a run tries to retain as much debug information as possible New features: - A clock in the status window helps with locating the event handler in the list

Re: Can I get a technical explanation on the following error

2009-05-25 Thread Jim Garrison
And as an interesting exercise, try print r'test \' print r'test \\' Because of the way raw string parsing is defined, neither of these will pass the parser. In fact, a raw string cannot have a backslash as its last character. -- http://mail.python.org/mailman/listinfo/python-list

Re: 4 hundred quadrillonth?

2009-05-25 Thread Erik Max Francis
Dennis Lee Bieber wrote: On Mon, 25 May 2009 16:21:19 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand declaimed the following in gmane.comp.python.general: Interesting kind of mindset, that assumes that the opposite of real must be integer or a subset thereof... No, but

wxPython ICON constants

2009-05-25 Thread Water Bottle
I've been wondering, is there a way to grab icon information just given the type of OS? So if I wanted to grab the Firefox icon, how would I do that since the user could have changed the default icon to something else? Is there a library of these constants? --

RE: A fast way to read last line of gzip archive ?

2009-05-25 Thread Barak, Ron
Thanks David: excellent suggestions! I couldn't really go with the shell utilities approach, as I have no say in my user environment, and thus cannot assume which binaries are install on the user's machine. I'll try and implement your last suggestion, and see if the performance is acceptable to

Re: writing on file not until the end

2009-05-25 Thread Peter Otten
Alexzive wrote: I am a newby with python. I wrote the following code to extract a text from a file and write it to another file: linestring = open(path, 'r').read() #read all the inp file in linestring i=linestring.index(*NODE) i=linestring.index(E,i) e=linestring.index(*,i+10) textN

select.poll returning strange file descriptors.

2009-05-25 Thread Simon Wittber
I'm using the poll object from select.poll to check for events on sockets. It seems to work, however when I call .poll() on the poll objects, I sometimes get a fileno 1 returned, which is strange, because none of the sockets I registered with the poll object have a fileno of 1. In fact, the

Regarding sort()

2009-05-25 Thread Dhananjay
Hello All, I have data set as follows: 24 GLU3 47 LYS 6 3.9092331 42 PRO5 785 VAL 74 4.145114 1 54 LYS6 785 VAL 74 4.305017 1 55 LYS6 785 VAL 74 4.291098 1

Re: select.poll returning strange file descriptors.

2009-05-25 Thread Simon Wittber
Solved. I was using poll.register(fileno) without any flags specfied, which means tell me when _anything_ happens. Because of this, I was receiving OOB data, which seems to use strange fileno values. to fix this, I now use this: poll.register(sock.fileno(), select.POLLIN|select.POLLOUT|

Re: Optimizing math functions

2009-05-25 Thread Lawrence D'Oliveiro
In message 0033dace$0$9725$c3e8...@news.astraweb.com, Steven D'Aprano wrote: Minimizing functions of two variables is difficult, as a general rule. Nevertheless, there are tools for doing so. Check out SciPy. The name Marquadt-Levenberg comes to mind. As I recall, it involved finding zeroes

Re: PureData py/pyExt into standalone python

2009-05-25 Thread responsible7
Hi again, Comments inline: responsib...@gmail.com wrote: Hi guys, I've written some python classes for py/pyExt extensions for the dataflow graphical programming environment PureData. My classes talk to eachother via the PureData system, and they talk to the outside world via

SendMessage question

2009-05-25 Thread zhouhaifeng
Hi,I want to send ctrl + A and ctrl + C to a window, but my code can not work, who can help me ? Thanks a lot! hWnd = win32gui.FindWindow(None, “pad) print hWnd if hWnd 0: point = (555, 175) x, y = point win32api.SetCursorPos(point) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x, y, 0,

[OT] Python hunting

2009-05-25 Thread Iñigo Serna
Hi, excuse me for the off-topic, but today I've seen this video and... and... well, it's amazing http://dailymotion.virgilio.it/search/chasse%2Ben%2Bafrique/video/xz3rz_les-pythons-aiment-les-jambes_animals It's in French, but the audio it's not important. Kind regards, Iñigo Serna --

Re: help! Troubled when embed python into C++

2009-05-25 Thread A. Cavallo
You need the: int main(int argc, char * argv[]) { Py_Initialize(); PySys_SetArgv(argc, argv); PyRun_SimpleString(execfile(r'1.py')); Py_Finalize(); return 0; } Regards, Antonio On Sunday 24 May 2009 11:42:13 孟炜 wrote: I have the following codes in C++: #include Python.h

Re: Can I get a technical explanation on the following error

2009-05-25 Thread Chris Rebert
On Sun, May 24, 2009 at 1:14 PM, grocery_stocker cdal...@gmail.com wrote: On May 24, 11:47 am, Hans Müller heint...@web.de wrote: Try this: print \\ \ is the escape character, it masks the meaning of the next chararcter. If you write print \ python tries to print (the meaning of as the

Re: Re: 4 hundred quadrillonth?

2009-05-25 Thread Dave Angel
Lawrence D'Oliveiro wrote: In message mailman.525.1242941777.8015.python-l...@python.org, Christian Heimes wrote: Welcome to IEEE 754 floating point land! :) It used to be worse in the days before IEEE 754 became widespread. Anybody remember a certain Prof William Kahan from

Re: Re: Set a variable as in setter

2009-05-25 Thread Dave Angel
Kless wrote: On 24 mayo, 12:27, Duncan Booth duncan.bo...@invalid.invalid wrote: Kless jonas@googlemail.com wrote: Is there any way to simplify the next code? Because I'm setting a variable by default of the same way than it's set in the setter. --- class

Re: Python - R?

2009-05-25 Thread Dan Yamins
If so, what are you using? I have read about RPy, is that a good solution? Yes, I think it's quite a good solution. It's not exactly 100% as convenient as working directly in R, but that's IMO more than compensated by the ability to use Python's syntax. Make sure you use Rpy2 (the

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-25 Thread Lawrence D'Oliveiro
In message mailman.651.1243154739.8015.python-l...@python.org, Igor Katson wrote: I have written a socket server and some arbitrary clients. When I shutdown the server, and do socket.close(), I cannot immediately start it again cause it has some open sockets in TIME_WAIT state. It throws

Ted Dziuba

2009-05-25 Thread Lawrence D'Oliveiro
http://www.theregister.co.uk/2009/05/25/dziuba_microsoft_php/page2.html: If you've ever had to build C extensions to Python on Windows, you can join me in a feeling of satisfaction that someone at Microsoft is going to have to figure this out. Let's call it retribution for Internet

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-25 Thread Дамјан Георгиевски
I have written a socket server and some arbitrary clients. When I shutdown the server, and do socket.close(), I cannot immediately start it again cause it has some open sockets in TIME_WAIT state. It throws address already in use exception at me. I have searched for that in google but

Re: Regarding sort()

2009-05-25 Thread Jaime Fernandez del Rio
Hi Dhananjay, Sort has several optional arguments, the function's signature is as follows: s.sort([cmp[, key[, reverse]]]) If you store your data as a list of lists, to sort by the third column you could do something like: data.sort(None, lambda x : x[2]) For more complex sortings, as the one

Re: SendMessage question

2009-05-25 Thread David Lyon
you might have more luck with http://pypi.python.org/pypi/SendKeys/0.3 On Sat, 23 May 2009 08:58:14 +0800, zhouhaifeng myprom...@sina.com wrote: Hi,I want to send ctrl + A and ctrl + C to a window, but my code can not work, who can help me ? Thanks a lot! hWnd =

Re: Re: 4 hundred quadrillonth?

2009-05-25 Thread Lawrence D'Oliveiro
In message mailman.702.1243237468.8015.python-l...@python.org, Dave Angel wrote: Lawrence D'Oliveiro wrote: Anybody remember a certain Prof William Kahan from Berkeley ... I remember the professor. He was responsible for large parts of the Intel 8087 specification, which later got

Re: How to send a compsite key to window

2009-05-25 Thread Gabriel Genellina
En Thu, 21 May 2009 09:38:26 -0300, zhouhaifeng myprom...@sina.com escribió: just like ctrl + A, I want to select all the text in a window, now , I operate right menu to get it, but it can not work all the time. so I want to send ctrl + a to the window I'd do it in a different way: asuming

Re: Regarding sort()

2009-05-25 Thread Peter Otten
Dhananjay wrote: Hello All, I have data set as follows: 24 GLU3 47 LYS 6 3.9092331 42 PRO5 785 VAL 74 4.145114 1 54 LYS6 785 VAL 74 4.305017 1 55 LYS6 785 VAL

Re: Regarding sort()

2009-05-25 Thread Peter Otten
Peter Otten wrote: rows = data.splitlines() rows.sort(key=lambda line: int(line.split()[5])) rows.sort(key=lambda line: int(line.split()[2])) print \n.join(rows) Of course you can also sort in a single step: rows = data.splitlines() def key(row): ... columns = row.split() ...

Re: Regarding sort()

2009-05-25 Thread Chris Rebert
On Mon, May 25, 2009 at 12:29 AM, Dhananjay dhananjay.c.jo...@gmail.com wrote: Hello All, I have data set as follows: 24   GLU    3   47  LYS 6   3.909233    1 42   PRO    5   785 VAL 74  4.145114 1 54   LYS    6   785 VAL 74   

Re: Regarding sort()

2009-05-25 Thread Chris Rebert
On Mon, May 25, 2009 at 12:51 AM, Jaime Fernandez del Rio jaime.f...@gmail.com wrote: Hi Dhananjay, Sort has several optional arguments, the function's signature is as follows: s.sort([cmp[, key[, reverse]]]) If you store your data as a list of lists, to sort by the third column you could

Re: writing on file not until the end

2009-05-25 Thread Alessandro
On May 25, 8:38 am, Peter Otten __pete...@web.de wrote: Alexzive wrote: I am a newby with python. I wrote the following code to extract a text from a file and write it to another file: linestring = open(path, 'r').read() #read all the inp file in linestring i=linestring.index(*NODE)

Re: Need Help

2009-05-25 Thread abosalim
On May 25, 5:39 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 25 May 2009 00:16:19 +0200, Piet van Oostrum wrote: By the way, it is better to add python code as attachment instead of inline text because some news software might fold the lines like in your posting,

Re: Multiprocessing and file I/O

2009-05-25 Thread Infinity77
Hi Paul All, On May 24, 4:16 pm, Paul Boddie p...@boddie.org.uk wrote: On 24 Mai, 16:13, Infinity77 andrea.gav...@gmail.com wrote: No, the processing of the data is fast enough, as it is very simple. What I was asking is if anyone could share an example of using multiprocessing to read

Re: Optimizing math functions

2009-05-25 Thread Charlie
Esmail ebonak at hotmail.com writes: Charlie wrote: You might also look at: http://pyparasol.sourceforge.net/example_1.html Thanks for this lead, I had never heard of parasol before. Do you know if this also works under Linux? The docs mention only the Windows platform, but given

Re: writing on file not until the end

2009-05-25 Thread Peter Otten
Alessandro wrote: - until now, the only solution which works is to repeat the code while the file is still open, which means a quite redundant code: linestring = open(path, 'r').read() i=linestring.index(*NODE) i=linestring.index(E,i) e=linestring.index(*,i+10) textN =

Re: writing on file not until the end

2009-05-25 Thread John Machin
On May 25, 6:30 pm, Alessandro zasaconsult...@gmail.com wrote: On May 25, 8:38 am, Peter Otten __pete...@web.de wrote: Alexzive wrote: I am a newby with python. I wrote the following code to extract a text from a file and write it to another file: linestring = open(path,

Re: Can I get a technical explanation on the following error

2009-05-25 Thread Niklas Norrthon
On 25 Maj, 05:29, Jim Garrison j...@acm.org wrote: And as an interesting exercise, try print r'test \' print r'test \\' Because of the way raw string parsing is defined, neither of these will pass the parser.  In fact, a raw string cannot have a backslash as its last character. Tried it:

Re: writing on file not until the end

2009-05-25 Thread Alessandro
On May 25, 10:58 am, John Machin sjmac...@lexicon.net wrote: On May 25, 6:30 pm, Alessandro zasaconsult...@gmail.com wrote: On May 25, 8:38 am, Peter Otten __pete...@web.de wrote: Alexzive wrote: I am a newby with python. I wrote the following code to extract a text from a file

Re: Regarding sort()

2009-05-25 Thread Jaime Fernandez del Rio
On Mon, May 25, 2009 at 10:15 AM, Chris Rebert c...@rebertia.com wrote: Erm, using a compare function rather than a key function slows down sorting /significantly/. In fact, the `cmp` parameter to list.sort() has been *removed* in Python 3.0 because of this. Makes a lot of sense, as you only

Re: Can I get a technical explanation on the following error

2009-05-25 Thread pdpi
On May 24, 6:41 pm, grocery_stocker cdal...@gmail.com wrote: How come something like '\'  causes an error? Here is what I mean. [cdal...@localhost ~]$ python Python 2.6.2 (r262:71600, May  3 2009, 17:04:44) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type help, copyright, credits or

Re: Regarding sort()

2009-05-25 Thread Neil Crighton
Dhananjay dhananjay.c.joshi at gmail.com writes: I want to sort the data on the basis of 3rd column first and latter want to sort the sorted data (in first step) on the basis of 6th column.I tried sort() function but could not get the way how to use it.I am new to programming, please tell

Re: 4 hundred quadrillonth?

2009-05-25 Thread Hendrik van Rooyen
Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 24 May 2009 22:47:51 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand declaimed the following in gmane.comp.python.general: As for exactitude in physics, Gregory Chaitin among others has been trying to rework physics

INVITATION FLIB: Fringe/Functional Languages In Barcelona user group.

2009-05-25 Thread jos koot
INVITATION We, (Jose A. Ortega Ruiz j...@gnu.org, Andy Wingo wi...@pobox.com and Jos Koot jos.k...@telefonica.net) have scheduled a meeting in Barcelona (Spain) with the intention to form a user group FLIB: Fringe/ Functional Languages In Barcelona. Everyone who is interested in shaping this group

Re: Python - R?

2009-05-25 Thread Esmail
Dan Yamins wrote: If so, what are you using? I have read about RPy, is that a good solution? Yes, I think it's quite a good solution. It's not exactly 100% as convenient as working directly in R, but that's IMO more than compensated by the ability to use Python's syntax. Make

Re: Python - R?

2009-05-25 Thread Esmail
edexter wrote: I was playing around with a r sound module and looking at the graphic stuff and I have downloaded the rpy thing but I have never used it I have been looking for a good excuse to use it... It looks like it could be useful for graphing stuff or maybe alogrithmic (spelling I

Re: email scanning for X-Spam-Score

2009-05-25 Thread Peter Otten
Helmut Jarausch wrote: my emails received from our mailing system contain a field like X-Spam-Score: -2.2 Given the full email message in 'msg' I've tried mailmsg = email.message_from_string(msg) SPAM_CORE = mailmsg['X-Spam-Score'] but it doesn't work. What do you mean by

Re: email scanning for X-Spam-Score

2009-05-25 Thread Helmut Jarausch
Peter Otten wrote: Helmut Jarausch wrote: my emails received from our mailing system contain a field like X-Spam-Score: -2.2 Given the full email message in 'msg' I've tried mailmsg = email.message_from_string(msg) SPAM_CORE = mailmsg['X-Spam-Score'] but it doesn't work. What do you

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-25 Thread Roy Smith
In article gvd1id$8j...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-3c4ded.09214724052...@news.panix.com, Roy Smith wrote: In article gvb8fn$7g...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: The right

formating query with empty parameter

2009-05-25 Thread someone
Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def __insert(self, data): query = BEGIN; INSERT INTO table

Re: formating query with empty parameter

2009-05-25 Thread Diez B. Roggisch
someone wrote: Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def __insert(self, data): query = BEGIN;

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:15 pm, Diez B. Roggisch de...@nospam.web.de wrote: someone wrote: Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:25 pm, Pet petshm...@googlemail.com wrote: On May 25, 2:15 pm, Diez B. Roggisch de...@nospam.web.de wrote: someone wrote: Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such

Re: formating query with empty parameter

2009-05-25 Thread Peter Otten
Pet wrote: someone wrote: Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def __insert(self, data): query =

Re: formating query with empty parameter

2009-05-25 Thread Tim Chase
if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def __insert(self, data): query = BEGIN; INSERT INTO table

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

2009-05-25 Thread J Kenneth King
Giovanni Gherdovich giovanni.gherdov...@sophia.inria.fr writes: Hello everybody, basically I'm writing here since I cannot make my python.el work (a major mode for writing python with emacs), but I would also like to share my user experience and tell you what I think an emacs mode should

Re: writing on file not until the end

2009-05-25 Thread Dave Angel
Alessandro wrote: snip I closed and restarted the python console. Now this code (with added Nfile.close() at the end) seems to work properly: linestring = open(path, 'r').read() i=linestring.index(*NODE) i=linestring.index(E,i) e=linestring.index(*,i+10) textN = linestring[i+2:e-1] Nfile =

exec statement with/without prior compile...

2009-05-25 Thread Jaime Fernandez del Rio
These weekend I've been tearing down to pieces Michele Simionato's decorator module, that builds signature preserving decorators. At the heart of it all there is a dynamically generated function, which works something similar to this... ... src = def function(a,b,c) :\nreturn

Re: Need Help

2009-05-25 Thread Piet van Oostrum
abosalim mohammed.abosa...@gmail.com (a) wrote: a I modified the method,but it can't identified it.(self.res=textcorrect a (self.string) a NameError: global name 'textcorrect' is not defined) a This is what i done: [...] a class Ex3: [...] a def textcorrect(str): a s=[] a

Re: Can I get a technical explanation on the following error

2009-05-25 Thread Piet van Oostrum
Jim Garrison j...@acm.org (JG) wrote: JG And as an interesting exercise, try JG print r'test \' JG print r'test \\' JG Because of the way raw string parsing is defined, neither of these will JG pass the parser. In fact, a raw string cannot have a backslash as JG its last character. Cannot

Re: [ANN] vim patch to support python3 interface

2009-05-25 Thread Roland Puntaier
vim_...@googlegroups.com schrieb am 21.05.2009 14:27:13: On 12/05/09 18:35, Roland Puntaier wrote: Hello, I have ported vim's python interface (if_python.c) to the python3 C-API. The changed files are: - Makefile (for linux) - Make_mvc.mak (for windows) - if_python3.c is a new

How to pickle a 'PySwigObject' ?

2009-05-25 Thread Barak, Ron
Hi, I have a wxPython application that is creating a subprocess that performs a lengthy log analysis. Currently, the subprocess is displaying its results using its own MainLoop(). I want to display the subprocess' results using the parent process' MainLoop(). I tried to pickle the class

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:50 pm, Peter Otten __pete...@web.de wrote: Pet wrote: someone wrote: Hello! if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty.

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 3:26 pm, Tim Chase python.l...@tim.thechases.com wrote: if one of parameter in values is empty, I'm getting TypeError: not enough arguments for format string But how to handle such situation? It is ok for DB, that some of values are empty. def __insert(self, data):        

unicode confusing

2009-05-25 Thread someone
Hi, reading content of webpage (encoded in utf-8) with urllib2, I can't get parsed data into DB Exception: File /usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py, line 3111, in execute raise OperationalError, msg libpq.OperationalError: ERROR: invalid UTF-8 byte sequence detected near

Re: I need help building a data structure for a state diagram

2009-05-25 Thread Paul McGuire
On May 24, 1:16 pm, Matthew Wilson m...@tplus1.com wrote: I'm working on a really simple workflow for my bug tracker.  I want filed bugs to start in an UNSTARTED status.  From there, they can go to STARTED. I just wrote an article for the April issue of Python Magazine on how to add embedded

Re: formating query with empty parameter

2009-05-25 Thread Tim Chase
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,e,f,g) VALUES

Re: formating query with empty parameter

2009-05-25 Thread Peter Otten
Pet wrote: On May 25, 2:50 pm, Peter Otten __pete...@web.de wrote: cursor.execute(query, *values) # wrong as far as I know it is not wrong, at least for pyPgSQL it takes values and escapes properly preventing sql injections If so replace # wrong with # superfluous ;) Peter --

Re: formating query with empty parameter

2009-05-25 Thread Pet
On 25 Mai, 18:16, 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 = ', '.join('%s' for _ in values)

Re: from __future__ import absolute_import issue

2009-05-25 Thread LittleGrasshopper
On May 23, 6:39 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 23 May 2009 12:32:24 -0300, LittleGrasshopper   seattleha...@yahoo.com escribió: On May 22, 12:42 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Wed, 20 May 2009 20:18:02 -0300, LittleGrasshopper  

What text editor is everyone using for Python

2009-05-25 Thread LittleGrasshopper
With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. I normally use vi, and just got into Python, so I am looking for suitable syntax files for it, and extra utilities. I dabbled with emacs at some point, but couldn't get through the key bindings for

Re: What text editor is everyone using for Python

2009-05-25 Thread J Kenneth King
LittleGrasshopper seattleha...@yahoo.com writes: With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. I normally use vi, and just got into Python, so I am looking for suitable syntax files for it, and extra utilities. I dabbled with emacs at

Re: What text editor is everyone using for Python

2009-05-25 Thread LittleGrasshopper
On May 25, 10:44 am, J Kenneth King ja...@agentultra.com wrote: LittleGrasshopper seattleha...@yahoo.com writes: With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. I normally use vi, and just got into Python, so I am looking for suitable

Re: What text editor is everyone using for Python

2009-05-25 Thread Mr.SpOOn
2009/5/25 LittleGrasshopper seattleha...@yahoo.com: I know Google (as a matter I read this group from Google.) I was hoping for some new insightful responses. It's just too hot to start a flame :P -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-25 Thread Esmail
LittleGrasshopper wrote: So what do you guys use, and why? Hopefully we can keep this civil. I use Emacs, just because I have been using this editor for all sorts of things in the last 20+ years. I haven't been able to get the python mode to work for Windows (do most of my work under Linux

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-25 Thread M.-A. Lemburg
Martin v. Löwis wrote: Thomas Wouters reminded me of a long-standing idea; I finally found the time to write it down. Please comment! ... Up until this PEP proposal, we had a very simple scheme for the Python C-API: all documented functions and variables with a Py prefix were part of the

Re: What text editor is everyone using for Python

2009-05-25 Thread Ryniek90
Temat: Re: What text editor is everyone using for Python Od: Esmail ebo...@hotmail.com Data: Mon, 25 May 2009 14:07:24 -0400 Do: python-list@python.org Do: python-list@python.org LittleGrasshopper wrote: So what do

Re: What text editor is everyone using for Python

2009-05-25 Thread Marcelo de Moraes Serpa
emacs is a swiss-knife, good for small, medium, big or huge projects, or single files On Mon, May 25, 2009 at 1:24 PM, Ryniek90 rynie...@gmail.com wrote: Temat: Re: What text editor is everyone using for Python Od:

Are Python-based web frameworks reliable enough?

2009-05-25 Thread Gilles Ganault
Hello Until now, the modest web apps I wrote were all in PHP because it's available on just about any hosted server. I now have a couple of ideas for applications where I would deploy my own servers, so that I'd rather write them in Python because I find the language more pleasant to

Re: Are Python-based web frameworks reliable enough?

2009-05-25 Thread Krishnakant
On Mon, 2009-05-25 at 20:49 +0200, Gilles Ganault wrote: Hello Until now, the modest web apps I wrote were all in PHP because it's available on just about any hosted server. I now have a couple of ideas for applications where I would deploy my own servers, so that I'd rather write

Re: how to get rid of pyc files ?

2009-05-25 Thread pythoncurious
On May 25, 12:08 am, Dave Angel da...@ieee.org wrote: Is Clearcase still around?  I hope it works better than it did in 1992. I don't know how it worked back then, but if it's worse than today, I don't know how they ever managed to get people to use it. I'm not a fan and I don't have a choice

Re: how to get rid of pyc files ?

2009-05-25 Thread pythoncurious
On May 25, 12:07 am, John Machin sjmac...@lexicon.net wrote: switching scarcely seems to be the right description. You appear to be running the same code from one repository simultaneously available to two different platforms. Try this: Instead of running your code straight from your

Re: What text editor is everyone using for Python

2009-05-25 Thread Günther Dietrich
LittleGrasshopper seattleha...@yahoo.com wrote: With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. [...] So what do you guys use, and why? Hopefully we can keep this civil. I found 'EasyEclipse for Python' soon after I began using Python. With

Re: What text editor is everyone using for Python

2009-05-25 Thread Roy Smith
LittleGrasshopper seattleha...@yahoo.com wrote: I normally use vi [...] I dabbled with emacs at some point [...] So what do you guys use, and why? Hopefully we can keep this civil. I'm confused. You put emacs and vi in the same paragraph and then expect the conversation to remain civil?

Determining 32 bit vs 64 bit Python and numpy

2009-05-25 Thread mmanns
Hi I am looking for a robust, cross-platform way to determine if I am on a 32 bit or a 64 bit Python and if the numpy installation is also 32 bit or 64 bit. I have googled a bit and found some platform specific solutions but nothing general. The solution should work with different versions of

Re: Determining 32 bit vs 64 bit Python and numpy

2009-05-25 Thread Martin v. Löwis
I am looking for a robust, cross-platform way to determine if I am on a 32 bit or a 64 bit Python and if the numpy installation is also 32 bit or 64 bit. You can find out the size of a pointer with struct.calcsize(P) * 8. Numpy will have the same configuration if you can import it. Regards,

Re: Determining 32 bit vs 64 bit Python and numpy

2009-05-25 Thread mmanns
On Mon, 25 May 2009 23:54:45 +0200 Martin v. Löwis mar...@v.loewis.de wrote: I am looking for a robust, cross-platform way to determine if I am on a 32 bit or a 64 bit Python and if the numpy installation is also 32 bit or 64 bit. You can find out the size of a pointer with

Re: Optimizing math functions

2009-05-25 Thread Esmail
Charlie wrote: It might work under Linux, however, it was developed under Windows and, to my knowledge, has never been tested on a Linux machine. Basic operation only depends on installations of matplotlib, numpy, and scipy. Those packages are all available on Linux. If you try it, I'd like

Re: how to get rid of pyc files ?

2009-05-25 Thread John Machin
On May 26, 6:04 am, pythoncuri...@gmail.com wrote: On May 25, 12:07 am, John Machin sjmac...@lexicon.net wrote: switching scarcely seems to be the right description. You appear to be running the same code from one repository simultaneously available to two different platforms. Try this:

Re: A fast way to read last line of gzip archive ?

2009-05-25 Thread David Bolen
Barak, Ron ron.ba...@lsi.com writes: I couldn't really go with the shell utilities approach, as I have no say in my user environment, and thus cannot assume which binaries are install on the user's machine. I suppose if you knew your target you could just supply the external binaries to go

Re: What text editor is everyone using for Python

2009-05-25 Thread John Yeung
On May 25, 4:28 pm, Roy Smith r...@panix.com wrote: I'm confused.  You put emacs and vi in the same paragraph and then expect the conversation to remain civil? :-) I know! He is really asking a lot! Ultimately, I think if you are comfortable with vi, stick with vi. There are plenty of people

Re: Searching for pyvm

2009-05-25 Thread A. Cavallo
http://students.ceid.upatras.gr/~sxanth/pyvm/ Does this help? Regards, Antonio On Monday 25 May 2009 00:19:57 Vladimir G. Ivanovic wrote: Hello, I'm looking for the sources to pyvm, a python virtual machine implementation which can run Python 2.4 bytecode. If someone could point me in the

email scanning for X-Spam-Score

2009-05-25 Thread Helmut Jarausch
Hi, my emails received from our mailing system contain a field like X-Spam-Score: -2.2 Given the full email message in 'msg' I've tried mailmsg = email.message_from_string(msg) SPAM_CORE = mailmsg['X-Spam-Score'] but it doesn't work. What am I missing? Many thanks for a hint, Helmut. --

Network programming ?

2009-05-25 Thread thushianthan15
Hi everyone, 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 for windows? I

Re: Network programming ?

2009-05-25 Thread Ralf Schoenian
thushiantha...@gmail.com wrote: Hi everyone, 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

any lib to extract pages form pdf and then merge?

2009-05-25 Thread oyster
I want to extract some pages from vary pdf files, then write them with/witout rotation into one new pdf file. something likes this [py] import gfx doc = gfx.open(pdf, rTheory.pdf) pdf = gfx.PDF() for pagenr in [1,5,7]: page = doc.getPage(pagenr) if pagenr==1: page.rotate(90)

Re: What text editor is everyone using for Python

2009-05-25 Thread Steven D'Aprano
On Mon, 25 May 2009 10:35:03 -0700, LittleGrasshopper wrote: With so many choices, I was wondering what editor is the one you prefer when coding Python, and why. I use kwrite when on a GUI. When I can't avoid editing files remotely over ssh, I use nano. Why? I dislike Gnome's user-interface,

Re: any lib to extract pages form pdf and then merge?

2009-05-25 Thread CTO
On May 26, 12:47 am, oyster lepto.pyt...@gmail.com wrote: I want to extract some pages from vary pdf files, then write them with/witout rotation into one new pdf file. something likes this [py] import gfx doc = gfx.open(pdf, rTheory.pdf) pdf = gfx.PDF() for pagenr in [1,5,7]:     page =

[issue6104] OSX framework builds fail after r72861 move of _locale into core library

2009-05-25 Thread Ned Deily
New submission from Ned Deily n...@acm.org: Undefined symbols: _CFStringConvertEncodingToIANACharSetName, referenced from: _PyLocale_getdefaultlocale in libpython3.1.a(_localemodule.o) _CFStringGetSystemEncoding, referenced from: _PyLocale_getdefaultlocale in

[issue5756] idle pydoc et al removed from 3.1 without versioned replacements

2009-05-25 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Yep, r72866 does restore 2to3. And r72857, which removes the fullinstall target, also fixes the problem of unversioned python and python-config files being created in bin. Thanks! -- ___ Python tracker

  1   2   >