Re: What does mod_python.publisher handler do?

2006-09-03 Thread Steve Holden
yaru22 wrote: > 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.

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. Usuall

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

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 abo

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* t

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_inp

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 "r"s in the file-name instruct python to open the file as "reall

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: 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 (

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: > > --- > > ; > ; test.csd - a Csound structured data file > > > -W -d -o tone.wav > > > ;optional section > Before 4.10 ;these two statements c

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: > > > > > > --- > > > > > > ; > > > ; test.csd - a Csound structured data file > > > > > >

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 Nutshe

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 u

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 shouldn’t 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 -- http://mail.pyth

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 indicat

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

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 s

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 >

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 to

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.

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

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

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 l

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. Combi

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 spread

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: 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 start

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 db

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 R

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 '

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 t

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 wh

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 connectio

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 s

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, usi

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

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

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 fold

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 > >cl

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" in

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: 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: 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 lik

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 Kamael

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 type

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: 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: http:/

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 installe

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()

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

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: http://groups.google.com/group

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 anyo

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 m

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 bee

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 (perform

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 sprea

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: 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 > > h

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 :-) Edw

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

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. Usua

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 somethi

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

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 "", line 1, in -toplevel- import Pmw ImportError: No module named Pmw Regards, Vedran,Croatia -- http://mail.python.org/ma

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.h

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 b

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 "ne

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 class

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: 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: 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 tru

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

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

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 buil

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 the

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 mig

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 kn

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

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 ? -- http://mail.pyt

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 t

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 ? ;-) -- http://mail.python.org/mailman/listinfo/python-list

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: 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 cons

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 yo

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 an

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! http://www.python.org/doc/faq/win

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 inst

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 > struc

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 lin

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

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). f

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-enc

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 scri

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. Howe