Re: How to find C source

2007-05-10 Thread castironpi
On May 10, 8:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 21:47:39 -0300, <[EMAIL PROTECTED]> escribió: > > > How do I get to the source for parser.suite()? > > Are you looking for function parser_suite in parsermodule.c? > > -- > Gabriel Genellina Looks like -it-.

Simple Tkinter Progress Bar

2007-05-10 Thread Gurpreet Singh
Hi I am a newbie in Python I am creating a simple Tkinter based application. I have written Tkinter GUI source code and the programme logic in the same .py file. I am searching for a way to implement a simple Progress bar for my application. Are there any simple ways of doin it.

Re: how to refer to partial list, slice is too slow?

2007-05-10 Thread Martin v. Lo
人言落日是天涯,望极天涯不见家 schrieb: > I'm a python newbie. It seems the slice operation will do copy. > for example: a = [1,2,3,4,5,6,7,8,9,0] b = a[7:] b > [8, 9, 0] a.remove(9) a > [1, 2, 3, 4, 5, 6, 7, 8, 0] b > [8, 9, 0] > > if the list have large members, the slice operatio

Re: How to find C source

2007-05-10 Thread Martin v. Löwis
Gabriel Genellina schrieb: > En Thu, 10 May 2007 21:47:39 -0300, <[EMAIL PROTECTED]> escribió: > >> How do I get to the source for parser.suite()? > > Are you looking for function parser_suite in parsermodule.c? To give some URL for convenience: http://svn.python.org/projects/python/trunk/Modul

Re: which is more pythonic/faster append or +=[]

2007-05-10 Thread Alex Martelli
Peter Otten <[EMAIL PROTECTED]> wrote: > Note the -s before the initialization statement that Alex meant to add but > didn't. If that is missing Yep, sorry for erroneously skipping the -s! Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLObject 0.9.0

2007-05-10 Thread Martin v. Löwis
> For reasons others will know, there are different branches to the > SQLObject project. I think, analogously, python still has an active 2.4 > branch, if that helps make sense of maintaining branches based on > versions. I'm not sure why the announcements aren't bundled into one > because just abo

Re: how to refer to partial list, slice is too slow?

2007-05-10 Thread 人言落日是天涯,望极天涯不见家
I make a sample here for the more clearly explanation s = " . - this is a large string data - ..." def parser1(data) # do some parser ... # pass the remainder to next parser parser2(data[100:]) def parser2(data) # do some parser ... # pass the remainder

how to refer to partial list, slice is too slow?

2007-05-10 Thread 人言落日是天涯,望极天涯不见家
I'm a python newbie. It seems the slice operation will do copy. for example: >>> a = [1,2,3,4,5,6,7,8,9,0] >>> b = a[7:] >>> b [8, 9, 0] >>> a.remove(9) >>> a [1, 2, 3, 4, 5, 6, 7, 8, 0] >>> b [8, 9, 0] if the list have large members, the slice operations will consume many times. for instance, I h

Re: searching algorithm

2007-05-10 Thread ciju
On May 11, 3:12 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-05-10, Gordon Airporte <[EMAIL PROTECTED]> wrote: > > > > > > >> For the above (abrideged) dictionary, you would generate (use a > >> fixed-width "programmers" font so the tree looks good): > > >> a > >>

Re: The odius and RACISTS WASPS of FBI can ONLY STING FOOLISH PATSIES, When will these INCOMPETENTOS catch the YANK ANTHRAX MAILER ? Re: *** Secret Technical Papers, dont tell the FBI ***

2007-05-10 Thread War Office
Interesting. You forgot to mention the Zionists. And therefore your post has been discounted as Zionist disinformation. On 9 maio, 21:14, [EMAIL PROTECTED] wrote: > The ODIOUS WASPs of FBI (FEDERAL BUREAU OF INCOMPETENCE) can ONLY S-T- > I-N-G. > > WASPS ONLY STING > WASPS ONLY STING > > The fact

Re: how to use cx_Oracle callfunc

