ANN : Karrigell 2.3.1 released - CGI support

2006-09-03 Thread Pierre Quentel
Karrigell is a simple and flexible Python web framework The main new feature in this version is the support of CGI scripts, running much faster than plain CGI behind Apache (20 times from a quick benchmark with ab) A small blog engine has also been developed Home page :

Re: auto fill out web form

2006-09-03 Thread Ravi Teja
Chris Smith wrote: Does anyone know of any python scripts that can help me automatically navigate through some forms so I can schedule the download the file at the end of all the questions? ClientForm http://wwwsearch.sourceforge.net/ClientForm/ --

Re: python loops

2006-09-03 Thread Tim Roberts
[EMAIL PROTECTED] wrote: AlbaClause wrote: for i in range(length): print i Or usually better: for ii in xrange(length): ... xrange used to be better. As I understand it, that's no longer the case. -- - Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. --

Twisted vs POS (Plain-old sockets)

2006-09-03 Thread Darren Kirby
Hey all,I have a (FOSS) project here that I am about to start that requires TCP networking support, and in fact, will require me to design and implement a (text based) protocol from scratch.I have been playing with Twisted today and managed to get a simple client/server talking to each other.

User defined functions through Automation in Excel 2003

2006-09-03 Thread jpgreenwald
Hi all, Im trying to create user defined functions (ones that you can use in the cells of excel) in python. I know that its a ...dumb... thing to do since its a lot easier in other languages (vb,c#, vc..etc) but Im stuck on seeing if I can get this to work. Currently I have written a simple

Re: CONSTRUCT -

2006-09-03 Thread Georg Brandl
lazaridis_com wrote: I would like to fulfill the following task: The construct: if __name__ == '__main__': should be changed to something like: if identifier.name == '__main__': The term identifier should be selected based on the meaning of the __double-underscore-enclosure__ of

Re: python loops

2006-09-03 Thread Fredrik Lundh
Tim Roberts wrote: xrange used to be better. As I understand it, that's no longer the case. for short ranges, range is faster in some Python versions, xrange is faster in some (including 2.4). the difference is usually very small (the same number of objects are created in both cases).

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Sybren Stuvel wrote: Tor Erik enlightened us with: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. Which OS are we talking about?

Re: overriding character escapes during file input

2006-09-03 Thread John Machin
John Machin wrote: David J Birnbaum wrote: Dear Python-list, I need to read a Unicode (utf-8) file that contains text like: blah \fR40\fC blah I get my input and then process it with something like: inputFile = codecs.open(sys.argv[1],'r', 'utf-8') for line in inputFile:

Re: python loops

2006-09-03 Thread Fredrik Lundh
Nicko wrote: There's a huge difference between not being profligate with resources and premature optimisation. In the case of the idiom for i in range(x):... there absolutely no utility whatsoever in creating and recording the list of objects. Unless it makes a difference to code structure

Re: Problem loading true-type font with PIL - solved

2006-09-03 Thread Fredrik Lundh
Christian Stapfer wrote: Problem solved by rudely installing PIL 1.1.5 for Windows and Python 2.4 from http://www.pythonware.com/products/pil/ right on top of my existing Python Enthought Edition--Python 2.4.3 for Windows. This might have destroyed the consistency of the overall

Re: How to run Python file?

2006-09-03 Thread Steve Holden
mistral wrote: I have installed ActivePython http://www.activestate.com/Products/ActivePython/ How I can run Python file, test.py? Sheesh, you must have had ten replies and nobody bothered to point you to the frequently-asked questions ... kids today!

Re: Find the best price on gas in your local area for FREE....

2006-09-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: I hate cars and would perfer not to be harrased by those who support irans energy policy.. http://www.dexrow.com [EMAIL PROTECTED] wrote: Visit the web site below to see where you can buy the cheapest gas in your local area. Just punch in your zip code and all the

Re: python loops

2006-09-03 Thread Nicko
Fredrik Lundh wrote: Nicko wrote: ... In the case of the idiom for i in range(x):... there absolutely no utility whatsoever in creating and recording the list of objects. for short lists, both objects create the *same* number of objects. This is true for long lists too, if you iterate

Re: Problem loading true-type font with PIL - solved

2006-09-03 Thread Robert Kern
Fredrik Lundh wrote: Christian Stapfer wrote: Problem solved by rudely installing PIL 1.1.5 for Windows and Python 2.4 from http://www.pythonware.com/products/pil/ right on top of my existing Python Enthought Edition--Python 2.4.3 for Windows. This might have destroyed the consistency of

ftputil protection

2006-09-03 Thread vedran_dekovic
Hi, For people who using ftputil: Have ftputil any protection(SSL..) or any other protection? THANKS -- http://mail.python.org/mailman/listinfo/python-list

Re: CONSTRUCT -

2006-09-03 Thread Fredrik Lundh
Simon Forman wrote: I'm sorry, your post makes very little sense. you're somewhat new here, right ? ;-) /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread keegan . csmith
I've read about SO_REUSEADDR. As far as I understand, this is what SO_REUSEADDR is for: ... I've tried setting this option, but could not see any notable changes... I was having a similiar problem as you, where as soon as my program exited, it would get started up again, but could not bind to

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Fredrik Lundh
Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about these sockets ? /F --

