Re: xmlrpc idea for getting around the GIL

2009-11-23 Thread Carl Banks
On Nov 22, 10:58 pm, Patrick Stinson patrickstinson.li...@gmail.com wrote: On Sun, Nov 22, 2009 at 3:15 PM, Diez B. Roggisch de...@nospam.web.de wrote: icating) the multiprocessing module would be ideal. The problem is that the OP has a embedded application running threads. multiprocssing

multitasking

2009-11-23 Thread ashwini yal
Hi, I want to know diffrent methods of multitasking supported by python(I want to run diffrent jobs simultaneously at same time) which is the good approach. I know about threads,but i also know that using threads leads to less operational speed. Can someone help me -- Regards , Ashwini . K --

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-23 Thread News123
Hi r, r wrote: On Nov 22, 11:32 am, News123 news...@free.fr wrote: - This script works fine for me under Windows 7, however I'm unable to specify additional parameters, like dpi and color mode. I have found something interesting but have no idea HOW to implement it?? It seems the

Re: scanning under windows WIA with custom settings (dpi / etc )

2009-11-23 Thread News123
Hi r, r wrote: On Nov 22, 11:32 am, News123 news...@free.fr wrote: - This script works fine for me under Windows 7, however I'm unable to specify additional parameters, like dpi and color mode. I have found something interesting but have no idea HOW to implement it?? It seems the

Re: Go versus Brand X

2009-11-23 Thread Robert Kern
Aahz wrote: In article 7ms7ctf3k2a7...@mid.individual.net, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: However, Go's designers seem to favour using the absolute minimum number of characters they can get away with. Although if they *really* wanted that, they would have dropped most of the

Re: creating pipelines in python

2009-11-23 Thread Robert Kern
per wrote: hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage whether the output of the

Re: creating pipelines in python

2009-11-23 Thread Paul Rudin
per perfr...@gmail.com writes: hi all, i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage whether

Re: creating pipelines in python

2009-11-23 Thread Wolodja Wentland
On Sun, Nov 22, 2009 at 14:49 -0800, per wrote: i am looking for a python package to make it easier to create a pipeline of scripts (all in python). what i do right now is have a set of scripts that produce certain files as output, and i simply have a master script that checks at each stage

Re: python regex negative lookahead assertions problems

2009-11-23 Thread Helmut Jarausch
On 11/22/09 16:05, Helmut Jarausch wrote: On 11/22/09 14:58, Jelle Smet wrote: Hi List, I'm trying to match lines in python using the re module. The end goal is to have a regex which enables me to skip lines which have ok and warning in it. But for some reason I can't get negative lookaheads

QtPython: removeChild/addChild QGroupBox

2009-11-23 Thread Threader Slash
Hi Everybody, I am developing a system for a customer which is displayed in a set of GroupBox. Depending on mouse events, the container (groupBox) must be removed from the centralwidget, or then added with new updated data for the table. Here is a piece of the code that runs nicely and shows the

Re: problem manipulating a list belonging to a class

2009-11-23 Thread Terry Reedy
Marc Leconte wrote: Dear all, I have a problem with the following code (ubuntu 8.04, Python 2.5.2): class Toto(object): def __init__(self, number, mylist=[]): self.number=number self.mylist=mylist pass pass listA=Toto(number=1)

lxml 2.2.4 for Python 2.6

2009-11-23 Thread Srijit Kumar Bhadra
Is there any reason why lxml-2.2.4-py2.6-win32.egg (md5) or lxml-2.2.4.win32-py2.6.exe is not available? Best regards, /Srijit -- http://mail.python.org/mailman/listinfo/python-list

python and Postgresq

2009-11-23 Thread Andy dixon
Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. Thanks! Andy Dixon -- http://mail.python.org/mailman/listinfo/python-list

Re: python and Postgresq

2009-11-23 Thread Diez B. Roggisch
Andy dixon wrote: Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. I'd recommend psycopg2. This is an introduction:

Re: python simply not scaleable enough for google?

2009-11-23 Thread Robin Becker
sturlamolden wrote: On 20 Nov, 11:12, Robin Becker ro...@reportlab.com wrote: Presumably that means they could potentially run in parallel on the 10 cpu machines of the future. I'm not so clear on whether the threadless tasklets will run on separate cpus. You can make a user-space