2007-05-10 Thread Mariano Mara
Godzilla escribió: On May 11, 11:51 am, Godzilla <[EMAIL PROTECTED]> wrote: Hi all, I need to know how to use the method callfunc in cx_Oracle. I am trying to get a primary key after an insert via a function call, but I do not know how to pass the return value from the function via the callf

Re: how to use cx_Oracle callfunc

2007-05-10 Thread Godzilla
On May 11, 11:51 am, Godzilla <[EMAIL PROTECTED]> wrote: > Hi all, > > I need to know how to use the method callfunc in cx_Oracle. I am > trying to get a primary key after an insert via a function call, but I > do not know how to pass the return value from the function via the > callfunc method. Ca

setting extra data to a wx.textctrl

2007-05-10 Thread Pom
Hello group! I have an application which uses a lot of mysql data fields, all the same data type (floats). I created a panel which executes a "SELECT * FROM tablename" and makes as much fields as needed, using de cursor.description as wx.statictext and the cursors field contents copied into w

Re: searching algorithm

2007-05-10 Thread Terry Reedy
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Every node is a tuple of its letter, a list of its children, and | a list of its words. So the two 'pelin' nodes would be (with 'e' | referenced in the 'h' node): | | ('h', [('e', [], ['pelin'])], ['pelin']) | | That wou

Re: ANN: eGenix mxODBC Distribution 3.0.0 (mxODBC Database Interface)

2007-05-10 Thread rurpy
On May 10, 9:34 am, "eGenix Team: M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > ANNOUNCING >eGenix.com mxODBC Database Interface I gather this is no longer free for non-commercial use (as the previous version was) and is now a totally for-pay product? -- http://mail.python.org/mail

how to use cx_Oracle callfunc

2007-05-10 Thread Godzilla
Hi all, I need to know how to use the method callfunc in cx_Oracle. I am trying to get a primary key after an insert via a function call, but I do not know how to pass the return value from the function via the callfunc method. Can anyone help? I also tried the execute(), and callproc(), but to n

Re: How to find C source

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 21:47:39 -0300, <[EMAIL PROTECTED]> escribió: > How do I get to the source for parser.suite()? Are you looking for function parser_suite in parsermodule.c? -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: File modes

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 21:11:16 -0300, Jon Pentland <[EMAIL PROTECTED]> escribió: > I don't really see the use for being able to do that. Have you tried > doing it with the 'app' mode?, But I am guessing that it is just an > advanced mode spawned from 'w'. So, no, I don't think you can do this. In

Re: path stuff

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> escribió: > ok, I lied, it is still doing the archived folders. Here is the code: > > import os, sys > from path import path > > myfile = open("boxids.txt", "r", 0) > for line in myfile: > d = 'D:\\Dir\\' + path(line.strip()) >

How to find C source

2007-05-10 Thread castironpi
How do I get to the source for parser.suite()? -- http://mail.python.org/mailman/listinfo/python-list

Re: File modes

2007-05-10 Thread Jon Pentland
I don't really see the use for being able to do that. Have you tried doing it with the 'app' mode?, But I am guessing that it is just an advanced mode spawned from 'w'. So, no, I don't think you can do this. -- http://mail.python.org/mailman/listinfo/python-list

Re: reading argv argument of unittest.main()

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 14:42:56 -0300, <[EMAIL PROTECTED]> escribió: > I've read that unittest.main() can take an optional argv argument, and > that if it is None, it will be assigned sys.argv. > > Is there a way to pass command line arguments through unittest.main() > to the setUp method of a class

Re: Newbie look at Python and OO

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 18:21:42 -0300, <[EMAIL PROTECTED]> escribió: > These conversations are funny to me. I use Python every day and I > have never actually thought about the implications of binding objects > to names, or two names pointing to the same object. Problems of this > sort just never c

Avenue Language to Python Conversion

2007-05-10 Thread rover
Does anyone know of a bridge or wrapper I can use to convert old avenue GIS scripts into Python Scripts? -- http://mail.python.org/mailman/listinfo/python-list

Re: keyword checker - keyword.kwlist

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 17:03:13 -0300, <[EMAIL PROTECTED]> escribió: > I tried the trick but the error stays. I really don't know what to do > anymore. > > And what about the print function. Why does it print newline even if > there is colon after variable? I'm lost. > > I'm using Eclipe enviroment a

Re: Erlang style processes for Python

2007-05-10 Thread Jacob Lee
On Thu, 10 May 2007 00:19:11 -0700, Kay Schluehr wrote: > [snip] >> I do admit that Erlang's pattern >> matching would be nice, although you can get pretty far by using uniform >> message formats that can easily be dispatched on -- the tuple >> (tag, sender, args, kwargs) >> in the case of PARLEY

Re: Newbie question about string(passing by ref)

2007-05-10 Thread Adam Atlas
On May 10, 6:19 pm, lazy <[EMAIL PROTECTED]> wrote: > So, just to make sure even if I return a value, there is no copy done. > Is it correct? > For eg: > > def blah: >long_str="" >return long_str > > my_str=blah() <=== So here there is no copy done but, my_str points to > the same memor

Re: Newbie question about string(passing by ref)

2007-05-10 Thread lazy
Thanks all. > the function you pass it to assigns some other value to the variable, > that's all it's doing: reassigning a local name to point to somewhere > else in memory. So, just to make sure even if I return a value, there is no copy done. Is it correct? For eg: def blah: long_str=""

Re: searching algorithm

2007-05-10 Thread Neil Cerutti
On 2007-05-10, Gordon Airporte <[EMAIL PROTECTED]> wrote: > >> For the above (abrideged) dictionary, you would generate (use a >> fixed-width "programmers" font so the tree looks good): >> >> a >> | >> b >> | >> s

Re: Erlang style processes for Python

2007-05-10 Thread Jacob Lee
On Thu, 10 May 2007 01:03:39 -0700, jkn wrote: > Have you seen Candygram? > > http://candygram.sourceforge.net/ > > > jon N I did look at Candygram. I wasn't so keen on the method of dispatch (a dictionary of lambdas that is passed to the receive function). It also only works with threads

Re: path stuff

2007-05-10 Thread fscked
On May 10, 1:43 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 09 May 2007 15:11:06 -0300,

Re: searching algorithm

2007-05-10 Thread James Stroud
Gordon Airporte wrote: > >> For the above (abrideged) dictionary, you would generate (use a >> fixed-width "programmers" font so the tree looks good): >> >> a >> | >> b >> | >> s >> / \ >>

Re: Newbie question about string(passing by ref)

2007-05-10 Thread Adam Atlas
On May 10, 5:47 pm, Adam Atlas <[EMAIL PROTECTED]> wrote: > On May 10, 5:43 pm, lazy <[EMAIL PROTECTED]> wrote: > > > I want to pass a string by reference. > > Don't worry, all function parameters in Python are passed by reference. Actually, just to clarify a little bit if you're understanding "pa

Re: Newbie question about string(passing by ref)

2007-05-10 Thread Bruno Desthuilliers
lazy a écrit : > Hi, > > I want to pass a string by reference. I understand that strings are > immutable, but Im not > going to change the string in the function, just to aviod the overhead > of copying(when pass-by-value) because the > strings are long and this function will be called over and ov

Re: Newbie question about string(passing by ref)

2007-05-10 Thread Gary Herron
lazy wrote: > Hi, > > I want to pass a string by reference. I understand that strings are > immutable, but Im not > going to change the string in the function, You're confused here. "Immutable" means it *cannot* be changed, so your decision to not change the string is not really your decision at

Re: SQLObject 0.9.0

2007-05-10 Thread James Stroud
[EMAIL PROTECTED] wrote: > Why was this released 3 times with different version numbers in less > than an hour? > > Mike > For reasons others will know, there are different branches to the SQLObject project. I think, analogously, python still has an active 2.4 branch, if that helps make sense

Re: Newbie question about string(passing by ref)

2007-05-10 Thread Adam Atlas
On May 10, 5:43 pm, lazy <[EMAIL PROTECTED]> wrote: > I want to pass a string by reference. Don't worry, all function parameters in Python are passed by reference. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie look at Python and OO

2007-05-10 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > After thought: > > I do run into problems testing boolean values on a regular basis. FWIW, booleans were a late add-on. Originally, Python didn't had a bool type, only rules about the boolean value of a given object, mostly: 0, 0.0, '', [], (,), {} and None

Newbie question about string(passing by ref)

2007-05-10 Thread lazy
Hi, I want to pass a string by reference. I understand that strings are immutable, but Im not going to change the string in the function, just to aviod the overhead of copying(when pass-by-value) because the strings are long and this function will be called over and over again. I initially thought

Re: Newbie look at Python and OO

2007-05-10 Thread half . italian
On May 10, 2:21 pm, [EMAIL PROTECTED] wrote: > walterbyrd wrote: > > I learned to program with Pascal, way back when. Went into software > > development for a while, then went into systems admin. Have programmed > > in several languages, just learning Python. > > > Some things I find odd: > > > 1)

Re: File modes

2007-05-10 Thread Daniel Nogradi
> After reading a file is it possible to write to it without first > closing it? I tried opening with 'rw' access and re-winding. This does > not seem to work unless comments are removed. > > > Also, does close force a flush? > > Thanks, > > jh > > #~~ > > f = open('c:\\

Re: Newbie look at Python and OO

2007-05-10 Thread half . italian
walterbyrd wrote: > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 == -3? > > 2) list assignment handling, pointing tw

Re: path stuff

2007-05-10 Thread fscked
On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > > escribió: > > > > > I am wal

Re: Newbie look at Python and OO

2007-05-10 Thread Bruno Desthuilliers
walterbyrd a écrit : > Thanx for all the replies, I may be slowly getting it. But, can > anybody explain this? > > a = 'hello' b = 'hello' a is b > > True > a = 'hello there' b = 'hello there' a is b > > False > Python - well, CPython (the reference C implementation) a

Re: Newbie look at Python and OO

2007-05-10 Thread walterbyrd
Nevermind my previous question. I found the answer in "Learning Python" >> Python internally caches and reuses short strings as an optimization, there really is just a single string, 'spam', in memory, shared by S1 and S2; hence, the is identity test reports a true result. To trigger the normal be

Re: How to installo????

2007-05-10 Thread kyosohma
On May 10, 8:58 am, RonV <[EMAIL PROTECTED]> wrote: > Just got a new Vista system and puter > > Installed a newer version of Python, up from 2.2 or so... > > Tried to install Win extensions, but have forgotten how it's done. > Clicking on setup in the Win Extsions package flashes a window by,

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-10 Thread Vinay Sajip
On May 10, 6:37 pm, [EMAIL PROTECTED] wrote: > On May 9, 12:37 am, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > Our biggest concerns with the network solution is having a single > point of failure and the need for scalability. We could have > potentially thousands of machines doingloggingacross multi

Re: Newbie look at Python and OO

2007-05-10 Thread walterbyrd
Thanx for all the replies, I may be slowly getting it. But, can anybody explain this? >>> a = 'hello' >>> b = 'hello' >>> a is b True >>> a = 'hello there' >>> b = 'hello there' >>> a is b False -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie (but improving) - Passing a function name with parameters as aparameter

2007-05-10 Thread MRAB
On May 10, 6:33 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "mosscliffe" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > Asun Friere pointed out the central flaw in your program. Since passing > functions as arguments is an important concept, here, for any newbies who > did

File modes

2007-05-10 Thread HMS Surprise
After reading a file is it possible to write to it without first closing it? I tried opening with 'rw' access and re-winding. This does not seem to work unless comments are removed. Also, does close force a flush? Thanks, jh #~~ f = open('c:\\tempMaxq\\incidents.tx

do not use stunnix

2007-05-10 Thread kurt . michalke
Various chanels and groups are flooded with information about a thing called stunnix web server. Do not ever consider using it. It will in spite of all the marketing blah give you more pain than you can bear. We licensed it for a CD-ROM and ended up having to issue it three (!) times. Cheers, Kurt

Re: Comparing dates problem

2007-05-10 Thread kyosohma
On May 10, 2:45 pm, John Machin <[EMAIL PROTECTED]> wrote: > On May 11, 4:52 am, [EMAIL PROTECTED] wrote: > > > > > On May 9, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > On May 10, 7:34 am, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > > > I am writing a reminder program for our Zimbra e

Re: which is more pythonic/faster append or +=[]

2007-05-10 Thread Steven Bethard
7stud wrote: >> Is there any documentation for the syntax you used with timeit? > > This is the syntax the docs describe: [snip > python timeit.py [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...] [snip] > Then in the examples in section 10.10.2 [snip] > timeit.py 'try:' ' str.__nonzero__' 'exc

Re: searching algorithm

2007-05-10 Thread Gordon Airporte
> For the above (abrideged) dictionary, you would generate (use a > fixed-width "programmers" font so the tree looks good): > > a > | > b > | > s > / \ >i o > / /

Re: Newbie look at Python and OO

2007-05-10 Thread Bruno Desthuilliers
walterbyrd a écrit : > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 == -3? integer division. > 2) list assignment

Re: keyword checker - keyword.kwlist

2007-05-10 Thread tom
Hamilton, William kirjoitti: >> From: [EMAIL PROTECTED] >> F:\Ohjelmat\Python25\Lib\keyword.pyc > > That's your problem. Rename keyword.py to keywordcheck.py, and delete > keyword.pyc in this directory, and it should work fine. > > --- > -Bill Hamilton I tried the trick but the error stays. I re

Re: elegant python style for loops

2007-05-10 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > To step through a list, the python style is avoid an explicit index. > But what if the same hidden index is to be used for more than one list > > for example:- > for key,value in listKeys,listValues : > newdict[key]=value newdict = dict(zip(listKeys, listValues

Re: path stuff

2007-05-10 Thread fscked
On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > escribió: > > > > I am walking some directories looking for a certain filename pattern. > > >

Re: Comparing dates problem

2007-05-10 Thread John Machin
On May 11, 4:52 am, [EMAIL PROTECTED] wrote: > On May 9, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > > > > > On May 10, 7:34 am, [EMAIL PROTECTED] wrote: > > > > Hi, > > > > I am writing a reminder program for our Zimbra email client. One of > > > the requirements I was given was to a

Re: searching algorithm

2007-05-10 Thread Terry Reedy
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 2007-05-10, Gigs_ <[EMAIL PROTECTED]> wrote: | > if user type: "abs" program should list all words above in | > english and in croatian if user type: "absorb" than program | > should list last 3 words in english and i

Re: which is more pythonic/faster append or +=[]

2007-05-10 Thread 7stud
> Is there any documentation for the syntax you used with timeit? This is the syntax the docs describe: --- Python Reference Library 10.10.1: When called as a program from the command line, the following form is used: python timeit.py [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...] --- Then

Re: Unzip then Zip help

2007-05-10 Thread sdoty044
On May 9, 5:10 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > I am a true n00b... and I just using Python to complete some very > > small uneventful task, but need help with one last thing. > > > Basically, this I what I am trying to do. > > > make a temp directory (this p

Re: Re: High resolution sleep (Linux)

2007-05-10 Thread Bart.
> On 9 Maj, 03:23, John Nagle <[EMAIL PROTECTED]> wrote: > > Hendrik van Rooyen wrote: > > > "Tim Roberts" <[EMAIL PROTECTED]> wrote" > > > It is also possible to keep the timer list sorted by "expiry date", > > > and to reprogram the timer to interrupt at the next expiry time > > > to give arbitr

Re: Towards faster Python implementations - theory

2007-05-10 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | The idea is to create a special dictionary for python internals that | contains a pointer-to-a-pointer for the value side of the dictionary, | instead of just the standard PyObject*. Then when you start to eval a | code block, you cou

Re: append

2007-05-10 Thread Terry Reedy
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 2007-05-10, HMS Surprise <[EMAIL PROTECTED]> wrote: | > Trying not to be a whiner but I sure have trouble finding | > syntax in the reference material. I want to know about list | > operations such as append. Is there

Re: replacing string in xml file--revisited

2007-05-10 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > On May 10, 1:55 pm, [EMAIL PROTECTED] wrote: >> from elementtree import ElementTree as et > > which module should be imported for above to work,it says > ImportError: No module named elementtree > Thanks What about trying a web search engine to answer you

Re: Comparing dates problem

2007-05-10 Thread kyosohma
On May 10, 1:52 pm, [EMAIL PROTECTED] wrote: > On May 9, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 10, 7:34 am, [EMAIL PROTECTED] wrote: > > > > Hi, > > > > I am writing a reminder program for our Zimbra email client. One of > > > the requirements I was given was to automatic

Re: SQLObject 0.9.0

2007-05-10 Thread kyosohma
On May 10, 10:25 am, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > Hello! > > I'm pleased to announce the 0.9.0 release of SQLObject, the first stable > release of the 0.9 branch. > > What is SQLObject > = > > SQLObject is an object-relational mapper. Your database tables are describ

Re: which is more pythonic/faster append or +=[]

2007-05-10 Thread Peter Otten
Stargaming wrote: > Alex Martelli schrieb: >> 7stud <[EMAIL PROTECTED]> wrote: >>... >> .append - easy to measure, too: brain:~ alex$ python -mtimeit 'L=range(3); n=23' 'x=L[:]; x.append(n)' 100 loops, best of 3: 1.31 usec per loop brain:~ alex$ python -mtimeit '

Re: Comparing dates problem

2007-05-10 Thread Carsten Haese
On Thu, 2007-05-10 at 11:52 -0700, [EMAIL PROTECTED] wrote: > I'm sure there is a hack for doing something like what you suggest, > but it would be messy. The problem is that I get a datetime object > returned and division really isn't something you can do to one of > those objects. Besides, if I h

Re: Comparing dates problem

2007-05-10 Thread kyosohma
On May 10, 2:37 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I am writing a reminder program for our Zimbra email client. One of > > the requirements I was given was to automatically increment or > > decrement the display to show something like the following: > > > 5 min

Re: which is more pythonic/faster append or +=[]

2007-05-10 Thread Stargaming
Alex Martelli schrieb: > 7stud <[EMAIL PROTECTED]> wrote: >... > >>>.append - easy to measure, too: >>> >>>brain:~ alex$ python -mtimeit 'L=range(3); n=23' 'x=L[:]; x.append(n)' >>>100 loops, best of 3: 1.31 usec per loop >>> >>>brain:~ alex$ python -mtimeit 'L=range(3); n=23' 'x=L[:]; x+=

Re: Comparing dates problem

2007-05-10 Thread kyosohma
On May 9, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > On May 10, 7:34 am, [EMAIL PROTECTED] wrote: > > > > > Hi, > > > I am writing a reminder program for our Zimbra email client. One of > > the requirements I was given was to automatically increment or > > decrement the display to show somet

Re: Thread-safe dictionary

2007-05-10 Thread tuom . larsen
On May 10, 8:25 pm, [EMAIL PROTECTED] wrote: instead: > class safe_dict(dict): there should be: class safe_dict(object): -- http://mail.python.org/mailman/listinfo/python-list

Re: append

2007-05-10 Thread HMS Surprise
> > Do you really mean syntax? > Thought so? A few sources I bookmarked to avoid future google two-steps. http://www.diveintopython.org/native_data_types/lists.html http://en.wikibooks.org/wiki/Python_Programming/Lists http://infohost.nmt.edu/tcc/help/pubs/python22.pdf Thank you all. jh --

Working with Excel Inside Python

2007-05-10 Thread Eugenio Arima
Try # to save dbf3 set file format = 8 excel.ActiveSheet.SaveAs(Filename = "D:\AN00GALL.dbf", FileFormat = 8) -- http://mail.python.org/mailman/listinfo/python-list

Re: searching algorithm

2007-05-10 Thread Neil Cerutti
On 2007-05-10, Gigs_ <[EMAIL PROTECTED]> wrote: > Hi all! > > I have text file (english-croatian dictionary) with words in it > in alphabetical order. This file contains 17 words in this > format: english word: croatian word > > I want to make instant search for my gui Instant search, i mean >

Re: append

2007-05-10 Thread Neil Cerutti
On 2007-05-10, HMS Surprise <[EMAIL PROTECTED]> wrote: > Trying not to be a whiner but I sure have trouble finding > syntax in the reference material. I want to know about list > operations such as append. Is there a pop type function? I > looked in tutorial, language reference, and lib for list, >

Re: Suggestions for how to approach this problem?

2007-05-10 Thread John Salerno
James Stroud wrote: > import re > records = [] > record = None > counter = 1 > regex = re.compile(r'^(\d+)\. (.*)') > for aline in lines: > m = regex.search(aline) > if m is not None: > recnum, aline = m.groups() > if int(recnum) == counter: > if record is not None: > rec

Re: Thread-safe dictionary

2007-05-10 Thread tuom . larsen
On May 10, 3:57 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > IMHO you are probably best to write a thread-safe class which uses an > ordinary dict (and has a nicely limited interface) rather than trying to > produce a completely thread-safe dict type. thanks, sounds good! but that again: from

Re: tkinter - Screen Resolution

2007-05-10 Thread rahulnag22
On May 10, 1:29 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Wed, 09 May 2007 18:37:32 +0200, <[EMAIL PROTECTED]> wrote: > > Hi, > > I have developed a GUI usingtkinter(grid geometory manager). > > The structure is a top frame containing multiple subframes. Each > > subframe has a combination

Re: Towards faster Python implementations - theory

2007-05-10 Thread olsongt
On May 9, 5:02 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > Python has that capability mostly because it's free in an > "everything is a dictionary" implementation. ("When all you have > is a hash, everything looks like a dictionary".) But that limits > implementation p

Re: trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Hans-Peter Jansen wrote: > >> class Gen(object): >> def records(self, cls): >> for i in range(3): >> setattr(cls, "id", "%s%s" % (cls.__doc__, i)) >> yield cls >> >> […] >> >> class GenA(Gen): >> de

Re: trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Hi Diez, first, thanks for your comprehensive answer. Diez B. Roggisch wrote: > Hans-Peter Jansen schrieb: >> >> I'm trying to generate a bunch of similar classes, where some are >> contained in list attributes of others, e.g.: > > All your code below shows that you don't create classes, but _

Soultions deployment engineer

2007-05-10 Thread Erin
I am trying to find someone to fill a position that involves developing deployment scripts in Jython. I am having a tough time. I have talked to a lot of consultants who say this is an obscure skill. I am looking for suggetstions on where to find the person I need for this position. Any ideas? Does

Re: searching algorithm

2007-05-10 Thread Sébastien Ramage
I have made a script that search anagram based on the ODS file ( call OSW in english, Official Scrabble Words) it load a file that contain 369085 words (one word per line) I create a dictionnary and store word into using the length of the word as key example : mydict[2] contain a list of word with

Symposium "Computational Methods in Image Analysis" within the USNCCM IX Congress - Submission ENDS in 5 days

2007-05-10 Thread [EMAIL PROTECTED]
--- (Apologies for cross-posting) Symposium "Computational Methods in Image Analysis" National Congress on Computational Mechanics (USNCCM IX) San Francisco, CA,

Re: Newbie look at Python and OO

2007-05-10 Thread Neil Cerutti
On 2007-05-10, walterbyrd <[EMAIL PROTECTED]> wrote: > I learned to program with Pascal, way back when. Went into software > development for a while, then went into systems admin. Have programmed > in several languages, just learning Python. > > Some things I find odd: > > 1) 5/-2 == -3? Any math

reading argv argument of unittest.main()

2007-05-10 Thread winston . yang
I've read that unittest.main() can take an optional argv argument, and that if it is None, it will be assigned sys.argv. Is there a way to pass command line arguments through unittest.main() to the setUp method of a class derived from unittest.TestCase? Thank you in advance. Winston -- http://

Re: path stuff

2007-05-10 Thread fscked
On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > I am walking some directories looking for a certain filename pattern. > > This part works fine, but what if I want to exclude results from a > > cer

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-10 Thread nicholas . petrella
On May 9, 12:37 am, Vinay Sajip <[EMAIL PROTECTED]> wrote: > On May 9, 12:52 am, [EMAIL PROTECTED] wrote:> The infrastructure in which I > am work needs the ability to have log > > files written to from multiple instances of the same script and > > potentially from hundreds or more different machi

Re: Minor bug in tempfile module (possibly __doc__ error)

2007-05-10 Thread James T. Dennis
Marc Christiansen <[EMAIL PROTECTED]> wrote: > James T. Dennis <[EMAIL PROTECTED]> scribis: >> In fact I realized, after reading through tempfile.py in /usr/lib/... >> that the following also doesn't "work" like I'd expect: >># foo.py >>tst = "foo" >>def getTst(arg): > If I

Re: Newbie (but improving) - Passing a function name with parameters as aparameter

2007-05-10 Thread Terry Reedy
"mosscliffe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Asun Friere pointed out the central flaw in your program. Since passing functions as arguments is an important concept, here, for any newbies who did not understand, is a restatement of the problem and the fix. | timelo

RE: keyword checker - keyword.kwlist

2007-05-10 Thread Hamilton, William
> From: [EMAIL PROTECTED] > F:\Ohjelmat\Python25\Lib\keyword.pyc That's your problem. Rename keyword.py to keywordcheck.py, and delete keyword.pyc in this directory, and it should work fine. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

searching algorithm

2007-05-10 Thread Gigs_
Hi all! I have text file (english-croatian dictionary) with words in it in alphabetical order. This file contains 17 words in this format: english word: croatian word I want to make instant search for my gui Instant search, i mean that my program search words and show words to user as user

Re: append

2007-05-10 Thread Duncan Booth
HMS Surprise <[EMAIL PROTECTED]> wrote: > Trying not to be a whiner but I sure have trouble finding syntax in > the reference material. I want to know about list operations such as > append. Is there a pop type function? I looked in tutorial, language > reference, and lib for list, append, sequenc

Re: Towards faster Python implementations - theory

2007-05-10 Thread Terry Reedy
"sturlamolden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Franz, CMUCL, SBCL and GCL teams made Lisp almost as fast as C. A | dynamic language can be fast if the implementation is good. | | If you look at SBCL and GCL, no code is interpreted. It's all compiled | on the fly to n

Re: append

2007-05-10 Thread jmg3000
On May 10, 1:11 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Found list popping at > > http://en.wikibooks.org/wiki/Python_Programming/Lists:) You can find terse info on the list methods by doing: >>> help(list) ---John -- http://mail.python.org/mailman/listinfo/python-list

Re: append

2007-05-10 Thread Bill Pursell
On 10 May, 18:02, HMS Surprise <[EMAIL PROTECTED]> wrote: > Trying not to be a whiner but I sure have trouble finding syntax in > the reference material. I want to know about list operations such as > append. Is there a pop type function? I looked in tutorial, language > reference, and lib for list

Re: append

2007-05-10 Thread HMS Surprise
Found list popping at http://en.wikibooks.org/wiki/Python_Programming/Lists :) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >