ANN: PyIMSL Studio 1.5 now available at no charge for non-commercial use

2009-11-18 Thread Steve Lang
Visual Numerics, a Rogue Wave Software Company, is making PyIMSL Studio 1.5 available for download at no charge for non-commercial use or for commercial evaluation. Learn more about PyIMSL Studio and download at: http://www.vni.com/campaigns/pyimslstudioeval PyIMSL Studio contains both open

ANN: Urwid 0.9.9 - Console UI Library

2009-11-18 Thread Ian Ward
Announcing Urwid 0.9.9 -- Urwid home page: http://excess.org/urwid/ Updated screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.tar.gz RSS: http://excess.org/feeds/tag/urwid/ About this release: ===

Pydev 1.5.1 Released

2009-11-18 Thread Fabio Zadrozny
Hi All, Pydev 1.5.1 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improvements in the AST rewriter * Improvements on the refactoring engine: o No longer using BRM o

IMDbPY 4.3

2009-11-18 Thread Davide Alberani
IMDbPY 4.3 is available (tgz, rpm, exe) from: http://imdbpy.sourceforge.net/ IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies. With this release, a lot of bugs were fixed, and some minor new features

announcing Caribou: python migrations for sqlite databases

2009-11-18 Thread clutchski
check it out: http://github.com/clutchski/caribou feedback is much appreciated. thanks for reading. -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

ANN: a mini-language for encapsulating deep-copy operations on Python data structures

2009-11-18 Thread Steve Howell
During the last few days I have written code in support of a small DDL language that encapsulates a concise representation of the manipulations needed to make a deep subcopy of a Python-like data structure. It is inspired by syntax from mainstream modern languages, including, of course, Python.

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread Diez B. Roggisch
Lie Ryan schrieb: hong zhang wrote: --- On Tue, 11/17/09, Tim Chase python.l...@tim.thechases.com wrote: From: Tim Chase python.l...@tim.thechases.com Subject: Re: IOError: [Errno 28] No space left on device To: Lie Ryan lie.1...@gmail.com Cc: python-list@python.org Date: Tuesday, November

Re: XML root node attributes

2009-11-18 Thread Slafs
Thanks But this doesn't work. I've ended using something like this: import xml.etree.ElementTree as ET root = ET.Element(root, dict(a='v', b='v2', c='v3')) n = ET.SubElement(root,'d') tree = ET.ElementTree(root) import sys tree.write(sys.stdout) On 17 Lis, 15:36, Stefan Behnel

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steve Howell
On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end constructs, I have to say that Python does occasionally force you to write code like the code below. Maybe force is too strong a word, but Python lends itself to if/elif blocks like below, which get the

Re: What is the difference between 'except IOError as e:' and 'except IOError, e:'

2009-11-18 Thread Marcus Gnaß
See also http://docs.python.org/dev/3.0/whatsnew/2.6.html#pep-3110-exception-handling-changes -- http://mail.python.org/mailman/listinfo/python-list

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 1:15 AM, Steve Howell showel...@yahoo.com wrote: On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end constructs, I have to say that Python does occasionally force you to write code like the code below.  Maybe force is too

pygtk - icons?

2009-11-18 Thread Helmut Jarausch
Hi, please bear in mind that I'm an absolute newcomer to (py)gtk. I'm trying to install the nice synchronization tool http://live.gnome.org/Conduit which is written in Python and use pyGTK. This installed several icons e.g. /usr/share/icons/hicolor/16x16/apps/conduit.png When run, Conduit

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steve Howell
On Nov 18, 1:32 am, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 1:15 AM, Steve Howell showel...@yahoo.com wrote: On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end constructs, I have to say that Python does occasionally force you

Re: A different take on finding primes

2009-11-18 Thread Anh Hai Trinh
1) google list of prime numbers 2) see Prime numbers list in the results (number 3 in the results) 3) click link that leads towww.prime-numbers.org I found 455042511 prime numbers in approx 15 seconds. Not bad at all. How about using http://www.sagemath.org/ (written in Python). sage:

Re: TODO and FIXME tags

2009-11-18 Thread Jean-Michel Pichavant
Scott David Daniels wrote: Martin P. Hellwig wrote: Ben Finney wrote: Chris Rebert c...@rebertia.com writes: 2009/11/16 Yasser Almeida Hernández pedro...@fenhi.uh.cu: How is the sintaxis for set the TODO and FIXME tags...? ... There's no widely-followed “syntax” for this convention,

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steve Howell
On Nov 18, 1:32 am, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 1:15 AM, Steve Howell showel...@yahoo.com wrote: On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end constructs, I have to say that Python does occasionally force you