Re: Tkinter listbox and ftputil

2006-09-03 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote by email: Please keep it on the list... | Hi, | Hi and Thanks for all your help,everything work.But I have one | question,in string I am new,and I don't know how to exactly split: | | example: | | '-rw-r--r-- 1 [EMAIL PROTECTED] | v-programs.byethost31.com 2376 Aug

Re: IndentationError: expected an indented block

2006-09-03 Thread Hendrik van Rooyen
Georg Brandl [EMAIL PROTECTED] Wrote: | [EMAIL PROTECTED] wrote: | Hendrik van Rooyen wrote: | [EMAIL PROTECTED] Wrote: | | | | | | Haha. How can I fix this! | | | | | | | | Use either tabs, or spaces, but not both | | - Hendrik | | Haha. I know. I just find it silly that a

Re: Problem loading true-type font with PIL - solved

2006-09-03 Thread Christian Stapfer
Robert Kern wrote: Fredrik Lundh wrote: Christian Stapfer wrote: Problem solved by rudely installing PIL 1.1.5 for Windows and Python 2.4 from http://www.pythonware.com/products/pil/ right on top of my existing Python Enthought Edition--Python 2.4.3 for Windows. This might have destroyed

Re: OO on python real life tutorial?

2006-09-03 Thread Claudio Grondi
Patrick Thomson wrote: I personally don't like wxPython because the way it works is very counter intuitive for me and appear to me somehow non-Pythonic While Claudio has a point (wxPython is a C++ library at heart), I believe that wxPython is the best solution for Python GUI's out there. TK

Building Python with non-traditional paths

2006-09-03 Thread djbclark
Is there a clean way to build Python under a non-traditional path, linking with other software that is under non-traditional paths, on unix? I maintain a build of Python [1] that is part of a self-contained bundle of software [2] to run bcfg2 [3]. The major problem I am having is getting the

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: I've read about SO_REUSEADDR. As far as I understand, this is what SO_REUSEADDR is for: I've tried setting this option, but could not see any notable changes... I was having a similiar problem as you, where as soon as my program exited, it would get started

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about these sockets ?

Re: python loops

2006-09-03 Thread Steve Holden
Nicko wrote: Fredrik Lundh wrote: Nicko wrote: ... In the case of the idiom for i in range(x):... there absolutely no utility whatsoever in creating and recording the list of objects. for short lists, both objects create the *same* number of objects. This is true for long lists too, if

Re: How to run Python file?

2006-09-03 Thread mistral
Steve Holden писал(а): mistral wrote: I have installed ActivePython http://www.activestate.com/Products/ActivePython/ How I can run Python file, test.py? Sheesh, you must have had ten replies and nobody bothered to point you to the frequently-asked questions ... kids today!

Re: How to run Python file?

2006-09-03 Thread bearophileHUGS
mistral: I have installed ActivePython http://www.activestate.com/Products/ActivePython/ How I can run Python file, test.py? Running Python scripts is easy. Load the test.py from the ActivePython and run it. Otherwise you can just click on the file, otherwise you can open a shell in the dir

Re: User defined functions through Automation in Excel 2003