Switching Databases

2009-11-23 Thread Victor Subervi
Hi; I have the following code: import MySQLdb ... user, passwd, db, host = login() db = MySQLdb.connect(host, user, passwd, 'cart') cursor= db.cursor() ... cursor.close() db = MySQLdb.connect(host, user, passwd, db) cursor= db.cursor() Now, python complains about me opening a new connection. But

Re: Go versus Brand X

2009-11-23 Thread Antoine Pitrou
Le Mon, 23 Nov 2009 02:36:33 -0600, Robert Kern a écrit : I think there is an overall design sensibility, it's just not a human-facing one. They claim that they designed the syntax to be very easily parsed by very simple tools in order to make things like syntax highlighters very easy and

Python OpenOffice Spreadsheets

2009-11-23 Thread Gerhard Häring
Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers little more than just using a XML parser directly. -- Gerhard --

Re: python and Postgresq

2009-11-23 Thread Ben Finney
Andy dixon a...@malcol.org writes: Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. Diez B. Roggisch de...@nospam.web.de writes: I'd recommend

Re: python and Postgresq

2009-11-23 Thread Andy dixon
Diez B. Roggisch de...@nospam.web.de wrote in message news:7mv62nf3hp17...@mid.uni-berlin.de... Andy dixon wrote: Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative,

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread Paul Rudin
Gerhard Häring g...@ghaering.de writes: Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers little more than just using a XML parser directly. Depends on exactly

Re: python and Postgresq

2009-11-23 Thread Krishnakant
On Mon, 2009-11-23 at 11:22 +0100, Diez B. Roggisch wrote: Andy dixon wrote: Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would be fantastic. I'd

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread Krishnakant
On Mon, 2009-11-23 at 11:12 +, Paul Rudin wrote: Gerhard Häring g...@ghaering.de writes: Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers little

Re: python and Postgresq