Re: Stagnant Frame Data?

2009-11-18 Thread Mike
On Nov 15, 1:36 pm, Terry Reedy tjre...@udel.edu wrote: Peter Otten wrote: Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes,

Re: Stagnant Frame Data?

2009-11-18 Thread Mike
On Nov 15, 1:36 pm, Terry Reedy tjre...@udel.edu wrote: Peter Otten wrote: Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes,

PyQt4 4.4.4 : a bug with highlightBlock ?

2009-11-18 Thread Snouffy
Hello everybody, I've been trying to do some syntax highlighting using PyQt4. I ported the example given in the documentation of Qt4 to Python. It works fine on my computer at work (which has PyQt4 version 4.3.3) but doesn't on my home computer (which has version 4.4.4) : it gets stuck in an

getting properly one subprocess output

2009-11-18 Thread Jean-Michel Pichavant
Hi python fellows, I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran into an annoying issue: The stdout display is somehow truncated (maybe a terminal length issue, I don't know), breaking my parsing. import

Re: ANN: Urwid 0.9.9 - Console UI Library

2009-11-18 Thread Daniel Fetchinson
How did you make the html 'screenshots'? I guess you have some kind of urwid2html tool or some such or is it plain ncurses? It's all handled in the demo code. This is from tour.py: if urwid.web_display.is_web_request(): screen = urwid.web_display.Screen() else:

Re: Accessing a Web server --- how?

2009-11-18 Thread Nick Stinemates
This is what the History and Compare URL translates to: http://service.nordea.com/nordea-openpages/six.action?target=/nordea.public/bond/nordeabond.pagemagic=(cc+(detail+(tsid+310746)+(view+hist))) Some questions.. Do you have an idea on what the tsid is? It looks like it's a unique identifier

Re: A different take on finding primes

2009-11-18 Thread Nigel Rowe
On Tue, 17 Nov 2009 05:21, Tobiah wrote in comp.lang.python okgmm.17283$et3.3...@newsfe17.iad: Let me be clear, given 2min, how many primes can you find, they need not be in order or consecutive. Do they have to go from low to high? :( ) 1) google list of prime numbers 2) see Prime

Re: Language mavens: Is there a programming with if then else ENDIFsyntax?

2009-11-18 Thread bartc
Dotan Cohen wrote: 2009/11/16 Steve Ferg steve.ferg.bitbuc...@gmail.com: I've often thought that a language with this kind of block-free syntax would be nice and intuitive: if condition then do stuff elif condition then do stuff else do stuff endif Note that you do not need block

Re: python simply not scaleable enough for google?

2009-11-18 Thread sturlamolden
On 18 Nov, 00:31, Terry Reedy tjre...@udel.edu wrote: The problem for the future is the switch to multiple cores for further speedups. The GIL is not a big problem for scientists. Scientists are not so dependent on threads as the Java/webdeveloper crowd: - We are used to running multiple

Re: python simply not scaleable enough for google?

2009-11-18 Thread sturlamolden
On 18 Nov, 00:24, greg g...@cosc.canterbury.ac.nz wrote: NumPy, for example, is *extremely* flexible. Someone put in the effort, once, to write it and make it fast -- and now an endless variety of programs can be written very easily in Python to make use of it. I'm quite sure David

break LABEL vs. exceptions + PROPOSAL

2009-11-18 Thread Lo'oris
I've found this email, back from 10 years ago: http://mail.python.org/pipermail/python-list/1999-September/009983.html I guess it went unnoticed, because that proposal looks really intresting. • break labels have been refused into python • we can do it anyway using exceptions • this is a

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Simon Brunning
2009/11/17 sjm sjms...@gmail.com: On Nov 16, 12:54 pm, Steve Ferg steve.ferg.bitbuc...@gmail.com wrote: snip Does anybody know a language with this kind of syntax for ifThenElseEndif? Modern-day COBOL: IF      some-condition        do-something ELSE        do-something-else END-IF.

Re: break LABEL vs. exceptions + PROPOSAL

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 4:05 AM, Lo'oris loo...@gmail.com wrote: I've found this email, back from 10 years ago: http://mail.python.org/pipermail/python-list/1999-September/009983.html I guess it went unnoticed, because that proposal looks really intresting. • break labels have been refused

