Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread Gabriel Genellina
QOTW: I stopped paying much attention to this thread a while ago, but you've got to admire the persistence of somebody who soldiers on even though Aahz, Fredrik Lund, and Steve Holden are all on the other side of the argument... - Grant Edwards

Re: end child process when parent dies (on Unix)

2008-11-17 Thread Дамјан Георгиевски
I'm starting a Unix tool with subprocess.Popen() from a python script and I want the child to be killed when the parent (my script) ends for whatever reason *including* if it gets killed by SIGKILL. A Linux-specific solution is prctl(2). I've tried this in a test C program... exactly what I

Re: Newbie code review of parsing program Please

2008-11-17 Thread Mark Tolonen
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mark Tolonen wrote: len [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [...] You might want to check out the pyparsing library. And you might want to trim your messages to avoid quoting irrelevant stuff.

Re: end child process when parent dies (on Unix)

2008-11-17 Thread Lawrence D'Oliveiro
Дамјан Георгиевски wrote: I'm starting a Unix tool with subprocess.Popen() from a python script and I want the child to be killed when the parent (my script) ends for whatever reason *including* if it gets killed by SIGKILL. A Linux-specific solution is prctl(2). I've tried this in a

Re: Newbie code review of parsing program Please

2008-11-17 Thread Lawrence D'Oliveiro
Mark Tolonen wrote: Point taken...or I could top post ;^) A: A Rolls seats six. Q: What's the saddest thing about seeing a Rolls with five top-posters in it going over a cliff? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread George Sakkis
On Nov 17, 12:25 am, W. eWatson [EMAIL PROTECTED] wrote: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z, etc. http://www.catb.org/~esr/faqs/smart-questions.html#writewell --

Re: C Function Pointer Wrapping Example not working

2008-11-17 Thread Aaron Brady
On Nov 16, 8:56 pm, Charlie [EMAIL PROTECTED] wrote:  But when I try to import test in python, it complains:  import _test  ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE The above is a mangled name so you've got some C vs C++ problems I'd say. You could try

Re: Official definition of call-by-value (Re: Finding the instancereference...)

2008-11-17 Thread Hendrik van Rooyen
Terry Reedy [EMAIL PROTECTED] wrote: I think the important point is this. In Python, objects are self-identifying bundles of information, which is to say, the bundle includes knowledge of the which universe of possible bundles the object comes from, where the universe includes a set of

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread Chris Rebert
On Sun, Nov 16, 2008 at 9:25 PM, W. eWatson [EMAIL PROTECTED] wrote: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista For the supported OSes, check the links for the versions on http://python.org/download/ and see whether downloads are

Re: Newbie code review of parsing program Please

2008-11-17 Thread John Machin
On Nov 17, 7:11 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: Mark Tolonen wrote: Point taken...or I could top post ;^) A: A Rolls seats six. Q: What's the saddest thing about seeing a Rolls with five top-posters in it going over a cliff? +1 but you forgot the

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread Ben Finney
W. eWatson [EMAIL PROTECTED] writes: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z, etc. I don't understand the question. Do you have some question about the operating system requirements

svg and html

2008-11-17 Thread Reimar Bauer
Hi does one know a project / tool which can be embedded (or interact with) into a webpage and does read and save svg files? cheers Reimar -- http://mail.python.org/mailman/listinfo/python-list

Re: Midi manipulation

2008-11-17 Thread Massi
On 16 Nov, 23:23, Tim Roberts [EMAIL PROTECTED] wrote: Massi [EMAIL PROTECTED] wrote: Hi everyone, I'm searching for something which allows me to write scripts which handle midi files. I'm totally a newbie in audio manipulation, therefore any suggestion or link related to this field is

Re: Little direction please Python MySQL

2008-11-17 Thread Lawrence D'Oliveiro
len wrote: Files are fixed format no field delimiters, fields are position and length records are terminated by newline. Assuming no COMPUTATIONAL fields, it should be easy enough to split each line up into fixed-length pieces, e.g. assuming a simple example 01 Sample-Record. 02