2006-09-03 Thread jpgreenwald
Ive been looking more into this subject and now have a few things to add. Im using some c# code that works in doing what I want (adds the function into excel): using System; using System.Runtime.InteropServices; namespace jtest { [ClassInterface(ClassInterfaceType.AutoDual)] public

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Tor Erik
Tor Erik wrote: Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does netstat say about

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Steve Holden
Tor Erik wrote: Tor Erik wrote: Fredrik Lundh wrote: Tor Erik wrote: The reason is that my application does about 16 connects and data transfers per second, to the same 16 remote hosts. After approx 200 secs there are 4000 sockets waiting to be garbage collected by the OS. what does

Re: OO on python real life tutorial?

2006-09-03 Thread bearophileHUGS
Patrick Thomson: After all, GvR said that wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first. The Wax toolkit (http://zephyrfalcon.org/labs/wax.html)

Pmw installation problem

2006-09-03 Thread vedran_dekovic
Hi, When I download Pmw,and .py files copy to lib,then in python shell I write: import Pmw Traceback (most recent call last): File pyshell#44, line 1, in -toplevel- import Pmw ImportError: No module named Pmw Regards, Vedran,Croatia --

Re: Pmw installation problem

2006-09-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: When I download Pmw,and .py files copy to lib,then in python shell I write: where did you copy what files? you're supposed to place the *entire* Pmw directory somewhere on your path (e.g. under site-packages). see http://pmw.sourceforge.net/doc/starting.html

Re: Python-list Digest, Vol 36, Issue 33

2006-09-03 Thread David J Birnbaum
Dear John (cc python-list), You may find (1) that the file has formfeeds in it or (2) it has r\f in in it and you were mistaken about the interpretation or (3) something else. ... Thank you for the quick response. Ultimately I need to remap the f in \f to something else, so I

Re: Python style: to check or not to check args and data members

2006-09-03 Thread Bruno Desthuilliers
Paul Rubin a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: I've rarely encoutered silent data corruption with Python - FWIW, I once had such a problem, but with a lower-level statically typed language (integer overflow), and I was a very newbie programmer by that time. Usually, one

Python GUI/tk

2006-09-03 Thread [EMAIL PROTECTED]
Hi, I am making a GUI with the help of python.In the program, when ADD button is pressed new frames build up and when you press delete button those frames will be destroyed . My problem is that these frames only get destroyed in Tk but the data structure associated with it (in Python) doesn't

regex matching rst code block?

2006-09-03 Thread Edward K. Ream
Here is a little regular expression puzzle. I wish a regex that matches an rst code block, that is, '::' followed by a group of lines all indented by at least as much as the first non-blank line following the '::' My guess is that this is not possible. Can anyone prove me wrong :-)

Re: Pmw installation problem

2006-09-03 Thread vedran_dekovic
Fredrik Lundh je napisao/la: [EMAIL PROTECTED] wrote: When I download Pmw,and .py files copy to lib,then in python shell I write: where did you copy what files? you're supposed to place the *entire* Pmw directory somewhere on your path (e.g. under site-packages). see

Re: Pmw installation problem

2006-09-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: where did you copy what files? you're supposed to place the *entire* Pmw directory somewhere on your path (e.g. under site-packages). see http://pmw.sourceforge.net/doc/starting.html All files (.py),I was copy in lib have you tried copying the Pmw

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread alf
Sybren Stuvel wrote: Hi folks, Sometimes I have to feed data from an OpenOffice.org spreadsheet into some Python program. To make that really easy, I've written a small example program that connects to a running OpenOffice.org instance and reads the data from the currently opened

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Alex Martelli
Steve Holden [EMAIL PROTECTED] wrote: ... set registry key: KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\M axUserPort to a new DWORD value... (5000 - 65534) The default in XP is 3976 - http://support.microsoft.com/kb/Q149532 I wonder why (performance under

Re: Twisted vs POS (Plain-old sockets)

2006-09-03 Thread Jean-Paul Calderone
On Sun, 3 Sep 2006 00:19:17 -0700, Darren Kirby [EMAIL PROTECTED] wrote: Hey all, I have a (FOSS) project here that I am about to start that requires TCP networking support, and in fact, will require me to design and implement a (text based) protocol from scratch. I'm sorry. I have been

Re: CONSTRUCT -