Re: ANN: a mini-language for encapsulating deep-copy operations on Python data structures

2009-11-18 Thread M.-A. Lemburg
Steve Howell wrote: During the last few days I have written code in support of a small DDL language that encapsulates a concise representation of the manipulations needed to make a deep subcopy of a Python-like data structure. It is inspired by syntax from mainstream modern languages,

Minimally intrusive XML editing using Python

2009-11-18 Thread Thomas Lotze
I wonder what Python XML library is best for writing a program that makes small modifications to an XML file in a minimally intrusive way. By that I mean that information the program doesn't recognize is kept, as are comments and whitespace, the order of attributes and even whitespace around

Re: Redirect stdout to a buffer [Errno 9]

2009-11-18 Thread Ecir Hana
On Nov 17, 6:51 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: The code below now reads from the pipe everything that has been written --   except from Python :( Thanks a lot for the fine code! So far I don't know why it fails to print from Python - I'll post here any news I get... --

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Stefan Behnel
Thomas Lotze, 18.11.2009 13:55: I wonder what Python XML library is best for writing a program that makes small modifications to an XML file in a minimally intrusive way. By that I mean that information the program doesn't recognize is kept, as are comments and whitespace, the order of

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 4:55 AM, Thomas Lotze tho...@thomas-lotze.de wrote: I wonder what Python XML library is best for writing a program that makes small modifications to an XML file in a minimally intrusive way. By that I mean that information the program doesn't recognize is kept, as are

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Thomas Lotze
Stefan Behnel wrote: Take a look at canonical XML (C14N). In short, that's the only way to get a predictable XML serialisation that can be used for textual diffs. It's supported by lxml. Thank you for the pointer. IIUC, c14n is about changing an XML document so that its textual representation

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Thomas Lotze
Chris Rebert wrote: Have you considered using an XML-specific diff tool such as: I'm afraid I'll have to fall back to using such a thing if I don't find a solution to what I actually want to do. I do realize that XML isn't primarily about its textual representation, so I guess I shouldn't be

Re: ast manipulation

2009-11-18 Thread Tsize
Terry, Thank you for responding. I actually figured out how to do this shortly after posting the message. Sorry I wasn't quite clear enough in my post, I will try to be a little more explict in the future. Just to mention it I want to go to each node in the ast including child nodes and change

Inserting Unicode text with MySQLdb in Python 2.4-2.5?

2009-11-18 Thread Keith Hughitt
Hi all, I ran into a problem recently when trying to add support for earlier versions of Python (2.4 and 2.5) to some database related code which uses MySQLdb, and was wondering if anyone has any suggestions. With later versions of Python (2.6), inserting Unicode is very simple, e.g.: # -*-

Re: Inserting Unicode text with MySQLdb in Python 2.4-2.5?

2009-11-18 Thread Diez B. Roggisch
Keith Hughitt wrote: Hi all, I ran into a problem recently when trying to add support for earlier versions of Python (2.4 and 2.5) to some database related code which uses MySQLdb, and was wondering if anyone has any suggestions. With later versions of Python (2.6), inserting Unicode is

base64MIME problem, Or Just New Email Client

2009-11-18 Thread Victor Subervi
Hi; I'm using SimpleMail, available from SF, that used to work fine for me but now I can't build it on my new server. I get this error: [Tue Nov 17 09:53:13 2009] [error] [client 208.84.198.58] import smtplib, referer: http://globalsolutionsgroup.vi/display_spreadsheet.py [Tue Nov 17 09:53:13

Re: open source linux - windows database connectivity?

2009-11-18 Thread Tony Schmidt
Woo-hoo! Forget ODBC. Got this working with Jython and JDBC drivers! On Nov 13, 1:03 am, M.-A. Lemburg m...@egenix.com wrote: TonySchmidtwrote: Note: The client part of this product is free. You only need to get a license for the server part. Yeah, but don't I need the server part to

best performance for storage of server information for python CGI web app?

2009-11-18 Thread davidj411
I am wondering what will give me the best performance for storing information about the servers in our environment. currently i store all info about all servers in a single shelve file, but i have concerns. 1) as the size of the shelve file increases, will performance suffer ? 2) what about if 2

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread Grant Edwards
On 2009-11-18, hong zhang henryzhan...@yahoo.com wrote: Apparently the harddisk where you stored the file is full? It's not a real file, and takes up no space. I have plenty space see: $ df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 74027808