Re: Midi manipulation

2008-11-17 Thread Banibrata Dutta
On Mon, Nov 17, 2008 at 2:43 PM, Massi [EMAIL PROTECTED] wrote: On 16 Nov, 23:23, Tim Roberts [EMAIL PROTECTED] wrote: Massi [EMAIL PROTECTED] wrote: Hi everyone, I'm searching for something which allows me to write scripts which handle midi files. I'm totally a newbie in audio

Python3 - it's awesome

2008-11-17 Thread Johannes Bauer
Hello list, since I've read so much about Python 3 and ran into some trouble which was supposed to be fixed with 3k, I yesterday came around to compile it and try it out. To sum it up: It's awesome. All the promised things like Unicode support just work, all significant changes in the lanugage

Uninstall one of two Python's

2008-11-17 Thread tengounplanb
Hi, Is it possible to remove one of two instances of Python installed on the same machine? I have two Python-2.5.2, one in /usr/local/bin/ python2.5 and the other one in /usr/bin/python2.5. The latter has the modules I use (kinterbasdb, psycopg, mod_python,...) and the first don't. I have Apache

Re: C extension - new and init functions

2008-11-17 Thread Hrvoje Niksic
Paul Moore [EMAIL PROTECTED] writes: OK, but that allocates the initial buffer, which I will then throw away. Why don't you use a constructor argument that allows specifying the initial buffer size? In practice, this isn't a significant issue (the overhead of one allocation and one

Sorting lists

2008-11-17 Thread asc
Hi all, I have a problem and I'm not sure whether sort() can help me. I understand that if I have a list; say L = ['b', 'c', 'a'] I can use L.sort() and I will then have; L = ['a', 'b', 'c'] But my problem is this. I have a list, that contains a number of embeded lists; e.g. L2 = [['something',

How to read fonts in python

2008-11-17 Thread ganesh gajre
Hello all, I am writing a program to convert indic true type font to unicode. For which i need to know how to read the any file i.e Text, Doc, Excel file in python and identify the font used in which that file is written. So that using Map file can convert the file in unicode. Ginovation. --

Re: Sorting lists

2008-11-17 Thread Chris Rebert
On Mon, Nov 17, 2008 at 1:56 AM, asc [EMAIL PROTECTED] wrote: Hi all, I have a problem and I'm not sure whether sort() can help me. I understand that if I have a list; say L = ['b', 'c', 'a'] I can use L.sort() and I will then have; L = ['a', 'b', 'c'] But my problem is this. I have a list,

Re: Sorting lists

2008-11-17 Thread John Machin
On Nov 17, 8:56 pm, asc [EMAIL PROTECTED] wrote: But my problem is this. I have a list, that contains a number of embeded lists; e.g. L2 = [['something', 'bb'], ['somethingElse', 'cc'], ['anotherThing', 'aa']] Now I want to sort this list by the second item of each sublist. So the outcome I

Re: Avoiding local variable declarations?

2008-11-17 Thread Jorgen Grahn
On Thu, 13 Nov 2008 12:49:02 -0800 (PST), dpapathanasiou [EMAIL PROTECTED] wrote: ... but what's wrong with you original code? I come from a functional programming school of thought, where you avoid local variable declarations if at all possible. I'm not sure that's universal. Using

os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
Hi - I have some code which works under linux. It starts a remote python process using subprocess and communicates to it via a pipe created by os.pipe. As far as I understand, child processes should inherit file descriptors from the parent if close_fds=False on the suprocess.Popen command line.

Re: C extension - new and init functions

2008-11-17 Thread Paul Moore
On 17 Nov, 09:40, Hrvoje Niksic [EMAIL PROTECTED] wrote: Paul  Moore [EMAIL PROTECTED] writes: OK, but that allocates the initial buffer, which I will then throw away. Why don't you use a constructor argument that allows specifying the initial buffer size? That's an option, but I don't

Re: Sorting lists

2008-11-17 Thread bearophileHUGS
Chris Rebert: You use the `key` argument to .sort(): L2.sort(key=lambda item: item[1]) I like the lambda because it's a very readable solution that doesn't require the std lib and it doesn't force the programmer (and the person that reads the code) to learn yet another thing/function. But I

Re: os.pipe and subprocess under Windows

2008-11-17 Thread Lawrence D'Oliveiro
Jeremy Sanders wrote: As far as I understand, child processes should inherit file descriptors from the parent if close_fds=False on the suprocess.Popen command line. This code doesn't work under Window, but gives bad file descriptor when trying to read from the pipe in the child process.

Re: os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
Lawrence D'Oliveiro wrote: http://docs.python.org/library/subprocess.html: If close_fds is true, all file descriptors except 0, 1 and 2 will be closed before the child process is executed. (Unix only). Or, on Windows, if close_fds is true then no handles will be inherited by the

Re: Uninstall one of two Python's

2008-11-17 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi, Is it possible to remove one of two instances of Python installed on the same machine? I have two Python-2.5.2, one in /usr/local/bin/ python2.5 and the other one in /usr/bin/python2.5. The latter has the modules I use (kinterbasdb, psycopg, mod_python,...) and

Re: Midi manipulation

2008-11-17 Thread Ken Starks
Massi wrote: On 16 Nov, 23:23, Tim Roberts [EMAIL PROTECTED] wrote: Massi [EMAIL PROTECTED] wrote: Hi everyone, I'm searching for something which allows me to write scripts which handle midi files. I'm totally a newbie in audio manipulation, therefore any suggestion or link related to this

Re: Midi manipulation

2008-11-17 Thread Ken Starks
Ken Starks wrote: Massi wrote: On 16 Nov, 23:23, Tim Roberts [EMAIL PROTECTED] wrote: Massi [EMAIL PROTECTED] wrote: Hi everyone, I'm searching for something which allows me to write scripts which handle midi files. I'm totally a newbie in audio manipulation, therefore any suggestion or link

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread W. eWatson
Chris Rebert wrote: On Sun, Nov 16, 2008 at 9:25 PM, W. eWatson [EMAIL PROTECTED] wrote: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista For the supported OSes, check the links for the versions on http://python.org/download/ and see

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread W. eWatson
Ben Finney wrote: W. eWatson [EMAIL PROTECTED] writes: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z, etc. I don't understand the question. Do you have some question about the operating

Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Slaunger
Hi there, I am a newcomer to Pyhton coming from Java working on a relatively large Pyhton project with several packages and modules. To improve exception handling I would like to introduce some user-defined exceptions to distinguish between exceptions raised in self-written code as compared to

Re: Text based screens without ncurses

2008-11-17 Thread Jorgen Grahn
On Thu, 13 Nov 2008 12:19:53 -0500, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Thu, 13 Nov 2008 20:16:58 +0200, Mirat Can Bayrak [EMAIL PROTECTED] wrote: On Thu, 13 Nov 2008 12:14:10 -0500 Jean-Paul Calderone [EMAIL PROTECTED] wrote: Why don't you want to use one of these libraries for

Re: Little direction please Python MySQL

2008-11-17 Thread Tim Chase
Files are fixed format no field delimiters, fields are position and length records are terminated by newline. Assuming no COMPUTATIONAL fields, it should be easy enough to split each line up into fixed-length pieces, e.g. assuming a simple example 01 Sample-Record. 02 Field-1 pic

Re: Python3 - it's awesome

2008-11-17 Thread Eduardo O. Padoan
On Mon, Nov 17, 2008 at 7:30 AM, Johannes Bauer [EMAIL PROTECTED] wrote: Hello list, since I've read so much about Python 3 and ran into some trouble which was supposed to be fixed with 3k, I yesterday came around to compile it and try it out. To sum it up: It's awesome. All the promised

Re: Win 98 with Python 2.5--matplotlib and Numpy problem

2008-11-17 Thread W. eWatson
Tino Wildenhain wrote: W. eWatson wrote: I'm trying to figure out why an application that both myself and a colleague use gives errors when he uses it under W98. I'm using XP. Py 2.5 is installed on each of our machines. His first problem came with ... Clearly things have gone astray. Is

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread W. eWatson
George Sakkis wrote: On Nov 17, 12:25 am, W. eWatson [EMAIL PROTECTED] wrote: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z, etc. http://www.catb.org/~esr/faqs/smart-questions.html#writewell

Re: Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Chris Rebert
On Mon, Nov 17, 2008 at 3:47 AM, Slaunger [EMAIL PROTECTED] wrote: Hi there, I am a newcomer to Pyhton coming from Java working on a relatively large Pyhton project with several packages and modules. To improve exception handling I would like to introduce some user-defined exceptions to

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread W. eWatson
Let me add one more observation about your remarks. Yesterday I had to rent a roto-tiller to put in a new section of lawn. As I was about to get started my neighbor dropped over and we began to chat about what I was doing. Finally, I said, I think it's time for me start the tiller up. He

Re: Avoiding local variable declarations?

2008-11-17 Thread Marc 'BlackJack' Rintsch
On Mon, 17 Nov 2008 10:10:16 +, Jorgen Grahn wrote: On Thu, 13 Nov 2008 12:49:02 -0800 (PST), dpapathanasiou [EMAIL PROTECTED] wrote: ... but what's wrong with you original code? I come from a functional programming school of thought, where you avoid local variable declarations if at

Re: [Py2exe-users] py2exe 0.6.9 released

2008-11-17 Thread Pascal
On Sun, 16 Nov 2008 21:23:59 -0500, Chris Spencer wrote: After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? I have exactly the same problem. I have tried just

Re: os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
Jeremy Sanders wrote: Hi - I have some code which works under linux. It starts a remote python process using subprocess and communicates to it via a pipe created by os.pipe. As far as I understand, child processes should inherit file descriptors from the parent if close_fds=False on the

Re: Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Slaunger
On 17 Nov., 13:05, Chris Rebert [EMAIL PROTECTED] wrote: On Mon, Nov 17, 2008 at 3:47 AM, Slaunger [EMAIL PROTECTED] wrote: . Here is my stub-implemented idea on how to do it so far, which is inspired by how I would have done it in Java (but which may not be very Pythonic??):

Re: Newbie code review of parsing program Please

2008-11-17 Thread Paul McGuire
On Nov 16, 12:53 pm, len [EMAIL PROTECTED] wrote: On Nov 16, 12:40 pm, Mark Tolonen [EMAIL PROTECTED] wrote: You might want to check out the pyparsing library. -Mark Thanks Mark I will check in out right now. Len Len - Here is a rough pyparsing starter for your problem: from

Re: How to read fonts in python

2008-11-17 Thread Steve Holden
ganesh gajre wrote: Hello all, I am writing a program to convert indic true type font to unicode. For which i need to know how to read the any file i.e Text, Doc, Excel file in python and identify the font used in which that file is written. So that using Map file can convert the file in

Re: Question: what to do, my Python is getting crazy

2008-11-17 Thread Pekeika
Good morning, thanks for the answer Gabriel. THE WEIRD MESSAGE IS NOT APPEARING ANYMORE! I DON'T KNOW WHAT HAPPENED, my PC seems to be doing extra bad things, I better back up my info... For Tim Roberts who wrote: This looks like a problem with mixed versions. Are you saying that you built

Re: special editor support for indentation needed.

2008-11-17 Thread Eric S. Johansson
Jeremiah Dodds wrote: Eric, I don't have a good readily available solution to what you're trying to do, but it seems to me that it would be worth your time to get comfortable with elisp, and how it's used in emacs. The emacs documentation is pretty good, even if you don't know lisp, and I

install wxPython on windows without admin?

2008-11-17 Thread timw.google
The subject line says it all. Is there a way to install wxPython on a Windows machine without admin privs? I love the way python doesn't need admin to install locally, and I'd like to try wxPython w/o having to get our help desk involved. Do I have to compile it from source with Cygwin? Thanks.

Re: install wxPython on windows without admin?

2008-11-17 Thread Steve Holden
timw.google wrote: The subject line says it all. Is there a way to install wxPython on a Windows machine without admin privs? I love the way python doesn't need admin to install locally, and I'd like to try wxPython w/o having to get our help desk involved. Do I have to compile it from

Re: Question: what to do, my Python is getting crazy

2008-11-17 Thread Pekeika
10 minutes later after I said thanks... the message came out again... this is the complete lines: PythonWin 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information.

Problems Writing £ (pound sterling) To MS SQL Server using pymssql

2008-11-17 Thread Darren Mansell
Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but when selecting the data back (e.g. using SQL management studio) the £ symbol is replaced with £ (latin capital letter A with circumflex). I can reproduce

Pythonwin not loading DLL, should I change extensions by .pyo or pyd?

2008-11-17 Thread Pekeika
Python 2.5 doesn't support/load .dll anymore. Is PythonWin 2.5 the same case? If a .DLL file is not loading, should I change its extension for it to work? What extensions should be now, .pyo, .pyd, etc? which one? What is the meaning of each extension? Thanks, Angelica E-G. --

Re: PP3E error

2008-11-17 Thread ryan payton
sorry: Traceback (most recent call last): File texteditor.py, line 460, in module class TextEditorMain(TextEditor, GuiMakerWindowMenu): NameError: name 'GuiMakerWindowMenu' is not defined On Nov 16, 2008, at 10:14 PM, Gabriel Genellina wrote: En Mon, 17 Nov 2008 03:32:35 -0200, ryan payton

Re: Problems Writing £ (pound sterling) To MS SQL Server using pymssql

2008-11-17 Thread Tim Golden
Darren Mansell wrote: Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but when selecting the data back (e.g. using SQL management studio) the £ symbol is replaced with £ (latin capital letter A with

Re: Official definition of call-by-value (Re: Finding the instancereference...)

2008-11-17 Thread rurpy
On Nov 17, 12:20 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Steve Holden [EMAIL PROTECTED] wrote: There's also the question, if you say that an object is different from its value, of determining what the value's value is ... This one is easy - its obviously the value that is returned

Re: Problems Writing £ (pound sterling) To MS SQL Server using pymssql

2008-11-17 Thread J. Cliff Dyer
On Mon, 2008-11-17 at 14:52 +, Darren Mansell wrote: Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but when selecting the data back (e.g. using SQL management studio) the £ symbol is replaced

Re: Little direction please Python MySQL

2008-11-17 Thread len
On Nov 17, 3:24 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: len wrote: Files are fixed format no field delimiters, fields are position and length records are terminated by newline. Assuming no COMPUTATIONAL fields, it should be easy enough to split each line

Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Massi
Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I found at this link: http://wiki.python.org/moin/MacPython/Leopard If I open wing, it turns out that the installed version is actually

Re: Problems Writing £ (pound sterling) To MS SQL Server using pymssql

2008-11-17 Thread Darren Mansell
On Mon, 2008-11-17 at 15:24 +, Tim Golden wrote: Darren Mansell wrote: Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but when selecting the data back (e.g. using SQL management studio)

Re: Little direction please Python MySQL

2008-11-17 Thread len
On Nov 17, 3:24 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: len wrote: Files are fixed format no field delimiters, fields are position and length records are terminated by newline. Assuming no COMPUTATIONAL fields, it should be easy enough to split each line

Re: Little direction please Python MySQL

2008-11-17 Thread len
On Nov 17, 5:52 am, Tim Chase [EMAIL PROTECTED] wrote: Files are fixed format no field delimiters, fields are position and length records are terminated by newline. Assuming no COMPUTATIONAL fields, it should be easy enough to split each line up into fixed-length pieces, e.g. assuming a

Re: Looking for a nitty-gritty Python Ajax middleware script to fire off a number of processors

2008-11-17 Thread lkcl
On Nov 7, 10:38 am, Shao [EMAIL PROTECTED] wrote: Dear All, I am looking for a nitty-gritty Python Ajax script to fire off a number of processing programmes, periodically checking their operations, sending messages back to an HTML div form by sending back the links of generated data files,

Re: Newbie code review of parsing program Please

2008-11-17 Thread len
On Nov 16, 9:57 pm, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: len wrote:     if fieldline.count('COMP.') 0: I take it you're only handling a particular subset of COBOL constructs: thus, COMP is never COMPUTATIONAL or USAGE IS COMPUTATIONAL, and it always occurs

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
On Nov 17, 2008, at 10:53 AM, Massi wrote: Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I found at this link: http://wiki.python.org/moin/MacPython/Leopard If I open wing, it

Re: Newbie code review of parsing program Please

2008-11-17 Thread len
Thanks Paul I will be going over your code today. I started looking at Pyparsing last night and it just got to late and my brain started to fog over. I would really like to thank you for taking the time to provide me with the code sample I'm sure it will really help. Again thank you very much.

Re: Django or TurboGears or Pylons? for python web framework.

2008-11-17 Thread lkcl
On Wed, 05 Nov 2008 08:35:23 +0200, 3000 billg [EMAIL PROTECTED] Just from my preferences, I want to useDjangobut the AJAX support will be a problem. Also I need to select a JavaScriptframeworkand lean it, maybe JQuery, mootools or other. And I can not writepythonas it is written in

Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread Gabriel Genellina
QOTW: I stopped paying much attention to this thread a while ago, but you've got to admire the persistence of somebody who soldiers on even though Aahz, Fredrik Lund, and Steve Holden are all on the other side of the argument... - Grant Edwards

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Tommy Nordgren
17 nov 2008 kl. 16.53 skrev Massi: Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I found at this link: http://wiki.python.org/moin/MacPython/Leopard If I open wing, it turns out

Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-17 Thread John Nagle
MySQLdb, the Python shim for MySQL, still supports Python only to Python 2.5. See http://sourceforge.net/projects/mysql-python;. Are there any plans to support Python 2.6 or 3.x? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: mySQL problems

2008-11-17 Thread John Nagle
Alfons Nonell-Canals wrote: Hello, I've developed a program using python that have to connect to a mysql server several times. In a local machine (running the program in the same machine where the mysql server is) I have no problems. I can run several instances of the program at the same time

Re: Problems Writing £ (pound sterling) To MS SQL Server using pymssql

2008-11-17 Thread J. Cliff Dyer
On Mon, 2008-11-17 at 15:55 +, Darren Mansell wrote: On Mon, 2008-11-17 at 15:24 +, Tim Golden wrote: Darren Mansell wrote: Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread rurpy
On Nov 17, 8:54 am, Gabriel Genellina [EMAIL PROTECTED] wrote: Candidate to *Longest and Most Boring Thread of the Year* - started more than a month ago, currently discussing The official definition of call-by-value, and What't the value of an object:

compressed serialization module

2008-11-17 Thread Mark
I used pickle and found the file was saved in text format. I wonder whether anyone is familiar with a good compact off-the-shelf module available that will save in compressed format... or maybe an opinion on a smart approach for making a custom one? Appreciate it! I'm a bit of a n00b but have

Suggestions for an education programming project

2008-11-17 Thread Eric
Hi, I've been trying to get my son interested in learning some simple programming for a while. While I understand that a structured tutorial is best, I think if we can write something cool at least once, it will encourage him to learn more. While I have a lot of experience with MATLAB, I've just

Re: Customizing sequence types

2008-11-17 Thread Mr . SpOOn
It seems that I solved my main problem, but I still have some doubt. I'll make an example: class foo: ...def __init__(self, a): ...self.a = a ... f = foo(1) f2 = foo(2) f3 = foo(3) f1 = foo(1) s = set() s.add(f) s set([__main__.foo instance at 0x8311fac]) s.add(f2)

Re: compressed serialization module

2008-11-17 Thread Joe Strout
On Nov 17, 2008, at 10:47 AM, Mark wrote: I used pickle and found the file was saved in text format. I wonder whether anyone is familiar with a good compact off-the-shelf module available that will save in compressed format... or maybe an opinion on a smart approach for making a custom one?

Re: Problems Writing £ (pound sterling) To MS SQL S erver using pymssql

2008-11-17 Thread MRAB
On Nov 17, 2:52 pm, Darren Mansell [EMAIL PROTECTED] wrote: Hi. I'm relatively new to python so please be gentle :) I'm trying to write a £ symbol to an MS SQL server using pymsssql . This works but when selecting the data back (e.g. using SQL management studio) the £ symbol is replaced

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread Francesco Guerrieri
On Mon, Nov 17, 2008 at 6:44 PM, [EMAIL PROTECTED] wrote: On Nov 17, 8:54 am, Gabriel Genellina [EMAIL PROTECTED] wrote: Candidate to *Longest and Most Boring Thread of the Year* - started more than a month ago, currently discussing The official definition of call-by-value, and

Re: Suggestions for an education programming project

2008-11-17 Thread Joe Strout
On Nov 17, 2008, at 10:53 AM, Eric wrote: My son has an idea for a program to write. Basically he would like to present a window with a small circle on it. The window title would have the instruction to click on the circle. As the mouse approaches the circle, it moves away from the spot. Being

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Diez B. Roggisch
Philip Semanchuk wrote: On Nov 17, 2008, at 10:53 AM, Massi wrote: Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I found at this link:

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread George Sakkis
On Nov 17, 12:44 pm, [EMAIL PROTECTED] wrote: On Nov 17, 8:54 am, Gabriel Genellina [EMAIL PROTECTED] wrote:     Candidate to *Longest and Most Boring Thread of the Year* - started     more than a month ago, currently discussing The official definition     of call-by-value, and What't the

Re: Suggestions for an education programming project

2008-11-17 Thread Diez B. Roggisch
Eric wrote: Hi, I've been trying to get my son interested in learning some simple programming for a while. While I understand that a structured tutorial is best, I think if we can write something cool at least once, it will encourage him to learn more. While I have a lot of experience with

Re: Customizing sequence types

2008-11-17 Thread Chris Rebert
On Mon, Nov 17, 2008 at 10:05 AM, Mr. SpOOn [EMAIL PROTECTED] wrote: It seems that I solved my main problem, but I still have some doubt. I'll make an example: class foo: ...def __init__(self, a): ...self.a = a ... f = foo(1) f2 = foo(2) f3 = foo(3) f1 = foo(1) s = set()

Re: compressed serialization module

2008-11-17 Thread skip
I used pickle and found the file was saved in text format. I wonder whether anyone is familiar with a good compact off-the-shelf module available that will save in compressed format... or maybe an opinion on a smart approach for making a custom one? Joe Well, here's a

parsing grub's menu.lst

2008-11-17 Thread CarlFK
I need some code that will read in grubs menu.lst file, and give me a list of dicts: [{'title':'Ubuntu, kernel 2.6.15-23-686', 'root':'(hd0,0)', 'kernel':'/boot/vmlinuz-2.6.15-23-686 root=/dev/hda1 ro quiet splash', 'initrd':'/boot/initrd.img-2.6.15-23-686', 'savedefault':'', 'boot':''},

Re: Customizing sequence types

2008-11-17 Thread Arnaud Delobelle
Terry Reedy [EMAIL PROTECTED] writes: Mr.SpOOn wrote: On Sun, Nov 16, 2008 at 7:15 PM, Arnaud Delobelle You should probably use the `bisect` module (http://docs.python.org/library/bisect.html) for searching and inserting into the list as it takes advantage of and ensures that the list

Socket Programming and Data transer 'advice'

2008-11-17 Thread Abah Joseph
I am planning to develop School Database Management System that will run on Windows, Linux and Mac. The application will be Server/Client and GUI based. Modules I intende to use are: Python socket module, wxPython for GUI, Open GL for image processing , email and so on. This is my first real

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
On Nov 17, 2008, at 1:17 PM, Diez B. Roggisch wrote: Philip Semanchuk wrote: On Nov 17, 2008, at 10:53 AM, Massi wrote: Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the instructions I

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: I guess this goes a long way to explaining why the Python docs suck so badly in many areas. I like the python docs very much. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket Programming and Data transer 'advice'

2008-11-17 Thread Chris Rebert
On Mon, Nov 17, 2008 at 10:42 AM, Abah Joseph [EMAIL PROTECTED] wrote: I am planning to develop School Database Management System that will run on Windows, Linux and Mac. The application will be Server/Client and GUI based. Have you considered basing this off existing software for schools, like

Multiple equates

2008-11-17 Thread jzakiya
I looked online and in books, but couldn't find a definitive answer to this. I have an array and set multiple elements to either True or False at one time. Question: Which way is faster (or does it matter)? 1) array[x1]=array[x2]== array[x10] = \ array[x11]=array[x12]=... = array[x20]

Re: parsing grub's menu.lst

2008-11-17 Thread Albert Hopkins
On Mon, 2008-11-17 at 10:27 -0800, CarlFK wrote: I need some code that will read in grubs menu.lst file, and give me a list of dicts: [{'title':'Ubuntu, kernel 2.6.15-23-686', 'root':'(hd0,0)', 'kernel':'/boot/vmlinuz-2.6.15-23-686 root=/dev/hda1 ro quiet splash',

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Diez B. Roggisch
Sorry if I misinformed; I have such symlinks in /usr/local/bin dated the same day as my custom Python install. I guess I could have created them myself, but I don't think I would have bothered creating a symlink for pythonw, for example since I never use it. Did you really create a

Re: Suggestions for an education programming project

2008-11-17 Thread Arnaud Delobelle
Eric [EMAIL PROTECTED] writes: Hi, I've been trying to get my son interested in learning some simple programming for a while. While I understand that a structured tutorial is best, I think if we can write something cool at least once, it will encourage him to learn more. I know it's not

Re: Python and Its Libraries--Who's on First?

2008-11-17 Thread Aahz
In article [EMAIL PROTECTED], W. eWatson [EMAIL PROTECTED] wrote: George Sakkis wrote: On Nov 17, 12:25 am, W. eWatson [EMAIL PROTECTED] wrote: Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z,

Re: Multiple equates

2008-11-17 Thread Arnaud Delobelle
jzakiya [EMAIL PROTECTED] writes: I looked online and in books, but couldn't find a definitive answer to this. I have an array and set multiple elements to either True or False at one time. Question: Which way is faster (or does it matter)? 1) array[x1]=array[x2]== array[x10] =

external program crashes when run through subprocess.popen on XP

2008-11-17 Thread ckkart
Hi, on XP when starting a certain external program (plain C calculation program which communicates via stdout/fs) from python 2.5 using subprocess.Popen the external program crashes. It does not if started directly from the XP command prompt. This is not a purely python problems since the crash

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
On Nov 17, 2008, at 2:05 PM, Diez B. Roggisch wrote: Sorry if I misinformed; I have such symlinks in /usr/local/bin dated the same day as my custom Python install. I guess I could have created them myself, but I don't think I would have bothered creating a symlink for pythonw, for example

  1   2   3   >