Re: [ANN] XPN 0.6.5 released

2006-09-14 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Nemesis wrote: > Mentre io pensavo ad una intro simpatica "Franz Steinhaeusler" > scriveva: > >> There is no progress bar or other info, if I subscribe one list. >> There is a little in the lower left corner, but if a lot of headers >> and bodies are received, the program s

Re: Is there a way to find IP address?

2006-09-14 Thread Lad
Fredrik Lundh wrote: > Lad wrote: > > > Normaly I can log user's IP address using os.environ["REMOTE_ADDR"] . > > If a user is behind a proxy, I will log proxy's IP address only. > > Is there a way how to find a real IP user's address? > > os.environ["HTTP_X_FORWARDED_FOR"] > > (but that can eas

Re: Converting a varargs tuple to a list - a definite pitfall for new comers to Python

2006-09-14 Thread John Machin
[EMAIL PROTECTED] wrote: > The following program does not work if you uncomment #lis = > ["xmms2"] + list(args) > > Evidently Python is opting for the nullary constructor list() as > opposed to the other one which takes a sequence. But no newcomer would know > this. Are you using "the nullar

Re: matplotlib

2006-09-14 Thread Steve Lianoglou
> This site and webpage in particular doesn't open. I tried that too > before posting my question. The page (http://matplotlib.sourceforge.net/tutorial.html) may not be up now, but will most certainly be etched in Google's mind for some time to come, via Google Cache: http://64.233.161.104/searc

Re: Pre-defining an action to take when an expected error occurs

2006-09-14 Thread Steve Lianoglou
> if the Excel sheet has 10 rows with data in them, the > statement "range(sh.nrows)" should build the list of numbers [0, > 1,...9]. It should, but it doesn't do that. What it does is buld a list > from [0, 1...20] or more or a little less, but the point is that it > always grabs empy rows after t

Re: RELEASED Python 2.5 (release candidate 2)

2006-09-14 Thread Georg Brandl
Georg Brandl wrote: > Ant wrote: >> Anthony Baxter wrote: >> ... >>> code in 2.5 before the final release. *Please* try this >>> release out and let us know about any problems you find. >> >> Not a problem with the release, but with the docs. I've just ported a >> module using the ElementTree pack

Re: RELEASED Python 2.5 (release candidate 2)

2006-09-14 Thread Georg Brandl
Ant wrote: > Anthony Baxter wrote: > ... >> code in 2.5 before the final release. *Please* try this >> release out and let us know about any problems you find. > > Not a problem with the release, but with the docs. I've just ported a > module using the ElementTree package to 2.5, and the Module In

Re: Converting a varargs tuple to a list - a definite pitfall for new comers to Python

2006-09-14 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > The following program does not work if you uncomment #lis = > ["xmms2"] + list(args) > > Evidently Python is opting for the nullary constructor list() as > opposed to the other one which takes a sequence. But no newcomer would > know this. And the Python docs dont gi

Re: question about including something like sqlite in python

2006-09-14 Thread Aahz
In article <[EMAIL PROTECTED]>, John Salerno <[EMAIL PROTECTED]> wrote: > >I was just thinking, since Python 3.0 is supposed to clean up a lot of >the unnecessary or redundant features of Python and make other things >more streamlined, does it seem to anyone that including SQLite goes >against

Re: What's more pythonic?

2006-09-14 Thread Aahz
In article <[EMAIL PROTECTED]>, Dan Stromberg <[EMAIL PROTECTED]> wrote: > >Is sample1 or sample2 the more pythonic way of comparing? Depending on what versions of Python you're targetting, some people would argue neither (advocating the deprecation of __cmp__). I'm not sure what the current sta

Re: Converting a varargs tuple to a list - a definite pitfall for new comers to Python

2006-09-14 Thread Simon Forman
[EMAIL PROTECTED] wrote: > The following program does not work if you uncomment #lis = > ["xmms2"] + list(args) > > Evidently Python is opting for the nullary constructor list() as > opposed to the other one which takes a sequence. But no newcomer would > know this. And the Python docs dont gi

Re: Pre-defining an action to take when an expected error occurs