2009-11-23 Thread Diez B. Roggisch
Krishnakant wrote: On Mon, 2009-11-23 at 11:22 +0100, Diez B. Roggisch wrote: Andy dixon wrote: Hi, Does anyone have a link to, or can provide an example script for using python-pgsql (http://pypi.python.org/pypi/python-pgsql/) or if someone can recommend an alternative, that would

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread Chris Withers
Gerhard Häring wrote: Is there a *simple* way to read OpenOffice spreadsheets? Ironically, if you don't mind working in .xls, which OpenOffice handles just fine, you have xlrd and xlwt to do exactly what you're after: http://www.python-excel.org/ cheers, Chris -- Simplistix - Content

python and netezza

2009-11-23 Thread Shan
Is there any module in python to connect with netezza database?(like cx_Oracle which is used to connect Oracle from python) Thanks for any help. - Shan -- http://mail.python.org/mailman/listinfo/python-list

print function in python3.1

2009-11-23 Thread Anjanesh Lekshminarayanan
Python 3.1.1 sql = INSERT INTO `tbl` VALUES (NULL, '%s', '%s', '%s', '%s', '%s'); for row in fp: print (sql, (row[0],row[1],row[2],row[3],row[4])) . INSERT INTO `tbl` VALUES (NULL, '%s', '%s', '%s', '%s', '%s'); ('142', 'abc', '2006-04-09 02:19:24', '', '') . Why is it showing %s in the

Re: print function in python3.1

2009-11-23 Thread Diez B. Roggisch
Anjanesh Lekshminarayanan wrote: Python 3.1.1 sql = INSERT INTO `tbl` VALUES (NULL, '%s', '%s', '%s', '%s', '%s'); for row in fp: print (sql, (row[0],row[1],row[2],row[3],row[4])) . INSERT INTO `tbl` VALUES (NULL, '%s', '%s', '%s', '%s', '%s'); ('142', 'abc', '2006-04-09 02:19:24',

Perl conversion to python...

2009-11-23 Thread Benjamin Schollnick
Folks, I'm having some issues here with pyserial trying to translate a perl script to python... It's probably my inexperience with PySerial perl that is troubling me... Can anyone assist? I'm concerned, since I can't seem to receive the data in any reliable manner.. I've tested multiple

depikt (gtk-wrappers): Threads, code-inlining Pixbufs

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

Re: print function in python3.1

2009-11-23 Thread Anjanesh Lekshminarayanan
Depending on your DB-adapter, you are out of luck here. Either connect to a db even if you don't need it, or try see if you can locate the implementation in the module somehow. ImportError: No module named MySQLdb MySQLdb only available in Python2. -- Anjanesh Lekshmnarayanan --

Re: Scripts Only Run In Root

2009-11-23 Thread liuxin9...@gmail.com
On Nov 23, 2:36 am, geremy condra debat...@gmail.com wrote: On Sun, Nov 22, 2009 at 12:39 PM, Victor Subervi victorsube...@gmail.com wrote: Hi; I can only run my python scripts on my server if they are owned by root. How do I change that? TIA, Victor Almost certainly going to need

Re: print function in python3.1

2009-11-23 Thread Diez B. Roggisch
Anjanesh Lekshminarayanan wrote: Depending on your DB-adapter, you are out of luck here. Either connect to a db even if you don't need it, or try see if you can locate the implementation in the module somehow. ImportError: No module named MySQLdb MySQLdb only available in Python2. I

depikt (gtk-wrappers): Threads, inlining Pixbufs to python code

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

Re: Switching Databases

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: Hi; I have the following code: import MySQLdb ... user, passwd, db, host = login() db = MySQLdb.connect(host, user, passwd, 'cart') cursor= db.cursor() ... cursor.close() db = MySQLdb.connect(host, user, passwd, db) cursor= db.cursor() Now, python complains

depikt (gtk-wrappers): Threads, inlining Pixbufs to python code

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

Re: print function in python3.1

2009-11-23 Thread Anjanesh Lekshminarayanan
As of now, there is no mysql adaptor for Python3. Hence cant use escape_string() I don't have the slightest clue what you want to say with that. -- Anjanesh Lekshmnarayanan -- http://mail.python.org/mailman/listinfo/python-list

depikt (gtk-wrappers): Threads, inlining Pixbufs to python code

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

depikt (gtk-wrappers): Threads, inlining Pixbufs to python code

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

depikt (gtk-wrappers): Threads, inlining Pixbufs to python code

2009-11-23 Thread DreiJane
Hello, these days i make depikt, my replacement of pygtk. There are several reasons to do this: - Support for Python3 - Exact control of encoding issues. I myself (a German) hope to abandon with any python unicode objects forever in future - that is, why Python3 is an important improvement for

Re: print function in python3.1

2009-11-23 Thread Carsten Haese
Anjanesh Lekshminarayanan wrote: As of now, there is no mysql adaptor for Python3. Hence cant use escape_string() Maybe it would help if you explained what you are actually trying to accomplish. -- Carsten Haese http://informixdb.sourceforge.net --

Re: Switching Databases

2009-11-23 Thread Victor Subervi
On Mon, Nov 23, 2009 at 9:17 AM, Carsten Haese carsten.ha...@gmail.comwrote: You thought you did, but did you? The code snippet above doesn't show any code that closes a database connection. Would you be so kind as to tell me exactly what code *does* close a database, then? That would solve

Re: Switching Databases

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: On Mon, Nov 23, 2009 at 9:17 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: You thought you did, but did you? The code snippet above doesn't show any code that closes a database connection. Would you be so kind as to tell me

KirbyBase : replacing string exceptions

2009-11-23 Thread Brendan
In KirbyBase there is a method that uses string exceptions for control, even though it has a defined exception. Is there any reason the string exceptions below could not be replaced? i.e. in code below replace: raise No Match with: raise KBError() and except 'No Match': with: except KBError: I

Re: Switching Databases

2009-11-23 Thread Victor Subervi
On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese carsten.ha...@gmail.comwrote: As I said, the best way we can help you is if you copy the actual error message so that we may diagnose the actual problem and suggest a solution that fixes the problem. That gave me the idea that I should simply

Re: Python/HTML integration: phileas v0.3 released

2009-11-23 Thread J Kenneth King
papa hippo hippost...@gmail.com writes: On 20 nov, 09:02, Stefan Behnel stefan...@behnel.de wrote: papa hippo, 19.11.2009 19:53: The prime goal of 'phileas' is to enable html code to be seamlessly included in python code in a natural looking syntax, without resorting to templatng

Re: print function in python3.1

2009-11-23 Thread Anjanesh Lekshminarayanan
Maybe it would help if you explained what you are actually trying to accomplish. import csv f = csv.reader(open('data.txt'), delimiter='\t') # 2GB text file sql = INSERT INTO `data` VALUES (NULL,%s,%s,%s,%s,%s); for row in f: print (sql, (row[0],row[1],row[2],row[3],row[4])) $ python3

Re: Switching Databases

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese carsten.ha...@gmail.com mailto:carsten.ha...@gmail.com wrote: As I said, the best way we can help you is if you copy the actual error message so that we may diagnose the actual problem and suggest a solution

Re: Switching Databases

2009-11-23 Thread Victor Subervi
On Mon, Nov 23, 2009 at 10:59 AM, Carsten Haese carsten.ha...@gmail.comwrote: Have you tried to *read* and *understand* this error message? My guess is no. The error message tells you all you need to know. You need to pass a string as argument 4, but you aren't. db is a database connection

Re: print function in python3.1

2009-11-23 Thread Diez B. Roggisch
Anjanesh Lekshminarayanan wrote: Maybe it would help if you explained what you are actually trying to accomplish. import csv f = csv.reader(open('data.txt'), delimiter='\t') # 2GB text file sql = INSERT INTO `data` VALUES (NULL,%s,%s,%s,%s,%s); for row in f: print (sql,

Re: KirbyBase : replacing string exceptions

2009-11-23 Thread Steve Howell
On Nov 23, 7:22 am, Brendan brendandetra...@yahoo.com wrote: In KirbyBase there is a method that uses string exceptions for control, even though it has a defined exception. Is there any reason the string exceptions below could not be replaced? i.e. in code below replace: raise No Match with:

Re: Minimally intrusive XML editing using Python

2009-11-23 Thread Thomas Lotze
Please consider this a reply to any unanswered messages I received in response to my original post. Dave Angel wrote: What's your real problem, or use case? Are you just concerned with diffing, or are others likely to read the xml, and want it formatted the way it already is? I'd like to

Re: Perl conversion to python...

2009-11-23 Thread J Kenneth King
Benjamin Schollnick bscholln...@gmail.com writes: Folks, I'm having some issues here with pyserial trying to translate a perl script to python... It's probably my inexperience with PySerial perl that is troubling me... Can anyone assist? I'm concerned, since I can't seem to receive

Re: Go versus Brand X

2009-11-23 Thread Steve Howell
On Nov 23, 2:47 am, Antoine Pitrou solip...@pitrou.net wrote: Le Mon, 23 Nov 2009 02:36:33 -0600, Robert Kern a écrit : I think there is an overall design sensibility, it's just not a human-facing one. They claim that they designed the syntax to be very easily parsed by very simple tools

Re: KirbyBase : replacing string exceptions

2009-11-23 Thread Brendan
On Nov 23, 12:21 pm, Steve Howell showel...@yahoo.com wrote: On Nov 23, 7:22 am, Brendan brendandetra...@yahoo.com wrote: In KirbyBase there is a method that uses string exceptions for control, even though it has a defined exception. Is there any reason the string exceptions below could

Print to Printer Tkinter Text

2009-11-23 Thread J Wolfe
Hi, Is there a way to print the format of a Tkinter text box to a color printer with its tags, e.g. a blue text at font size 18 and bold will like it displays? Thanks, Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Beginning Question about Python functions, parameters...

2009-11-23 Thread astral orange
Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data, full_name): function

A More Concise Description of Numpy than the Guide to Numpy?

2009-11-23 Thread W. eWatson
I'm looking the 300+ page pdf of the Guide to Numpy. Is there a more concise and practical guide to its use in science and mathematics? -- http://mail.python.org/mailman/listinfo/python-list

Re: Go versus Brand X

2009-11-23 Thread Robert Kern
On 2009-11-23 04:47 AM, Antoine Pitrou wrote: Le Mon, 23 Nov 2009 02:36:33 -0600, Robert Kern a écrit : I think there is an overall design sensibility, it's just not a human-facing one. They claim that they designed the syntax to be very easily parsed by very simple tools in order to make

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Neo
astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data,

[repost please help me] python setup.py build for 32-bits on x86_64 machine

2009-11-23 Thread Sérgio Monteiro Basto
Hi, I am in x86_64 arch , but I need compile things on 32 bits with python setup.py build Can't change the fact that distutils creates x86_64 directories: build/temp.linux-x86_64-2.3/ Also if I try with a python compile in 32bits and installed in system . how I force distutils build to

adding a directory to sys.path

2009-11-23 Thread John Guenther
This is Mac related. I am running snow leopard. I am using Python 2.6.3. I had a lot of difficulty figuring out how to add a directory to sys.path that would be there every time I launched Idle. I have a directory called PythonPrograms in my Documents folder. When I installed Python it had

Re: A More Concise Description of Numpy than the Guide to Numpy?

2009-11-23 Thread Robert Kern
On 2009-11-23 11:49 AM, W. eWatson wrote: I'm looking the 300+ page pdf of the Guide to Numpy. Is there a more concise and practical guide to its use in science and mathematics? You will want to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists You may also

Don't Understand Error

2009-11-23 Thread Victor Subervi
Hi; I have the following code: #!/usr/bin/env python import smtplib import cgitb; cgitb.enable() import cgi import sys,os sys.path.append(os.getcwd()) from login import login import MySQLdb import re, string def mailSpreadsheet(): user, passwd, db, host = login() database =

Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine

2009-11-23 Thread Diez B. Roggisch
Sérgio Monteiro Basto wrote: Hi, I am in x86_64 arch , but I need compile things on 32 bits with python setup.py build Can't change the fact that distutils creates x86_64 directories: build/temp.linux-x86_64-2.3/ Also if I try with a python compile in 32bits and installed in system .

Re: adding a directory to sys.path

2009-11-23 Thread Christian Heimes
John Guenther schrieb: This is Mac related. I am running snow leopard. I am using Python 2.6.3. I had a lot of difficulty figuring out how to add a directory to sys.path that would be there every time I launched Idle. I have a directory called PythonPrograms in my Documents folder. When I

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Diez B. Roggisch
astral orange wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data,

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread j
On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain

Re: problem manipulating a list belonging to a class

2009-11-23 Thread Marc Leconte
Thx all, good to know :) Le dimanche 22 novembre 2009 à 15:16 -0800, Steve Howell a écrit : On Nov 22, 3:14 pm, Steve Howell showel...@yahoo.com wrote: Explanations of why you need to write it that will follow... I knew this had to be written up somewhere...