2006-09-03 Thread lazaridis_com
Georg Brandl wrote: lazaridis_com wrote: I would like to fulfill the following task: The construct: if __name__ == '__main__': should be changed to something like: if identifier.name == '__main__': The term identifier should be selected based on the meaning of the

Re: regex matching rst code block?

2006-09-03 Thread Peter Otten
Edward K. Ream wrote: Here is a little regular expression puzzle. I wish a regex that matches an rst code block, that is, '::' followed by a group of lines all indented by at least as much as the first non-blank line following the '::' My guess is that this is not possible. Can anyone

Re: CONSTRUCT - Module Attributes and Execution Environment

2006-09-03 Thread lazaridis_com
lazaridis_com wrote: lazaridis_com wrote: I would like to change the construct: if __name__ == '__main__': ... Is there a standard way / naming to wrap __name__ and other similar attributes to an encapsulating class? ... see follow-up thread:

pdf to hhp for boa-constructor help

2006-09-03 Thread [EMAIL PROTECTED]
Is there a way to convert from .pdf to hhp so that I can add help files to boa constructor.. adding html to it would also be helpfull http://www.dexrow.com -- http://mail.python.org/mailman/listinfo/python-list

str.isspace()

2006-09-03 Thread bearophileHUGS
Are you using the str.isspace() method? I don't use it, so if most people don't uses it, then it may be removed from Py 3.0. I usually need to know if a string contains some non-spaces (not space class chars). To do it I use something like: if aline.strip(): ... If you really need str.isspace()

Re: Help with autotools

2006-09-03 Thread pavel . starek
Jonh Wendell wrote: Hi all! I need help with autotools stuff.. My directory structure: project_name src main.py others.py data ui.glade images.png po translations.po I'd like to do something like that: The files in src should be installed at:

Re: regex matching rst code block?

2006-09-03 Thread Edward K. Ream
Why not convert the reStructuredText to XML and parse that? Because the problem arises for the jEdit syntax colorer whose most powerful pattern matcher is a regex. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo:

Re: regex matching rst code block?

2006-09-03 Thread Edward K. Ream
r(::\s*\n(\s*\n)*((\s+).*?\n)(((\4).*?\n)|(\s*\n))*) Thanks for this. I'll try it out. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.html

Re: Python style: to check or not to check args and data members

2006-09-03 Thread Jean-Paul Calderone
On Sun, 03 Sep 2006 16:29:11 +0200, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Paul Rubin a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: I've rarely encoutered silent data corruption with Python - FWIW, I once had such a problem, but with a lower-level statically typed language

Re: Broadcast server

2006-09-03 Thread Michael
[EMAIL PROTECTED] wrote: It sounds very interesting and i will definitely take a deeper look but i was more considering something simpler as a learning exercise more that finding a package that should already do what i want to achieve. The bulk of this post dissects (roughly) how Kamaelia

Re: str.isspace()

2006-09-03 Thread Jean-Paul Calderone
On 3 Sep 2006 09:20:49 -0700, [EMAIL PROTECTED] wrote: Are you using the str.isspace() method? I don't use it, so if most people don't uses it, then it may be removed from Py 3.0. I usually need to know if a string contains some non-spaces (not space class chars). To do it I use something like:

Re: str.isspace()

2006-09-03 Thread forman . simon
[EMAIL PROTECTED] wrote: Are you using the str.isspace() method? I don't use it, so if most people don't uses it, then it may be removed from Py 3.0. I usually need to know if a string contains some non-spaces (not space class chars). To do it I use something like: if aline.strip(): ...

Re: Python style: to check or not to check args and data members

2006-09-03 Thread Alex Martelli
Jean-Paul Calderone [EMAIL PROTECTED] wrote: ... class A(object): note that A is new-style... class x: ...while x is old-style. Here's a small script to explore the problem...: import sys class oldstyle: def __getitem__(self, index): print index, class newstyle(object,

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Felipe Almeida Lessa
2006/9/3, Alex Martelli [EMAIL PROTECTED]: Reflecting on the OP's use case, since all connections are forever being made to the same 16 servers, why not tweak thinks a bit to hold those connections open for longer periods of time, using a connection for many send/receive transactions instead

Re: str.isspace()