non-copy slices

2009-11-18 Thread tbourden
Hi, I was looking for a facility similar to slices in python library that would avoid the implicit creation of a new list and copy of elements that is the default behaviour. Instead I'd rather have a lazy iteratable object on the original sequence. Well, in the end I wrote it myself but I was

Re: non-copy slices

2009-11-18 Thread Tim Golden
tbour...@doc.ic.ac.uk wrote: Hi, I was looking for a facility similar to slices in python library that would avoid the implicit creation of a new list and copy of elements that is the default behaviour. Instead I'd rather have a lazy iteratable object on the original sequence. Well, in the end

Re: non-copy slices

2009-11-18 Thread tbourden
Ahhh yes! that's exactly it. Thanks for pointing out! Themis On Wed, Nov 18, 2009 at 3:44 PM, Tim Golden m...@timgolden.me.uk wrote: tbour...@doc.ic.ac.uk wrote: Hi, I was looking for a facility similar to slices in python library that would avoid the implicit creation of a new list

Re: getting properly one subprocess output

2009-11-18 Thread Jon Clements
On Nov 18, 11:25 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Hi python fellows, I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran into an annoying issue: The stdout display is somehow truncated (maybe a

Re: getting properly one subprocess output

2009-11-18 Thread Jon Clements
On Nov 18, 4:14 pm, Jon Clements jon...@googlemail.com wrote: On Nov 18, 11:25 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Hi python fellows, I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran

using struct module on a file

2009-11-18 Thread Ulrich Eckhardt
Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a struct.Struct instance) and then parsing it with unpack(). For that, I repeatedly

question about tree in python

2009-11-18 Thread nospam
How should I write a tree using diconary. I have used a dictonary to make a tree. tree={best:collections.defaultdict(lambda:default)} in a id3 tree. Is there a way to multple values and when then only return on type of values. I tried this apporach but it did not work. class Tree: def

Re: Beautifulsoup code that is not running

2009-11-18 Thread Peter Pearson
On Tue, 17 Nov 2009 14:38:55 -0800 (PST), Zeynel azeyn...@gmail.com wrote: [snip] from BeautifulSoup import BeautifulSoup soup = BeautifulSoup (file(test.html).read()) title = soup.find('title') titleString = title.string open('extract.text', 'w').write(titleString) This runs without an

Re: ANN: a mini-language for encapsulating deep-copy operations on Python data structures