Re: Implementation of Book Organization tool (Python2.[x])

2009-11-23 Thread ~km
Though many would disagree, I consider XML as a form of database though it is only suitable for data exchange. XML is suitable for low- to medium-volume purpose and when compatibility with various systems is extremely important (nearly any OS and any programming language has XML parsers;

attributes, properties, and accessors -- philosophy

2009-11-23 Thread Ethan Furman
The problem I have with properties is my typing. I'll end up assigning to an attribute, but get the spelling slightly wrong (capitalized, or missing an underscore -- non-obvious things when bug-hunting), so now I have an extra attribute which of course has zero effect on what I'm trying to do

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread jfabiani
Krishnakant wrote: On Mon, 2009-11-23 at 11:12 +, Paul Rudin wrote: Gerhard Häring g...@ghaering.de writes: Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look,

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread david wright
- Original Message From: j jimmy.case...@gmail.com To: python-list@python.org Sent: Mon, November 23, 2009 10:26:42 AM Subject: Re: Beginning Question about Python functions, parameters... On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying

Re: attributes, properties, and accessors -- philosophy

2009-11-23 Thread Chris Rebert
On Mon, Nov 23, 2009 at 10:52 AM, Ethan Furman et...@stoneleaf.us wrote: The problem I have with properties is my typing.  I'll end up assigning to an attribute, but get the spelling slightly wrong (capitalized, or missing an underscore -- non-obvious things when bug-hunting), so now I have an

Line Breaks

2009-11-23 Thread Susan Day
Hi; I have the following line of code I'm sending to postfix: msg = 'A Message From %s:\n\n %s' % (string.replace(customer, '_', ' '), msg) Unfortunately, it ignores the line breaks. I also tried %0A but that was ignored also. Please advise. TIA, Suzie --

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread MRAB
j wrote: On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing.

Line-continuation Anti-Idiom and with statement

2009-11-23 Thread Neil Cerutti
I installed Python 3.1 today, and I've been porting my small library of programs to the new system. I happened to read the interesting Idioms and Anti-Idioms HOWTO, and saw the '\' continuation character labeled an anti-idiom. I already generally avoided it, so I just nodded. Unfortunately, the

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread astral orange
On Nov 23, 1:17 pm, Diez B. Roggisch de...@nospam.web.de wrote: astral orange wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing.

Read IDL save files into Python

2009-11-23 Thread Thomas Robitaille
I would like to briefly advertise the 0.9.2 release of IDLSave, a package I recently developed to read IDL save files into Python. Installation instructions are available at http://idlsave.sourceforge.net/. Please do not hesitate to submit a bug report if you run into any problems! Cheers,

Re: Line Breaks

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 10:45 AM, Susan Day suzieprogram...@gmail.comwrote: Hi; I have the following line of code I'm sending to postfix: msg = 'A Message From %s:\n\n %s' % (string.replace(customer, '_', ' '), msg) Unfortunately, it ignores the line breaks. I also tried %0A but that was

IDE+hg

2009-11-23 Thread NiklasRTZ
Dear experts, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial support not found i.e. buttons to clone, commit and push to repositories to define dev env dvcs, editor and deployment all in 1. I tested Boa Constructor, dr Python, Eric and PIDA none of which has other

Re: Line Breaks

2009-11-23 Thread Gary Herron
Susan Day wrote: Hi; I have the following line of code I'm sending to postfix: msg = 'A Message From %s:\n\n %s' % (string.replace(customer, '_', ' '), msg) Unfortunately, it ignores the line breaks. I also tried %0A but that was ignored also. Please advise. TIA, Suzie That line does

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 10:26 AM, j jimmy.case...@gmail.com wrote: What I am not totally sure about is when the store function callsthe lookup function and does return data[label].get(name), that line trips me up somethen the lookup function returns that back to the store function,

Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine

2009-11-23 Thread Sérgio Monteiro Basto
Diez B. Roggisch wrote: Hi, Thanks, Sérgio Monteiro Basto wrote: Hi, I am in x86_64 arch , but I need compile things on 32 bits with python setup.py build Can't change the fact that distutils creates x86_64 directories: build/temp.linux-x86_64-2.3/ Also if I try with a python

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 11:14 AM, astral orange 457r0...@gmail.com wrote: But back to the example, on line 104 I see there's a call to the lookup function, passing 3 parameters ('data', which I think is a nested dictionary, label (first, middle, last) and name). But I am getting lost on

Re: Minimally intrusive XML editing using Python

2009-11-23 Thread Nobody
On Mon, 23 Nov 2009 17:45:24 +0100, Thomas Lotze wrote: What's your real problem, or use case? Are you just concerned with diffing, or are others likely to read the xml, and want it formatted the way it already is? I'd like to put the XML under revision control along with other stuff.

Re: Line Breaks

2009-11-23 Thread Susan Day
On Mon, Nov 23, 2009 at 2:26 PM, Gary Herron gher...@islandtraining.comwrote: print 'A Message From %s:\n\n %s' % ('someone','some message') A Message From someone: some message So... *Exactly* what are you doing with msg, and *exactly* what is your evidence that line breaks are being

Re: Switching Databases

2009-11-23 Thread Terry Reedy
Victor Subervi wrote: A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. [snip hmtl error report] Please post plain text - ascii or utf8. On my newsreader, what you posted, with a mismash of colors, bold,

Re: python and netezza

2009-11-23 Thread M.-A. Lemburg
Shan wrote: Is there any module in python to connect with netezza database?(like cx_Oracle which is used to connect Oracle from python) You can use our mxODBC database adapters together with the Netezza ODBC drivers. For single-tier setups (client application and database on the same server or

Re: Line-continuation Anti-Idiom and with statement

2009-11-23 Thread MRAB
Neil Cerutti wrote: I installed Python 3.1 today, and I've been porting my small library of programs to the new system. I happened to read the interesting Idioms and Anti-Idioms HOWTO, and saw the '\' continuation character labeled an anti-idiom. I already generally avoided it, so I just

Re: Don't Understand Error

2009-11-23 Thread Carsten Haese
Victor Subervi wrote: [Mon Nov 23 09:52:21 2009] [error] [client 66.248.168.98] Premature end of script headers: mailSpreadsheet.py, referer: http://globalsolutionsgroup.vi/display_spreadsheet.py Why? A CGI script is expected to produce output. Your script doesn't produce any output, and

Re: Go versus Brand X

2009-11-23 Thread Terry Reedy
Robert Kern wrote: On 2009-11-23 04:47 AM, Antoine Pitrou wrote: Le Mon, 23 Nov 2009 02:36:33 -0600, Robert Kern a écrit : I think there is an overall design sensibility, it's just not a human-facing one. They claim that they designed the syntax to be very easily parsed by very simple tools

sandbox python via module loader

2009-11-23 Thread timprepscius
Greetings, in the past I wrote a sandboxing module loader for c++/ python. I am moving away from python.. I can't stand it actually. Call me blasphemous... I'm immune.. So this code is going to just find the trash.. Maybe it will be useful to someone else. Can't post it all, however, if you

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread Terry Reedy
Krishnakant wrote: On Mon, 2009-11-23 at 11:12 +, Paul Rudin wrote: Gerhard Häring g...@ghaering.de writes: Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers

Re: Don't Understand Error

2009-11-23 Thread Victor Subervi
On Mon, Nov 23, 2009 at 3:18 PM, Carsten Haese carsten.ha...@gmail.comwrote: Victor Subervi wrote: [Mon Nov 23 09:52:21 2009] [error] [client 66.248.168.98] Premature end of script headers: mailSpreadsheet.py, referer: http://globalsolutionsgroup.vi/display_spreadsheet.py Why? A CGI

Re: print function in python3.1

2009-11-23 Thread Terry Reedy
Dennis Lee Bieber wrote: Does Python 3.x include SQLite? Of course ;-] import sqlite3 dir(sqlite3) ['Binary', 'Cache', 'Connection', 'Cursor', 'DataError', [snip] adapt', 'adapters', 'apilevel', 'complete_statement', 'connect', 'converters', 'datetime', 'dbapi2',

Re: Go versus Brand X

2009-11-23 Thread Antoine Pitrou
Le Mon, 23 Nov 2009 11:54:19 -0600, Robert Kern a écrit : Not really. The idea was to make the language easily parsed and lexed and analyzed by *other* tools, not written in Go, that may have limited capabilities. Well, if Go doesn't allow you to write libraries usable from other low- level

Waiting for receiving data

2009-11-23 Thread Anjanesh Lekshminarayanan
fp = urllib.urlopen(url) data = fp.read() Retrieving XML data via an XML service API. Very often network gets stuck in between. No errors / exceptions. CTRL+C File get-xml.py, line 32, in module fp = urllib.urlopen(url) File /usr/lib/python2.6/urllib.py, line 87, in urlopen return

Re: IDE+hg

2009-11-23 Thread Joshua Kugler
NiklasRTZ wrote: If you know a good light IDE with hg, please inform. Topic handled earlier, still undecided http://groups.google.com/group/google-appengine-python/browse_thread/... Thanks in advance Niklas Rosencrantz WingIDE support Hg, as well as svn, git, and many others. j --

Re: A More Concise Description of Numpy than the Guide to Numpy?

2009-11-23 Thread W. eWatson
Robert Kern wrote: On 2009-11-23 11:49 AM, W. eWatson wrote: I'm looking the 300+ page pdf of the Guide to Numpy. Is there a more concise and practical guide to its use in science and mathematics? You will want to ask numpy questions on the numpy mailing list:

  1   2   3   >