2006-09-03 Thread George Sakkis
Jean-Paul Calderone wrote: On 3 Sep 2006 09:20:49 -0700, [EMAIL PROTECTED] wrote: Are you using the str.isspace() method? I don't use it, so if most people don't uses it, then it may be removed from Py 3.0. I usually need to know if a string contains some non-spaces (not space class

Setting custom folder icon in OS X?

2006-09-03 Thread Jet Jaguar
I'm trying to find a way to set a custom folder icon in OS X. I thought that Applescript would be able to do it, but apparently it can't. Is there anything in the Macintosh libraries of Python that will allow me to take an image file (e.g., jpeg, png, tiff, etc.) and set it as the icon for a

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread Sybren Stuvel
Hi folks, I just noticed I still had the no archive header on, which is rather stupid. If I want to make life easier for people, the information I posted in this thread should be archived! Here is a small summary: Get data from an OpenOffice.org spreadsheet with a Python script. It works on the

Re: pysqlite - simple problem

2006-09-03 Thread rdrink
Dennis Lee Bieber wrote: That is probably the worst way to fix the problem -- as in the future, you may end up trying that method for something that may need to be quoted or escaped. cur.execute(template, (arg1,) ) allows the DB-API spec to properly convert the argument to the

Re: Client-side TCP socket receiving Address already in use upon connect

2006-09-03 Thread Alex Martelli
Felipe Almeida Lessa [EMAIL PROTECTED] wrote: 2006/9/3, Alex Martelli [EMAIL PROTECTED]: Reflecting on the OP's use case, since all connections are forever being made to the same 16 servers, why not tweak thinks a bit to hold those connections open for longer periods of time, using a

data structure

2006-09-03 Thread noro
Hello again. I have a task i need to do and i can't seem to find an elegent solution. i need to make a tree like data structure (not necessry a binary tree). i would like each node to access his sons in a dicionary kind of why, for example: if ROOT node has the name 'A' and 'AA', 'AB' are his

Re: Broadcast server

2006-09-03 Thread Alex Martelli
[EMAIL PROTECTED] wrote: Yes but before going deeper ( too deep ) i would like to play with a toy python example. Basically what i want to study first is a socket or socket+select server and 5 clients that get time updated from the server. Don't really know how to keep hot connections

Re: Timeline for Python?

2006-09-03 Thread Aahz
In article [EMAIL PROTECTED], crystalattice [EMAIL PROTECTED] wrote: I'd write for 2.4, even though 2.5 should be coming out shortly. There aren't many significant changes to the whole language between 2.4 and 2.5. Probably the best thing is write for 2.4 and have a sidenote stating where 2.5

Re: Managing database tables through web-forms (automatically)

2006-09-03 Thread Daniel Nogradi
Check out Django, it has a great database API and on the fly auto-generated admin. Just gone over the tutorial, really amazing, exactly what I need. That's exactly the response I had when I met with Django :) Anyone with Django experience: how well does it do with respect to upgrades?

Re: data structure

2006-09-03 Thread Jason
noro wrote: Hello again. I have a task i need to do and i can't seem to find an elegent solution. i need to make a tree like data structure (not necessry a binary tree). i would like each node to access his sons in a dicionary kind of why, for example: if ROOT node has the name 'A' and

Re: Syntax suggestion.

2006-09-03 Thread samir
Saluton! Simon Forman wrote: But think of all the curly braces around code blocks that you've never had to type! ;-) That's why I left java to jython! Eirikur Hallgrimsson wrote: This actually exists. The language which omits punctuation not actually required to resolve ambiguity is called

sqlite 'ownership' problems

2006-09-03 Thread rdrink
I will try to keep this as suscinct as possible as it might be an obvious Q. I am just getting into Py/sqlite (with a fair amount of PHP/MySQL background), and am posting this as much for the other noobs as myself I started learning sqlite by tinkered around at the command line: creating

Re: sqlite 'ownership' problems

2006-09-03 Thread Jean-Paul Calderone
On 3 Sep 2006 14:38:51 -0700, rdrink [EMAIL PROTECTED] wrote: I will try to keep this as suscinct as possible as it might be an obvious Q. I am just getting into Py/sqlite (with a fair amount of PHP/MySQL background), and am posting this as much for the other noobs as myself I started

Re: CONSTRUCT -

2006-09-03 Thread lazaridis_com
Simon Forman wrote: lazaridis_com wrote: I would like to fulfill the following task: The construct: if __name__ == '__main__': should be changed to something like: if identifier.name == '__main__': ... Context: http://case.lazaridis.com/wiki/Lang

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread John Machin
Sybren Stuvel wrote: Hi folks, Sometimes I have to feed data from an OpenOffice.org spreadsheet into some Python program. To make that really easy, I've written a small example program that connects to a running OpenOffice.org instance and reads the data from the currently opened

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread Sybren Stuvel
John Machin enlightened us with: Suppose one has over a hundred spreadsheets (real-life example: budgets from an organisation's reporting centres) ... manually opening each in OOo Calc is less than appealing, and not very robust. True. There are functions that can load files as well. Combined

Re: sqlite 'ownership' problems

2006-09-03 Thread Istvan Albert
rdrink wrote: created at the cmnd-line, e.g. 'test.db' with a table 'foo', I would get the error _sqlite.DatabaseError: no such table: foo. My suspition was that this is a feature of sqlite ('flat file' vs. a dynamic db in MySQL) where sqlite is 'sensetive' to who creates it... Most likely

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread John Machin
Sybren Stuvel wrote: John Machin enlightened us with: Suppose one has over a hundred spreadsheets (real-life example: budgets from an organisation's reporting centres) ... manually opening each in OOo Calc is less than appealing, and not very robust. True. There are functions that can

Re: FYI: getting data from an OpenOffice.org spreadsheet

2006-09-03 Thread Sybren Stuvel
John Machin enlightened us with: Firstly, let me say that you are highly commended for wading so far into the OOo docs and producing two pieces of code that actually do something. I've opened up the docs two or three times, said Waaahht the and closed them rapidly. Thanks. I had the same

Exception EOFError.

2006-09-03 Thread Dr. Pastor
Python 2.5b3 on Windows XP. (exception EOFError Raised when one of the built-in functions (input() or raw_input()) hits an end-of-file condition (EOF) without reading any data.) For me, raw_input (hit enter) returns an empty string! ( x=raw_input() x '' ) Any confirmation? Regards. ==

how to get a filename's extension

2006-09-03 Thread SuperGh0d
Hello all, I am new to python and I am having some difficulty obtaining the extension of a file. I was looking at the re.match module but I am completely overwhelmed by regular expressions. Is there an easier way to get the extension for a file name like: this.is.my.file.avi I would just like

Re: how to get a filename's extension

2006-09-03 Thread limodou
On 3 Sep 2006 17:46:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all, I am new to python and I am having some difficulty obtaining the extension of a file. I was looking at the re.match module but I am completely overwhelmed by regular expressions. Is there an easier way to get

Python newbie with a problem writing files

2006-09-03 Thread John Jones
Hi All, I have been driven insane by this error. I have this small program, shown below, which runs great until it gets to writing the data out to the file. I am running an install of Python 2.4. Yes, feedparser is functioning fine (I put in print feed_title statements as tests - but have

Re: Python newbie with a problem writing files

2006-09-03 Thread limodou
On 9/4/06, John Jones [EMAIL PROTECTED] wrote: Hi All, I have been driven insane by this error. I have this small program, shown below, which runs great until it gets to writing the data out to the file. I am running an install of Python 2.4. Yes, feedparser is functioning fine (I put

Re: Syntax suggestion.

2006-09-03 Thread Alex Martelli
samir [EMAIL PROTECTED] wrote: But how would you discern between a function reference and a function call? That would be a problem with two solutions: 1- If the function doesn't have any parameters, it will be called with the empty parentheses (just like usual!); 2- to indicate that

Python newbie with a problem writing files

2006-09-03 Thread John J. Jones
Doh!!! You are right. It was staring me in the face. I shouldnt have that = sign at all!! I removed it and it works!! Now I just have to put in a routine to remove non-ascii characters from the data before writing it and all will be golden. Thanks JJ --

Re: Timeline for Python?

2006-09-03 Thread Ray
Sebastian Bassi wrote: Hello all, I am working on a Python book, since it could be completed in about a year (writing time + edition + publishing) or more, I would like to know what version to target since I don't want to release a book that will be outdated just after is printed. I use 2.4

Re: Timeline for Python?

2006-09-03 Thread Ray
crystalattice wrote: I'd write for 2.4, even though 2.5 should be coming out shortly. There aren't many significant changes to the whole language between 2.4 and 2.5. Probably the best thing is write for 2.4 and have a sidenote stating where 2.5 operates differently. Python in a Nutshell

Re: newbe question about removing items from one file to another file

2006-09-03 Thread [EMAIL PROTECTED]
Simon Forman wrote: [EMAIL PROTECTED] wrote: Anthra Norell wrote: Dexter, I looked at the format specification. It contains an example: --- CsoundSynthesizer; ; test.csd - a Csound structured data file CsOptions

Re: newbe question about removing items from one file to another file

2006-09-03 Thread [EMAIL PROTECTED]
Anthra Norell wrote: Dexter, I looked at the format specification. It contains an example: --- CsoundSynthesizer; ; test.csd - a Csound structured data file CsOptions -W -d -o tone.wav /CsOptions CsVersion;optional section

Re: newbe question about removing items from one file to another file

2006-09-03 Thread [EMAIL PROTECTED]
Anthra Norell wrote: Dexter, Here's a function that screens out all instrument blocks and puts them into a dictionary keyed on the instrument number: def get_instruments (file_name): INSIDE = 1 OUTSIDE = 0 f = file (file_name,

Re: Python newbie with a problem writing files

2006-09-03 Thread Mike Kent
feed_list = open(feed_listing.conf,r) What could it be about the above line that means Open this file for READ ONLY? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python newbie with a problem writing files

2006-09-03 Thread Tim Chase
feed_list = open(feed_listing.conf,r) What could it be about the above line that means Open this file for READ ONLY? Oooh, oooh, I know! If you rot13 the file-name, it comes back as srrq_yvfgvat.pbas. The double rs in the file-name instruct python to open the file as really read-only.

Re: Exception EOFError.

2006-09-03 Thread Dr. Pastor
Thank you Sir. Dr. Pastor wrote: Python 2.5b3 on Windows XP. (exception EOFError Raised when one of the built-in functions (input() or raw_input()) hits an end-of-file condition (EOF) without reading any data.) For me, raw_input (hit enter) returns an empty string! ( x=raw_input()

Re: Python newbie with a problem writing files

2006-09-03 Thread John Machin
Mike Kent wrote: feed_list = open(feed_listing.conf,r) What could it be about the above line that means Open this file for READ ONLY? That's his *INPUT* file. The error referred to his *OUTPUT* file, and in any case the complain was that the write attribute was read-only, *NOT* the

What does mod_python.publisher handler do?

2006-09-03 Thread yaru22
I was reading Chapter 6.1 in mod_python manual at www.python.org. The manual simply says: The publisher handler is a good way to avoid writing your own handlers and focus on rapid application development. I still don't understand what this publisher handler is for. Can someone elaborate the

python-database

2006-09-03 Thread sridhar
is there any way to call stored procedures from python as in java? -- http://mail.python.org/mailman/listinfo/python-list

Re: python-database

2006-09-03 Thread Cliff Wells
On Sun, 2006-09-03 at 21:30 -0700, sridhar wrote: is there any way to call stored procedures from python as in java? I mostly use PostgreSQL, so perhaps it's different for some other databases, but calling stored procedures doesn't require any special support from the language or driver.

[ python-Bugs-1550938 ] from . import bug

2006-09-03 Thread SourceForge.net
Bugs item #1550938, was opened at 2006-09-02 09:05 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1550938group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1551427 ] tiny bug in win32_urandom

2006-09-03 Thread SourceForge.net
Bugs item #1551427, was opened at 2006-09-03 14:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1551427group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1551432 ] __unicode__ breaks for exception class objects

2006-09-03 Thread SourceForge.net
Bugs item #1551432, was opened at 2006-09-03 14:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1551432group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1548288 ] sgmllib.sgmlparser is not thread safe

2006-09-03 Thread SourceForge.net
Bugs item #1548288, was opened at 2006-08-28 19:32 Message generated for change (Comment added) made by josiahcarlson You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1548288group_id=5470 Please note that this message will contain a full copy of the comment

  1   2   >