2009-11-18 Thread Steve Howell
On Nov 18, 4:34 am, M.-A. Lemburg m...@egenix.com wrote: Steve Howell wrote: [...] Here is an example of the DDL (and I hate the terminology DDL, just cannot think of anything better):             {                 'show_table_of_contents',                 'author' {                

Re: using struct module on a file

2009-11-18 Thread Jon Clements
On Nov 18, 4:42 pm, Ulrich Eckhardt dooms...@knuut.de wrote: Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a struct.Struct instance)

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-18 Thread Brian Curtin
On Tue, Nov 17, 2009 at 19:59, Mark Hammond skippy.hamm...@gmail.comwrote: On 18/11/2009 6:29 AM, Randall Walls wrote: I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards inva...@invalid.invalid wrote: From: Grant Edwards inva...@invalid.invalid Subject: Re: IOError: [Errno 28] No space left on device To: python-list@python.org Date: Wednesday, November 18, 2009, 9:22 AM On 2009-11-18, hong zhang henryzhan...@yahoo.com

DOM related question and problem

2009-11-18 Thread elca
Hello, these day im making python script related with DOM. problem is these day many website structure is very complicate . what is best method to check DOM structure and path.. i mean...following is some example. what is best method to check can extract such like following info quickly?

Re: ANN: Urwid 0.9.9 - Console UI Library

2009-11-18 Thread Chris Jones
I noticed that when run on a 256-color capable xterm, upon exiting the demo programs the colors in the bash shell are modified - e.g the bash prompt, the output of colored ls commands. For instance, due to my fiddling with dircolors, a file with executable flags on is normally displayed in light

Re: DOM related question and problem

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 10:04 AM, elca high...@gmail.com wrote: Hello, these day im making python script related with DOM. problem is these day many website structure is very complicate . what is best method to check DOM structure and path.. i mean...following is some example. what is

Re: break LABEL vs. exceptions + PROPOSAL

2009-11-18 Thread Terry Reedy
Chris Rebert wrote: On Wed, Nov 18, 2009 at 4:05 AM, Lo'oris loo...@gmail.com wrote: I've found this email, back from 10 years ago: http://mail.python.org/pipermail/python-list/1999-September/009983.html I guess it went unnoticed, because that proposal looks really intresting. I think it

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread Diez B. Roggisch
hong zhang wrote: --- On Wed, 11/18/09, Grant Edwards inva...@invalid.invalid wrote: From: Grant Edwards inva...@invalid.invalid Subject: Re: IOError: [Errno 28] No space left on device To: python-list@python.org Date: Wednesday, November 18, 2009, 9:22 AM On 2009-11-18, hong zhang

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Anthra Norell
Thomas Lotze wrote: Chris Rebert wrote: Have you considered using an XML-specific diff tool such as: I'm afraid I'll have to fall back to using such a thing if I don't find a solution to what I actually want to do. I do realize that XML isn't primarily about its textual

Re: Command line arguments??

2009-11-18 Thread Nobody
On Tue, 17 Nov 2009 23:57:55 +, Rhodri James wrote: Quote the filenames or escape the spaces: C:\Python26\Python.exe C:\echo.py C:\New Folder\text.txt We've been living with this pain ever since windowed GUIs encouraged users to put spaces in their file names (Apple, I'm looking at

Re: Calling Python functions from Excel

2009-11-18 Thread Cannonbiker
On 18 lis, 03:09, Mark Tolonen metolone+gm...@gmail.com wrote: Chris Withers ch...@simplistix.co.uk wrote in message news:4b02d1e3.6080...@simplistix.co.uk... Mark Tolonen wrote: Please I need Calling Python functions from Excel and receive result back in Excel. Can me somebody advise

Re: getting properly one subprocess output

2009-11-18 Thread Nobody
On Wed, 18 Nov 2009 12:25:14 +0100, Jean-Michel Pichavant wrote: I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran into an annoying issue: The stdout display is somehow truncated (maybe a terminal length issue, I

Re: non-copy slices

2009-11-18 Thread Terry Reedy
tbour...@doc.ic.ac.uk wrote: Hi, I was looking for a facility similar to slices in python library that would avoid the implicit creation of a new list and copy of elements that is the default behaviour. Instead I'd rather have a lazy iteratable object on the original sequence. Well, in the

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards inva...@invalid.invalid wrote: From: Grant Edwards inva...@invalid.invalid Subject: Re: IOError: [Errno 28] No space left on device To: python-list@python.org Date: Wednesday, November 18, 2009, 9:22 AM On 2009-11-18, hong zhang henryzhan...@yahoo.com

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Diez B. Roggisch de...@nospam.web.de wrote: From: Diez B. Roggisch de...@nospam.web.de Subject: Re: IOError: [Errno 28] No space left on device To: python-list@python.org Date: Wednesday, November 18, 2009, 12:11 PM hong zhang wrote: --- On Wed, 11/18/09,

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Dave Angel
Thomas Lotze wrote: Chris Rebert wrote: Have you considered using an XML-specific diff tool such as: I'm afraid I'll have to fall back to using such a thing if I don't find a solution to what I actually want to do. I do realize that XML isn't primarily about its textual

Re: Minimally intrusive XML editing using Python

2009-11-18 Thread Nobody
On Wed, 18 Nov 2009 13:55:52 +0100, Thomas Lotze wrote: I wonder what Python XML library is best for writing a program that makes small modifications to an XML file in a minimally intrusive way. By that I mean that information the program doesn't recognize is kept, as are comments and

Re: python gui builders

2009-11-18 Thread Dave Cook
On 2009-11-18, sturlamolden sturlamol...@yahoo.no wrote: GPL If it's an issue for your project, I suggest wxPython. It's cross-platform, fairly complete, and extensible. But the API is clunky compared to Qt. Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

A Good Mailer

2009-11-18 Thread Victor Subervi
Hi; I need a good mailer that will enable me to mail email from web forms. Suggestions? TIA, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsError is not available on linux?

2009-11-18 Thread Aahz
In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. Here's what I told a co-worker to do yesterday: if os.name == 'nt': DiskError = (OSError,

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread Grant Edwards
On 2009-11-18, Diez B. Roggisch de...@nospam.web.de wrote: hong zhang wrote: but following is good. cont_tx = 1 for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'): with open(i, 'w') as f: print f, cont_tx Well, if that works, then what's your

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Simon Forman
On Wed, Nov 18, 2009 at 4:15 AM, Steve Howell showel...@yahoo.com wrote: On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end constructs, I have to say that Python does occasionally force you to write code like the code below.  Maybe force is too

Re: Language mavens: Is there a programming with if then else ENDIFsyntax?

2009-11-18 Thread Dotan Cohen
The OP explicitly said no block delimiters. Your example uses {..}, and doesn't have endif. Just out of habit. I think that PHP, like C, lets you avoid the block deliminators so long as the block all fits on one line. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il --

Re: non-copy slices

2009-11-18 Thread Themis Bourdenas
Sth else that I noticed as I started using islice. The name is somewhat misleading. Having the slice part in the name I would expect it to imitate the functionality of normal slices. Random access, sub-slicing etc. However, it is only iteratable. Any particular reasons for that? My guess is that

Re: WindowsError is not available on linux?

2009-11-18 Thread Benjamin Kaplan
On Wed, Nov 18, 2009 at 2:53 PM, Aahz a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu  pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. Here's what I told a

Using setup.py for an application, not a library module.

2009-11-18 Thread John Nagle
Most of the documentation for setup.py assumes you're packaging a library module. (Ref: http://docs.python.org/distutils/setupscript.html;) How do you properly package an application? What happens on setup.py install? Where does the application get installed? Where does the main program

Re: WindowsError is not available on linux?

2009-11-18 Thread exarkun
On 07:53 pm, a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. Here's what I told a co-worker to do yesterday: if

Re: python gui builders

2009-11-18 Thread Simon Hibbs
On 18 Nov, 07:51, sturlamolden sturlamol...@yahoo.no wrote: GPL PyQT is GPL for now, but Qt itself is available under the LGPL as is PySide. Eventualy PySide, which tracks the PyQT API, will supplant it and the issue will be moot. For now it can be a problem, but PyQT developer licenses are

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards inva...@invalid.invalid wrote: From: Grant Edwards inva...@invalid.invalid Subject: Re: IOError: [Errno 28] No space left on device To: python-list@python.org Date: Wednesday, November 18, 2009, 2:00 PM On 2009-11-18, Diez B. Roggisch

Re: WindowsError is not available on linux?

2009-11-18 Thread Christian Heimes
Dave Angel wrote: Worse, even if the exception cannot be thrown on a non-Windows environment, leaving it undefined makes it very awkward to write portable code. An except clause that can never happen in a particular environment is pretty innocent. Or somebody can use a base class for

Re: non-copy slices

2009-11-18 Thread Ethan Furman
tbour...@doc.ic.ac.uk wrote: Hi, I was looking for a facility similar to slices in python library that would avoid the implicit creation of a new list and copy of elements that is the default behaviour. Instead I'd rather have a lazy iteratable object on the original sequence. Well, in the

Re: python gui builders

2009-11-18 Thread Simon Hibbs
On 17 Nov, 23:25, Kevin Walzer k...@codebykevin.com wrote: On 11/17/09 4:25 PM, Tim Daneliuk wrote: +1 Tkinter for the simple stuff You can actually use Tkinter to do quite sophisticated GUI's that rival anything found in Qt or wx... Neither Tkinteror Wx have anything that come close to

Re: python gui builders

2009-11-18 Thread David Bolen
Simon Hibbs simon.hi...@gmail.com writes: I've had this problem for a few years. I've tried PythonCard, WxWidgets with WxDesigner, BoaConstructor, etc. None of them come anywhere close to PyQT/QTDesigner. For me, the killer feature missing from of all of the wx-based designers is that they

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steven D'Aprano
On Wed, 18 Nov 2009 09:33:38 +0200, Dotan Cohen wrote: Is there any particular reason why this might be a *bad* language- design idea? It is about as far from OO as one could get. Whether or not that is bad depends on the use case. That's crazy talk. IF...ENDIF is *syntax*, not a

Re: WindowsError is not available on linux?

2009-11-18 Thread Dave Angel
Benjamin Kaplan wrote: On Wed, Nov 18, 2009 at 2:53 PM, Aahz a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the

Solved: Inserting Unicode text with MySQLdb in Python 2.4-2.5?

2009-11-18 Thread Threader Slash
-- Forwarded message -- From: Keith Hughitt keith.hugh...@gmail.com To: python-list@python.org Date: Wed, 18 Nov 2009 06:09:11 -0800 (PST) Subject: Inserting Unicode text with MySQLdb in Python 2.4-2.5? Hi all, I ran into a problem recently when trying to add support for earlier

Re: python gui builders

2009-11-18 Thread Stef Mientki
Simon Hibbs wrote: On 18 Nov, 07:51, sturlamolden sturlamol...@yahoo.no wrote: GPL PyQT is GPL for now, but Qt itself is available under the LGPL as is PySide. Eventualy PySide, which tracks the PyQT API, will supplant it and the issue will be moot. For now it can be a problem, but

Re: Using setup.py for an application, not a library module.

2009-11-18 Thread Philip Semanchuk
On Nov 18, 2009, at 3:53 PM, John Nagle wrote: Most of the documentation for setup.py assumes you're packaging a library module. (Ref: http://docs.python.org/distutils/setupscript.html ) How do you properly package an application? What happens on setup.py install? Where does the

Re: A Good Mailer

2009-11-18 Thread Nick Stinemates
On Wed, Nov 18, 2009 at 03:27:11PM -0400, Victor Subervi wrote: Hi; I need a good mailer that will enable me to mail email from web forms. smtplib Suggestions? silly example.. #!/usr/bin/env python import smtplib session = smtplib.SMTP(localhost) username = abc password = def

Re: using struct module on a file

2009-11-18 Thread Simon Forman
On Wed, Nov 18, 2009 at 11:42 AM, Ulrich Eckhardt dooms...@knuut.de wrote: Hia! I need to read a file containing packed binary data. For that, I find the struct module pretty convenient. What I always need to do is reading a chunk of data from the file (either using calcsize() or a

Re: python gui builders

2009-11-18 Thread Kevin Walzer
On 11/18/09 4:15 PM, Simon Hibbs wrote: On 17 Nov, 23:25, Kevin Walzerk...@codebykevin.com wrote: On 11/17/09 4:25 PM, Tim Daneliuk wrote: +1 Tkinter for the simple stuff You can actually use Tkinter to do quite sophisticated GUI's that rival anything found in Qt or wx... Neither

Re: Using setup.py for an application, not a library module.

2009-11-18 Thread Alan Franzoni
On 11/18/09 9:53 PM, John Nagle wrote: Most of the documentation for setup.py assumes you're packaging a library module. (Ref: http://docs.python.org/distutils/setupscript.html;) How do you properly package an application? What happens on setup.py install? Where does the application get

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steven D'Aprano
On Wed, 18 Nov 2009 01:53:50 -0800, Steve Howell wrote: On Nov 18, 1:32 am, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 1:15 AM, Steve Howell showel...@yahoo.com wrote: On the topic of switch statements and even-more-concise-then-we-have- already if/elif/else/end

Re: New syntax for blocks

2009-11-18 Thread Steven D'Aprano
On Wed, 18 Nov 2009 18:28:11 +1300, greg wrote: r wrote: I think the syntax was chosen because the alternatives are even worse AND since assignment is SO common in programming, would you *really* rather type two chars instead of one? Smalltalk solved the problem by using a left-arrow

Arcane question regarding white space, editors, and code collapsing

2009-11-18 Thread Wells
I work in TextMate a lot, which I generally love, but it's code collapsing confounds me. Essentially you have to indent blank lines to the proper level for the current block. Then it will collapse that section as one section. If you have simply a new line, it will see it as a break, and not

Re: Arcane question regarding white space, editors, and code collapsing

2009-11-18 Thread Ben Finney
Wells we...@submute.net writes: Is it... pythonic, then, to have these lines of tabs/spaces to support code collapsing? Is it proper, improper, or irrelevant? It's quite improper (though syntactically null, in Python) to have trailing whitespace on lines. That includes blank lines. One major

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-18 Thread Steve Howell
On Nov 18, 2:22 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Wed, 18 Nov 2009 02:06:49 -0800, Steve Howell wrote: P.S. The underscores before the method names might look a little funny for inner methods, but it's the nature of the code..._dict and _list would lead to

Writing a Carriage Return in Unicode

2009-11-18 Thread Doug
Hi! I am trying to write a UTF-8 file of UNICODE strings with a carriage return at the end of each line (code below). filOpen = codecs.open(c:\\temp\\unicode.txt,'w','utf-8') str1 = u'This is a test.' str2 = u'This is the second line.' str3 = u'This is the third line.' strCR = u\u240D

  1   2   3   >