2006-09-14 Thread Tempo
Thanks for all of the help. It all has been very useful to an new python programmer. I agree that I should fix the error/bug instead of handeling it with a try/etc. However, I do not know why "range(sh.nrows)" never gets the right amount of rows right. For example, if the Excel sheet has 10 rows wi

Converting a varargs tuple to a list - a definite pitfall for new comers to Python

2006-09-14 Thread metaperl . etc
The following program does not work if you uncomment #lis = ["xmms2"] + list(args) Evidently Python is opting for the nullary constructor list() as opposed to the other one which takes a sequence. But no newcomer would know this. And the Python docs dont give a good example of dealing with tak

Re: Pre-defining an action to take when an expected error occurs

2006-09-14 Thread John Machin
Tempo wrote: > Hello. I am getting the error that is displayed below, and I know > exactly why it occurs. I posted some of my program's code below, and if > you look at it you will see that the error terminates the program > pre-maturely. Becasue of this pre-mature termination, the program is > not

Re: Algorithm Question

2006-09-14 Thread George Sakkis
Gabriel Genellina wrote: > This is known as a "set cover" algorithm. You have a set of subsets, > and want to determine the smallest set of those subsets, whose union > is the universal set - (uh, what a mess!) I thought of that too, but he seems to be adding a second desired property: the inters

Re: Looking for the Perfect Editor

2006-09-14 Thread David J. Braden
Wildemar Wildenburger wrote: >> Hi Stu und "Willie", >> <> > >> I don't yet know what jython is about, or for, but I'm up for trying > > jedit for python. > jython is an implementation of python in java (hence the name ;)). That > means it's a python interpreter inside a java virtual machine (gr

Re: matplotlib

2006-09-14 Thread Jakub Hegenbart
[EMAIL PROTECTED] wrote: > This site and webpage in particular doesn't open. I tried that too > before posting my question. > There seems to be a nice cookbook: http://www.scipy.org/Cookbook/Matplotlib Jakub -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the "longest possible" match with Python's RE module?

2006-09-14 Thread Licheng Fang
Thank you guys. I've written a CYK parser and realized this is the right direction. It gives every possible interpretation of the string and I can retrieve whatever I want. -- http://mail.python.org/mailman/listinfo/python-list

how to specify path to .py modules during install...

2006-09-14 Thread venkatbo
Hi folks, On i686 Linux, I would like to place my python modules as: /src/py-modules/*.py and use the cmd from : ...base_dir]$ python src/py-modules/setup.py install --prefix=/usr so the .py files and the corresponding compiled .pyc files are at: /usr/lib/python2.4/site-packacges/*.py[

Re: Pre-defining an action to take when an expected error occurs

2006-09-14 Thread Gabriel Genellina
At Thursday 14/9/2006 23:40, Tempo wrote: Hello. I am getting the error that is displayed below, and I know exactly why it occurs. I posted some of my program's code below, and if you look at it you will see that the error terminates the program pre-maturely. Becasue of this pre-mature terminati

Re: Pre-defining an action to take when an expected error occurs

2006-09-14 Thread Steven D'Aprano
On Thu, 14 Sep 2006 19:40:35 -0700, Tempo wrote: > Hello. I am getting the error that is displayed below, and I know > exactly why it occurs. I posted some of my program's code below, and if > you look at it you will see that the error terminates the program > pre-maturely. Becasue of this pre-mat

Weekly Python Patch/Bug Summary

2006-09-14 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 416 open ( +3) / 3408 closed ( +1) / 3824 total ( +4) Bugs: 898 open ( +1) / 6180 closed (+13) / 7078 total (+14) RFE : 234 open ( +0) / 238 closed ( +0) / 472 total ( +0) New / Reopened Patches __ email par

Re: Algorithm Question

2006-09-14 Thread Gabriel Genellina
At Thursday 14/9/2006 20:31, Andrew McLean wrote: Now I want to issue a series of queries, such that when I combine all the data returned I have accessed all the records in the database. However, I want to minimise the total number of queries and also want to keep the number of records returned

Pre-defining an action to take when an expected error occurs

2006-09-14 Thread Tempo
Hello. I am getting the error that is displayed below, and I know exactly why it occurs. I posted some of my program's code below, and if you look at it you will see that the error terminates the program pre-maturely. Becasue of this pre-mature termination, the program is not able to execute it's f

Re: Looking for the Perfect Editor

2006-09-14 Thread stu
OKB (not okblacke) wrote: > What I'm interested in knowing is whether anyone has found any > editor other than TextPad and UltraEdit which allows soft word-wrap (no > line breaks stored in the file) which do NOT wrap the text to the left > edge of the screen but instead wrap it back only as far as

Re: matplotlib

2006-09-14 Thread diffuser78
This site and webpage in particular doesn't open. I tried that too before posting my question. Maciej Dziardziel wrote: > [EMAIL PROTECTED] wrote: > > > Can somebody give some quick pointers to start off with matplotlib. > > > > Thanks > > http://matplotlib.sourceforge.net/tutorial.html > > -- > M

Re: Algorithm Question

2006-09-14 Thread George Sakkis
Andrew McLean wrote: > Now I want to issue a series of queries, such that when I combine all > the data returned I have accessed all the records in the database. > However, I want to minimise the total number of queries and also want to > keep the number of records returned by more than one query

Re: matplotlib

2006-09-14 Thread Maciej Dziardziel
[EMAIL PROTECTED] wrote: > Can somebody give some quick pointers to start off with matplotlib. > > Thanks http://matplotlib.sourceforge.net/tutorial.html -- Maciej "Fiedzia" Dziardziel ([EMAIL PROTECTED]) If you can read this, you are in phaser range. -- http://mail.python.org/mailman/listin

Re: Looking for the Perfect Editor

2006-09-14 Thread Jorge Godoy
"OKB (not okblacke)" <[EMAIL PROTECTED]> writes: > What I'm interested in knowing is whether anyone has found any > editor other than TextPad and UltraEdit which allows soft word-wrap (no > line breaks stored in the file) which do NOT wrap the text to the left > edge of the screen but ins

Re: Looking for the Perfect Editor

2006-09-14 Thread OKB (not okblacke)
What I'm interested in knowing is whether anyone has found any editor other than TextPad and UltraEdit which allows soft word-wrap (no line breaks stored in the file) which do NOT wrap the text to the left edge of the screen but instead wrap it back only as far as the indentation level

Re: Statistical distribution of object size

2006-09-14 Thread Steven D'Aprano
On Wed, 13 Sep 2006 16:03:12 -0700, [EMAIL PROTECTED] wrote: > Hi, > > In a typical heavy-use python application (say running Zope for > dukehealth.org) what is the (statistical) distribution of the the size > of objects? (i.e. start up server, stop time when it has been under > load for a few ho

Re: How to build extensions on Windows?

2006-09-14 Thread michael . hatmaker
Kevin D. Smith wrote: > I've written a simple Python extension for UNIX, but I need to get it > working on Windows now. I'm having some difficulties figuring out how > to do this. I've seen web pages that say that MS Visual Studio is > required, and other that say that's not true, that MinGW wil

matplotlib

2006-09-14 Thread diffuser78
Hi, I am a python newbie. I was looking for a plotting tool and somebody told me matplotlib. But I couldnt find on google some good starting tutorial on it. Can somebody give some quick pointers to start off with matplotlib. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: min() & max() vs sorted()

2006-09-14 Thread Tim Peters
[MRAB] > Some time after reading about Python 2.5 and how the built-in functions > 'min' and 'max' will be getting a new 'key' argument, I wondered how > they would treat those cases where the keys were the same, for example: > > L = ["four", "five"] > print min(L, key = len), max(L, key = len) > >

Re: Looking for the Perfect Editor

2006-09-14 Thread limodou
On 9/15/06, Roger <[EMAIL PROTECTED]> wrote: > Jay wrote: > > I, too, am a hardcore fan of jEdit. It's nice to finally see some user > > support on this forum. :-) > > > The biggest problem I have with anything written in Java is the long > startup time. The editor may be great but the platform

min() & max() vs sorted()

2006-09-14 Thread MRAB
Hi, Some time after reading about Python 2.5 and how the built-in functions 'min' and 'max' will be getting a new 'key' argument, I wondered how they would treat those cases where the keys were the same, for example: L = ["four", "five"] print min(L, key = len), max(L, key = len) The result is:

Re: page contents are not refreshed

2006-09-14 Thread Bruno Desthuilliers
waylan a écrit : (snip) > > While Steve's examples certainly do the trick in this limited case, I > assumed that the original poster was just starting with mod_python and > I was simply trying to explain the bigger picture for future reference. > As one develops more sophisticated code, simply add

Re: best small database?

2006-09-14 Thread Blair P. Houghton
Fredrik Lundh wrote: > Blair P. Houghton wrote: > > I'm saying that the change from Oracle 9 to Oracle 10 is like changing > > from ffs to fat32. > > well, I'm quite sure that the people I know who's spending a lot of > their time moving stuff from Oracle N to Oracle N+1 (and sometimes > getting s

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Andrew McLean
Roy Smith wrote: > > As I remember, you didn't need the whitespace either. IIRC, your example > above could have been written as: > > PROGRAMKWDS > REALREAL,WRITE > WRITE=1.0 > REAL=2.0 > WRITE(*,*)WRITE,REAL > END > It's stranger than that. FORTRAN 77 is in

Re: Algorithm Question

2006-09-14 Thread Andrew McLean
John Machin wrote: > A quick silly question: what is the problem that you are trying to > solve? A fair question :-) The problem may seem a bit strange, but here it is: I have the ability to query a database in a legacy system and extract records which match a particular pattern. Specifically,

Re: descriptor problems

2006-09-14 Thread Gary Stephenson
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gary Stephenson wrote: > >> I want to define a class-level attribute that will be shared by all >> subclasses. That is, I want this class, every subclass of this class, >> every instance of this class and every instance

Re: Linear regression in 3 dimensions

2006-09-14 Thread David J. Braden
[EMAIL PROTECTED] wrote: > Hi Dave! > >> <> >> >> Hi Bernhard, >> I am just starting to learn Python; could you plz tell me specifically >> the introduction(s) you have in mind? >> >> TIA, >> DaveB > > Take a look at the documenation section on www.scipy.org. > > Especially the old NumPy documen

Dr. Dobb's Python-URL! - weekly Python news and links (Sep 14)

2006-09-14 Thread Jack Diederich
QOTW: "Regexps are a brittle tool, best tolerated in small doses." - Tim Peters "Simplicity is prerequisite for reliability" - Edsger W. Dijkstra eval(repr(var)) sometimes works for serialization but don't count on it. http://groups.google.com/group/comp.lang.python/browse_thread/t

Way off Question - VATSIM - query

2006-09-14 Thread Willie Whelan
Hi, I know this is a way off question, but does anyone have any info on querying a vatsim server. www.vatsim.net. I would just like to query a server to see what clients are connected. Thanks Willie -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - ? get IDLE going on cygwin

2006-09-14 Thread David J. Braden
Fredrik Lundh wrote: <> .. > > or get a more convenient distribution. > > > Suggestion(s) for Windows os and cygwin? TIA DaveB -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - ? get IDLE going on cygwin

2006-09-14 Thread David J. Braden
Thorsten Kampe wrote: > * David J. Braden (2006-09-14 04:58 +0100) >> Jason Tishler wrote: >>> Dave, >>> >>> On Wed, Sep 13, 2006 at 03:33:01PM +, David J. Braden wrote: I can now confirm that, yes, IDLE pops up w/o menus under cygwin. >>> You should be able to workaround this problem by e

Re: How to convert a timedelta object to a string?

2006-09-14 Thread Bryan Olson
Paul McGuire wrote: > "Carl J. Van Arsdall" wrote: >> Basically I used the datetime module and timedelta objects to calculate a >> difference between two times. Now I'm trying to figure out how I make >> that time delta a string HH:MM:SS to show elapsed time. [...] > From the Python console: >

Re: How to build extensions on Windows?

2006-09-14 Thread Lawrence Oluyede
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > That, of course, assumes that there is a VS 2007 release > sufficiently before Python 2.6. I just spoke with an MVP for .NET (so nothing official obviously) and he told me the next VS version will ship after Windows Vista for sure and that (he mention

Re: Looking for the Perfect Editor

2006-09-14 Thread Ant
Roger wrote: ... > The biggest problem I have with anything written in Java is the long > startup time. The editor may be great but the platform is mediocre. The startup time is one of the main reasons I have started to use vim more than jEdit. That and the fact that I currently have to work on

Re: Specify string with uniform indentation ignored

2006-09-14 Thread tobiah
That would be it. Thanks. >> Is there a built in way to do this? I don't much >> care for: >> >> string = "function otherlang(){" >> string += " doit()" >> string += "}" > > textwrap.dedent ought to do exactly what you want. > > --Sam > -- Posted via a free Usenet account

Re: How to convert a timedelta object to a string?

2006-09-14 Thread skip
>>> startTime = datetime.timedelta(seconds=45,minutes=22,hours=10) >>> stopTime = datetime.timedelta(seconds=25,minutes=2,hours=4) >>> delta = startTime-stopTime >>> time.strftime("%H:%M:%S",time.gmtime(delta.seconds)) '06:20:20' Which, alas, will lose any subsecond resolution

Re: Specify string with uniform indentation ignored

2006-09-14 Thread Sam Pointon
tobiah wrote: > Like a docstring, I would like to specify a string such as: > > def thing: > > string = """ > function otherlang(){ > doit() > } > """ > > And have the string end up actually being defined as: > > """ > function otherlang

Re: Looking for the Perfect Editor

2006-09-14 Thread Wildemar Wildenburger
Ramon Diaz-Uriarte wrote: >> c) can run programs right from within > > But of course. And, contrary to some others (e.g., JEdit, which I > think forces you to use Jython, so you are stuck with Python 2.1 for > now) you use the current python interpreter you have installed. Wrong. But so terribly

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread John Machin
Michael wrote: > I guess, I still don't see how this will work. I'm receiving a C > zero-terminated string in my Python program as a 1K byte block (UDP > datagram). If the string sent was "abc", then what I receive in Python > is <0> How is Python > going to know where in this 1K byte block the

Re: How to convert a timedelta object to a string?

2006-09-14 Thread tobiah
> Well, kinda, although I can work with this, str(tdobject) returns a > string that looks like: > > -1 day, 7:34:32 Oh yeah. I had tried it on a positive timedelta, which does give HH:MM:SS -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/l

Re: stock quotes

2006-09-14 Thread Darren Kirby
On 9/13/06, Donlingerfelt <[EMAIL PROTECTED]> wrote: > I would like to download stock quotes from the web, store them, do > calculations and sort the results. However I am fairly new and don't have a > clue how to parse the results of a web page download. I can get to the > site, but do not know

Re: How to build extensions on Windows?

2006-09-14 Thread Martin v. Löwis
Fuzzyman schrieb: >> You may or may not know that it is futile arguing about compiler >> switching for released versions of Python, i.e. 2.3, 2.4, and 2.5. >> Whether or not it might be a good idea: it can't be done, for >> compatibility with prior releases. > > Of course, but Python development c

Re: Outbound port on sockets

2006-09-14 Thread Bryan Olson
Diez B. Roggisch wrote: > bmearns schrieb: >> Is it possible to specify which port to use as the outbound port on a >> connection? [...] >> Specifically, I'm trying to write an FTP host, and I'm trying to >> implement the PORT command. > > AFAIK you neither can't do that nor need it. It's not t

Re: Colorado Python seminar in November

2006-09-14 Thread wesley chun
in parallel to Mark's week-long Python seminar (Nov 6-10), we are offering an alternative session focusing only on advanced topics. it is 3-days long (Nov 8-10) and will be held in San Francisco. course description: http://roadkill.com/~wesc/cyberweb/pp2dsc.html general information: http://cyberw

Re: How to convert a timedelta object to a string?

2006-09-14 Thread Paul McGuire
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Basically I used the datetime module and timedelta objects to calculate a > difference between two times. Now I'm trying to figure out how I make > that time delta a string HH:MM:SS to show elapsed time. I've s

Re: Specify string with uniform indentation ignored

2006-09-14 Thread [EMAIL PROTECTED]
tobiah wrote: > Is there a built in way to do this? I don't much > care for: > > string = "function otherlang(){" > string += " doit()" > string += "}" That can be somewhat simplified to: string = "function otherlang(){"\ "doit()"\ "}" It's not exactly

Exposing Excel as a Webservice

2006-09-14 Thread Brandon
Hi all, I'm currently working on a project where we have a need to expose an Excel spreadsheet on the web as a webservice that needs to be reliable and available 24x7x365. I've implemented a prototype of this in python using the win32com library to interface with the Excel Automation API via COM.

Re: How to convert a timedelta object to a string?

2006-09-14 Thread Carl J. Van Arsdall
tobiah wrote: > Carl J. Van Arsdall wrote: > >> Basically I used the datetime module and timedelta objects to calculate >> a difference between two times. Now I'm trying to figure out how I make >> that time delta a string HH:MM:SS >> >> >> > > Oddly enough, str(tdobject) does what you

Re: Looking for the Perfect Editor

2006-09-14 Thread Ramon Diaz-Uriarte
Sorry, I could not resist, since almost every editor under the sun has been suggested as the solution, but (X)Emacs only got a minor mention. On 7 Sep 2006 13:18:22 -0700, Omar <[EMAIL PROTECTED]> wrote: > I'd love the perfect editor that would be: > > a) free Emacs does of course qualify here.

Re: best small database?

2006-09-14 Thread metaperl
David Isaac wrote: > Thanks to all for the suggestions and much else > to think about. > > Summarizing: > > Those who were willing to consider a database suggested: > anydbm > Gadfly > SQLite (included with Python 2.5) > Schevo You missed buzhug: http://buzhug.sourceforge.net/ A very thorough pu

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-14 Thread Bryan Olson
Ben Sizer wrote: > Bryan Olson wrote: >> Ben Sizer wrote: >>> It's not a crackpot theory. It's a completely reasonable theory. SQL is >>> based on relational algebra, which provides a mathematical set of >>> operators for grouping data that is stored in separate sets. That data >>> is selected and

Re: How to convert a timedelta object to a string?

2006-09-14 Thread tobiah
Carl J. Van Arsdall wrote: > Basically I used the datetime module and timedelta objects to calculate > a difference between two times. Now I'm trying to figure out how I make > that time delta a string HH:MM:SS > > Oddly enough, str(tdobject) does what you want. -- Posted via a free Usenet

Re: lxml Windows binaries

2006-09-14 Thread Jan Dries
Stefan Behnel wrote: > Jan Dries wrote: >> I'm trying to find Windows binaries for lxml. The cheeseshop is supposed >> to have such binaries, but I can't find them. >> Does anyone know where I might find such binaries? > > http://cheeseshop.python.org/pypi/lxml > > Sometimes takes a day longer, b

Specify string with uniform indentation ignored

2006-09-14 Thread tobiah
Like a docstring, I would like to specify a string such as: def thing: string = """ function otherlang(){ doit() } """ And have the string end up actually being defined as: """ function otherlang(){ doit() }

Re: xinclude and pathnames

2006-09-14 Thread Tim Arnold
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Rob Williscroft wrote: > >> The default handler just sees the href value as a filename, so you >> should be able to use a relative path if you os.chdir() to the working >> directory before processing you xml file. > > an

Re: latex openoffice converter

2006-09-14 Thread Tim Arnold
"Fabian Braennstroem" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I would like to use python to convert 'simple' latex > documents into openoffice format. Maybe, anybody has done > something similar before and can give me a starting point!? > Would be nice to hear some hi

How to convert a timedelta object to a string?

2006-09-14 Thread Carl J. Van Arsdall
Basically I used the datetime module and timedelta objects to calculate a difference between two times. Now I'm trying to figure out how I make that time delta a string HH:MM:SS to show elapsed time. I've spent tons of time looking at the module's documentation but I'm not seeing how those me

Re: Looking for the Perfect Editor

2006-09-14 Thread Roger
Jay wrote: > I, too, am a hardcore fan of jEdit. It's nice to finally see some user > support on this forum. :-) The biggest problem I have with anything written in Java is the long startup time. The editor may be great but the platform is mediocre. I am a SciTE bigot. I have recently tried

Re: lxml Windows binaries

2006-09-14 Thread Stefan Behnel
Jan Dries wrote: > I'm trying to find Windows binaries for lxml. The cheeseshop is supposed > to have such binaries, but I can't find them. > Does anyone know where I might find such binaries? http://cheeseshop.python.org/pypi/lxml Sometimes takes a day longer, but our helpful egg contributors ar

Re: how are dictionary literals handled by the interpreter?

2006-09-14 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: > Bruno Desthuilliers wrote: >> [EMAIL PROTECTED] wrote: (snip) >>> class caseFunction(object): >>> def __init__(self): >>> self.caseDict = {'a':"retval = 'a'", >>> 'b':"retval='b'","c":"retval='c'","d":"retval='d'", >>> >>> "e":"retval='e'","f":"retval='f'","g"

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Lawrence Oluyede
Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > What's not real about Tkinter's? It's not a custom reactor as GTK's AFAIK -- Lawrence - http://www.oluyede.org/blog "Nothing is more dangerous than an idea if it's the only one you have" - E. A. Chartier -- http://mail.python.org/mailman/listinfo

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Gabriel Genellina
At Thursday 14/9/2006 11:45, Michael wrote: Since I'm new to Python, I'm having trouble understanding what this means (see below). Would appreciate any help. if strg[-1] == "\0": strg = strg[:-1] The Python Tutorial will answer your questions, it is enlightning and easy to follow. Ga

Re: [ANN] XPN 0.6.5 released

2006-09-14 Thread Nemesis
Mentre io pensavo ad una intro simpatica "Franz Steinhaeusler" scriveva: >>XPN (X Python Newsreader) is a multi-platform newsreader with Unicode [...] > Hello Nemesis, > that is a great program, thank you. Thanks. > I will try to use it and also attempt to > customize it, so that it works like

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Bjoern Schliessmann
Lawrence Oluyede wrote: > It's better to use GUI with a real reactor available like GTK2 > anyway... What's not real about Tkinter's? Regards, Björn -- BOFH excuse #371: Incorrectly configured static routes on the corerouters. -- http://mail.python.org/mailman/listinfo/python-list

Re: latex openoffice converter

2006-09-14 Thread Chris Lambacher
http://latex2rtf.sourceforge.net/ -Chris On Thu, Sep 14, 2006 at 08:29:19PM +0200, Fabian Braennstroem wrote: > Hi, > > I would like to use python to convert 'simple' latex > documents into openoffice format. Maybe, anybody has done > something similar before and can give me a starting point!? >

Re: parameter files

2006-09-14 Thread Russ
Thanks for the examples. I don't think you understood what I meant by a "run." All I meant is that I want to save the configuration, for reference purposes, that was used for a particular run. That way I can reproduce the results if necessary, and I can avoid confusion about which parameters were

latex openoffice converter

2006-09-14 Thread Fabian Braennstroem
Hi, I would like to use python to convert 'simple' latex documents into openoffice format. Maybe, anybody has done something similar before and can give me a starting point!? Would be nice to hear some hints! Greetings! Fabian -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete items in nested dictionary based on value.

2006-09-14 Thread Brian L. Troutwine
This is a general reply to all. Thanks for all the suggestions. I hadn't really thought about filtering empty dictionaries because the data I'm processing won't have them, but it does make for a much nicer, more general filter. I did end up using bearophileH's code, but that's mostly because he go

Re: Looking for the Perfect Editor

2006-09-14 Thread Wildemar Wildenburger
Dick Moores wrote: >> to run a script.. you can 'dock' jython in the sides of the editor or >> bottom, and import from the buffer or load it.. or fire jython up from >> the plugin menu > > Doesn't sound easy. With UliPad (or IDLE, for that matter) just hit F5. Which you can do with jEdit just as

Re: xinclude and pathnames

2006-09-14 Thread Fredrik Lundh
Rob Williscroft wrote: > The default handler just sees the href value as a filename, so you > should be able to use a relative path if you os.chdir() to the working > directory before processing you xml file. and if that's not good enough, writing a custom loader is trivial (see the default_load

Re: Delete items in nested dictionary based on value.

2006-09-14 Thread Brian L. Troutwine
> Would it not be easier to modify the pretty-printer to ignore such > entries rather than have to make a duplicate (I presume you have reason > to need the original dictionary unchanged) dictionary and then delete > entries that match your "ignore" criteria? Good question. The data I'm hand

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Fredrik Lundh
Marc 'BlackJack' Rintsch wrote: > I would spell it: > > if strg.endswith('\0'): > strg = strg[:-1] unless you're in a hurry; startswith and endswith are horribly inefficient compared to ordinary indexing/slicing. (as I've pointed out elsewhere, even "s[:len(t)] == t" is usually faster tha

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread projecktzero
Paul Rubin wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: > > This is just an idea of mine, nothing I expect python to adapt. > > But just suppose the language allowed for words in bold. A word > > in bold would be considered a reserved word, a word in non bold > > would be an identifier. > > H

Re: Looking for the Perfect Editor

2006-09-14 Thread Dick Moores
At 08:51 AM 9/14/2006, stu wrote: >Dick Moores wrote: > > I'm trying out jEdit and UliPad. I got UliPad going right away and > > I'm very pleased with it, but could I jump in here with a basic jEdit > > question? How do you run a script? > > > > And one more. On the menus, the font is clear and la

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-14 Thread Ben Sizer
Bryan Olson wrote: > Ben Sizer wrote: > > It's not a crackpot theory. It's a completely reasonable theory. SQL is > > based on relational algebra, which provides a mathematical set of > > operators for grouping data that is stored in separate sets. That data > > is selected and projected according

Re: Newbie - ? get IDLE going on cygwin

2006-09-14 Thread Thorsten Kampe
* David J. Braden (2006-09-14 04:58 +0100) > Jason Tishler wrote: >> Dave, >> >> On Wed, Sep 13, 2006 at 03:33:01PM +, David J. Braden wrote: >>> I can now confirm that, yes, IDLE pops up w/o menus under cygwin. >> >> You should be able to workaround this problem by executing idle with the >>

Re: Outbound port on sockets

2006-09-14 Thread Fredrik Lundh
bmearns wrote: > All the same, it's a good suggestion. Thank you. Now do you know how I > (as the server) can force clients to use PASV, instead of PORT? have you tried returning a suitable error code ? (502 should be a good choice). (and before you proceed, reading http://cr.yp.to/ftp/s

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Robert Kern
Robert Kern wrote: > Michael wrote: >> I guess, I still don't see how this will work. I'm receiving a C >> zero-terminated string in my Python program as a 1K byte block (UDP >> datagram). If the string sent was "abc", then what I receive in Python >> is <0> How is Python >> going to know where

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-14 Thread Jason
Antoon Pardon wrote: > On 2006-09-14, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > On Wed, 13 Sep 2006 07:45:02 +, Antoon Pardon wrote: > > > This is just an idea of mine, nothing I expect python to adapt. > But just suppose the language allowed for words in bold. A word > in b

Re: Outbound port on sockets

2006-09-14 Thread bmearns
> But you can restrict the numbers of ports the server will use to a > certain range! It's common for ftp to allow only for so many connections > at the same time, so reserve a port-range of 20 or so for your server > and configure the router to forward them. Thanks, I think that'll have to be my

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Robert Kern
Michael wrote: > I guess, I still don't see how this will work. I'm receiving a C > zero-terminated string in my Python program as a 1K byte block (UDP > datagram). If the string sent was "abc", then what I receive in Python > is <0> How is Python > going to know where in this 1K byte block the

Re: Looking for the Perfect Editor

2006-09-14 Thread stu
Dick Moores wrote: > I'm trying out jEdit and UliPad. I got UliPad going right away and > I'm very pleased with it, but could I jump in here with a basic jEdit > question? How do you run a script? > > And one more. On the menus, the font is clear and large, but the > equivalent key combinations ar

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Michael
I guess, I still don't see how this will work. I'm receiving a C zero-terminated string in my Python program as a 1K byte block (UDP datagram). If the string sent was "abc", then what I receive in Python is <0> How is Python going to know where in this 1K byte block the end of the string is? It

Re: Outbound port on sockets

2006-09-14 Thread Diez B. Roggisch
bmearns schrieb: > Passive mode is implemented, the client isn't trying to use it. > Besides, that doesn't really help me anyway, all it means is that I > have to resolve port forwarding for the server, instead of for the > client. > > I think what this basically comes down to is that either with

Re: How do I converted a null (0) terminated string to a Python string?

2006-09-14 Thread Richard Brodie
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I would spell it: > > if strg.endswith('\0'): >strg = strg[:-1] I would just go with: strg = strg.rstrip('\0') -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >