plz sort this out

2007-04-16 Thread piyali biswas
Hi, I am using networkx and pylab for creating a graph using a python script abc.py. I have saved the networkx folder in "C:/Python24/Lib/site-packages". When I run the script from command prompt, it creates the graph and saves it to the place I want to but when I write a python-cgi script and run

Re: Getting started with python

2007-04-16 Thread 7stud
On Apr 15, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote: > py> t = timeit.Timer(stmt=s) > py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10) > 40.88 usec/pass > What does this accomplish: 100 * t.timeit(number=10)/10 that the following doesn't accomplish: 10

Re: Queue enhancement suggestion

2007-04-16 Thread Peter Otten
Paul Rubin wrote: > I'd like to suggest adding a new operation > >Queue.finish() > > This puts a special sentinel object on the queue. The sentinel > travels through the queue like any other object, however, when > q.get() encounters the sentinel, it raises StopIteration instead > of return

Re: Python and JMS?

2007-04-16 Thread Jarek Zgoda
Leonard J. Reder napisał(a): > Yes indeed, we are using ActiveMQ and I did see the StomPy python > package. But I also saw that it said stomp was done as a student > project that ended. Maybe I will try hjb for now - all I need to do > is listen for messages on a certain topic. > > Maybe some o

Re: is laziness a programer's virtue?

2007-04-16 Thread Rob Warnock
Daniel Gee <[EMAIL PROTECTED]> wrote: +--- | You fail to understand the difference between passive laziness and | active laziness. Passive laziness is what most people have. It's | active laziness that is the virtue. It's the desire to go out and / | make sure/ that you can be lazy in t

Re: Qt4 in ubuntu

2007-04-16 Thread Marcpp
On 15 abr, 22:54, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Marcpp schrieb: > > > Is possible install Qt4 pyqt4 under kubuntu? > > Few times ago i tried to run pyqt in ubuntu (gnome) but i can't > > do it. > > It's certainly possible. On ubuntu as well as on kubuntu. You can > install all KDE

Re: pyparsing Catch-22

2007-04-16 Thread 7stud
Paul McGuire wrote: > Me? Push? Boy, a guy posts a couple of examples, tries to help some > people that are stuck with a problem, and what does he get? Called > "pushy"? Sheesh! Hey, I never called you pushy! Ok, maybe I sounded a little harsh--I was pretty frustrated after all. I guess I sho

Re: Qt4 in ubuntu

2007-04-16 Thread Diez B. Roggisch
> > Hi Diez, finally I can install a Qt4 on Kubuntu, but now I have > problems to install a Qt4Designer. > I'm introducing to Qt with python, why tutorial you recommend to me? Google for them. And use C++-tutorials, they can be easily translated to python. Diez -- http://mail.python.org/mailman

Re: pyparsing Catch-22

2007-04-16 Thread 7stud
On Apr 16, 2:06 am, "7stud" <[EMAIL PROTECTED]> wrote: > Hmmm. My post got cut off. Here's the rest of it: I'm pretty facile with regex's, and after looking at some pyparsing threads over the last week or so, I was interested in trying it. However, all of the beginning examples use a Word() in

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-16 Thread Javier Bezos
Paddy, >> Dijkstra's argument is obsolete, as it is based on >> how array length was computed many years ago -- if >> we have an array a = b..e, then the lenght of a >> is e-b (half open range). Good at low level >> programming. >> >> But a quarter of a century after we know concepts >> are much b

Re: pyparsing Catch-22

2007-04-16 Thread 7stud
Basic Pyparsing Words and Literals -- http://mail.python.org/mailman/listinfo/python-list

Re: pyparsing Catch-22

2007-04-16 Thread 7stud
Word("ABC", "def") matches "C", "Added", "Beef" but not "BB", "ACE", "ADD" That is just baffling. There's no explanation that the characters specified in the first string are used to match the first char of a word and that the characters specified in the second string are used to match the rest o

Re: File DB instead of real database?

2007-04-16 Thread Bruno Desthuilliers
Jia Lu a e'crit : > Hello all > > I donot want to use a real DB like MySQL ... Whether MySQL is qualifies as a "real DB" is still an open question. But you can use SQLite, which is an embedded SQL database. -- http://mail.python.org/mailman/listinfo/python-list

please sort this out

2007-04-16 Thread piyali biswas
Hi, I am using networkx and pylab for creating a graph using a python script abc.py. I have saved the networkx folder in "C:/Python24/Lib/site-packages". When I run the script from command prompt, it creates the graph and saves it to the place I want to but when I write a python-cgi script and run

Re: pyparsing Catch-22

2007-04-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, 7stud wrote: > However, all of the beginning examples use a Word() in the parse > expression, but I couldn't find an adequate explanation of what the > arguments to Word() are and what they mean. I finally found the > information buried in one of the many documents--the o

Re: is laziness a programer's virtue?

2007-04-16 Thread Torben Ægidius Mogensen
Dan Bensen <[EMAIL PROTECTED]> writes: > Xah Lee wrote: >> Laziness, Perl, and Larry Wall >> When the sorcerer Larry Wall said “The three chief virtues of a >> programmer are: Laziness, Impatience and Hubris”, he used the word >> “laziness” to loosely imply “natural disposition that resu

string methods of a str subclass

2007-04-16 Thread Daniel Nogradi
I am probably misunderstanding some basic issue here but this behaviour is not what I would expect: Python 2.4 (#1, Mar 22 2005, 21:42:42) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class mystr( str ): ...

Re: Queue enhancement suggestion

2007-04-16 Thread Antoon Pardon
On 2007-04-16, Paul Rubin wrote: > I'd like to suggest adding a new operation > >Queue.finish() > > This puts a special sentinel object on the queue. The sentinel > travels through the queue like any other object, however, when > q.get() encounters the sentinel, it raises StopIteration instea

Re: Method calls and stack consumption

2007-04-16 Thread Peter Otten
Martin Manns wrote: > Thanks for pointing out the oversimplified nature of the original > example.I hope that the following one clarifies the problem. > > (I do not know, what has to be stored on the stack, but it should not be > that much, because all recursion calls originate from inside the re

ANN: PyQt v4.2 (Python Bindings for Qt)

2007-04-16 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of PyQt v4.2 available from http://www.riverbankcomputing.co.uk/pyqt/. The highlights of this release include: - The ability to write widget plugins for Qt Designer in Python. - Integration of the Python command shell and the Qt event loop.

Compare regular expressions

2007-04-16 Thread Thomas Dybdahl Ahle
Hi, I'm writing a program with a large data stream to which modules can connect using regular expressions. Now I'd like to not have to test all expressions every time I get a line, as most of the time, one of them having a match means none of the others can have so. But ofcource there are also

Re: string methods of a str subclass

2007-04-16 Thread 7stud
On Apr 16, 3:28 am, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > I am probably misunderstanding some basic issue here but this > behaviour is not what I would expect: > > Python 2.4 (#1, Mar 22 2005, 21:42:42) > [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 > Type "help", "copyright", "

Re: Portably generating infinity and NaN

2007-04-16 Thread Michael Hoffman
Paul Rubin wrote: > [EMAIL PROTECTED] writes: >> But PEP 754 will only work for architectures supporting IEEE 754. I realize >> that's the vast majority of systems, but aren't there still a few Crays and >> VMS machines out there? (Do those architectures support NaN and Inf?) > > I wouldn't worr

Re: string methods of a str subclass

2007-04-16 Thread Duncan Booth
"Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > Why is the strip( ) method returning something that is not a mystr > instance? I would expect all methods operating on a string instance > and returning another string instance to correctly operate on a mystr > instance and return a mystr instance. Wh

How to generate a continuous string

2007-04-16 Thread 人言落日是天涯,望极天涯不见家
How to generate a continuous string, like this "aaa" the number of characters is dynamic. Is there a module or function implement this string ? such as: duplicate_string(char, num) -- http://mail.python.org/mailman/listinfo/python-list

newbie question: how to read back the dictionary from a file?

2007-04-16 Thread lancered
Hi Dear all, I have some data here in the form of a dictionary, called "vdic". Then I write them to a data file "f" using the write function as f.write(str(vdic)). The keys of this dictionary are integers and values are float numbers. Something like this: { 1: 0.00951486513347, 2: 0.0388123556

Re: string methods of a str subclass

2007-04-16 Thread 7stud
On Apr 16, 3:28 am, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > I would expect all methods operating on a string instance > and returning another string instance Ok, then this: class A(object): def __init__(self, s): self.s = s def strip(self): return self.s class mystr

Rapyd-Tk Pmw Notebook tutorial

2007-04-16 Thread boriq
Hello, could anybody be so kind and write me a small tutorial about "how to create a Pmw notebook with 3 tabs each containing 5 checkboxes" with the help of Rapyd-Tk? Thanks in advance rg, boris -- http://mail.python.org/mailman/listinfo/python-list

Re: How to generate a continuous string

2007-04-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, 人言落日是天涯,望极天涯不见家 wrote: > How to generate a continuous string, like this > "aaa" > the number of characters is dynamic. Is there a module or function > implement this string ? > such as: duplicate_string(char, num) Even easier: multiply the string by a n

Re: How to generate a continuous string

2007-04-16 Thread [EMAIL PROTECTED]
On 16 avr, 12:03, "人言落日是天涯,望极天涯不见家" <[EMAIL PROTECTED]> wrote: > How to generate a continuous string, like this > "aaa" > the number of characters is dynamic. Is there a module or function > implement this string ? > such as: duplicate_string(char, num) >>> "a"*10 'aa'

Re: How to generate a continuous string

2007-04-16 Thread Michael Bentley
On Apr 16, 2007, at 5:03 AM, 人言落日是天涯,望极天涯不 见家 wrote: > How to generate a continuous string, like this > "aaa" > the number of characters is dynamic. Is there a module or function > implement this string ? > such as: duplicate_string(char, num) It's even easier than that -- j

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread Amit Khemka
On 16 Apr 2007 03:03:40 -0700, lancered <[EMAIL PROTECTED]> wrote: > Hi Dear all, > > I have some data here in the form of a dictionary, called "vdic". Then > I write them to a data file "f" using the write function as > f.write(str(vdic)). The keys of this dictionary are integers and > values a

Re: How to generate a continuous string

2007-04-16 Thread Amit Khemka
On 16 Apr 2007 03:03:26 -0700, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> wrote: How to generate a continuous string, like this "aaa" the number of characters is dynamic. Is there a module or function implement this string ? such as: duplicate_string(char, num) mystr = mychar*n n:

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread 7stud
On Apr 16, 4:03 am, "lancered" <[EMAIL PROTECTED]> wrote: > Hi Dear all, > > I have some data here in the form of a dictionary, called "vdic". Then > I write them to a data file "f" using the write function as > f.write(str(vdic)). The keys of this dictionary are integers and > values are float

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread 7stud
s.close() -- http://mail.python.org/mailman/listinfo/python-list

Signal Handlers

2007-04-16 Thread Robert Rawlins - Think Blue
Hello Guys, Thanks again for all the help you've given me this past week, things are moving briskly and my class library is building nicely and seems to be working well :-D Now, I'm working with an API for another piece of software today, and the API documentation details the signals that a

Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
Hi! I'm trying to extend my python program with some C++ code. Right now I've spent hours just trying to get boost to work! I'm trying to get the example hello.cpp to work. Using Windows XP and Visual Studio 8 (.NET 2005) I've set BOOST_BUILD_PATH = C:\boost\boost_1_33_1 (where i installed b

Re: ctypes and pointers

2007-04-16 Thread per9000
[This might be a double posting, if it isn't my previous post was lost] Look up "restype" in the ctypes library - it sets the return type from a function. You may want to set it to c_void_p of something similar, instead of the default int. I made a similar discovery in my blog - http://www.pereri

how to combine two applications in pygtk

2007-04-16 Thread PARIMALA KALAVALA
hi, I want to know how to integrate two applications in pygtk. Should we add any header files in the main program or import any modules. also if we need to import any modules then how to convert the application in a module. Pls reply to this mail as soon as possible.

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Rob Wolfe
Soren wrote: > Unable to load Boost.Build: could not find "boost-build.jam" > --- > Attempted search from C:\boost\boost_1_33_1\libs\python\example > \tutorial up to t > he root and in these directories from BOOST_BUILD_PATH and BOOST_RO

Re: is laziness a programer's virtue?

2007-04-16 Thread Torben Ægidius Mogensen
[EMAIL PROTECTED] (Rob Warnock) writes: > Daniel Gee <[EMAIL PROTECTED]> wrote: > +--- > | You fail to understand the difference between passive laziness and > | active laziness. Passive laziness is what most people have. It's > | active laziness that is the virtue. It's the desire to

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 12:53, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > Unable to load Boost.Build: could not find "boost-build.jam" > > --- > > Attempted search from C:\boost\boost_1_33_1\libs\python\example > > \tutorial up to t > >

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 12:53, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > Unable to load Boost.Build: could not find "boost-build.jam" > > --- > > Attempted search from C:\boost\boost_1_33_1\libs\python\example > > \tutorial up to t > >

Re: Getting started with python

2007-04-16 Thread Steve Holden
James Stroud wrote: > Steve Holden wrote: >> You'd be worth more if you'd used elif and omitted the continue >> statements, but for a first solution it's acceptable. > > Depends on what you are after. > > py> s = """ > ... for i in xrange(1,101): > ... if not i % 15: > ... continue > ...

Re: ctypes and pointers

2007-04-16 Thread Diez B. Roggisch
per9000 wrote: > [This might be a double posting, if it isn't my previous post was > lost] > > Look up "restype" in the ctypes library - it sets the return type from > a function. You may want to set it to c_void_p of something similar, > instead of the default int. > > I made a similar discover

Import From SubFolder

2007-04-16 Thread Robert Rawlins - Think Blue
Chaps, Is it possible to import a module from a subdirectory in my application? I can only seem to get it to import from a single directory, but keeping all my files and classes in the same directory becomes a little sloppy. Thanks, Rob -- http://mail.python.org/mailman/listinfo/pyth

Re: File DB instead of real database?

2007-04-16 Thread Sebastian Bassi
On 13 Apr 2007 21:14:36 -0700, Jia Lu <[EMAIL PROTECTED]> wrote: > I donot want to use a real DB like MySQL ... But I need something to > save about more than 1000 articles. > Is there any good ways? SQLite is a good option, as you were told. But what about put them in a dictionary and then cPic

How to tell whetehr Python script called as CGI or from command line?

2007-04-16 Thread rowan
I'm writing a Python script that can either be called as a Cron job or as a web page (i.e. as a CGI in response to an HTTP request). This is to process the mailboxes on my web server (to which I don't have command line access) to remove old messages. How do I find out whether the script has been ca

Re: pyparsing Catch-22

2007-04-16 Thread Paul McGuire
On Apr 16, 3:27 am, "7stud" <[EMAIL PROTECTED]> wrote: > > Any tips? 7stud - Here is the modified code, followed by my comments. Oh, one general comment - you mention that you are quite facile with regexp's. pyparsing has a slightly different philosophy from that of regular expressions, especi

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Rob Wolfe
Soren wrote: > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > It did solve the error.. but produced a new one: > > C:\boost\boost_1_33_1\libs\python\example\tutorial>bjam -sT

Re: How to tell whetehr Python script called as CGI or from command line?

2007-04-16 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I'm writing a Python script that can either be called as a Cron job or > as a web page (i.e. as a CGI in response to an HTTP request). This is > to process the mailboxes on my web server (to which I don't have > command line access) to remove old messages. How do I find o

Re: string methods of a str subclass

2007-04-16 Thread Daniel Nogradi
> > Why is the strip( ) method returning something that is not a mystr > > instance? I would expect all methods operating on a string instance > > and returning another string instance to correctly operate on a mystr > > instance and return a mystr instance. > > Why would you expect that? > Would y

Re: Python editor/IDE on Linux?

2007-04-16 Thread Paddy
On Apr 16, 2:17 am, "Daniel Gee" <[EMAIL PROTECTED]> wrote: > didn't know that one. Perhaps I'll look into Gvim (I still like to cut > and paste with the mouse, even if I left that off my list). In gvim you can use a mouse-1-drag to select text then mouse-2 at the position you want to copy the te

Re: pyparsing Catch-22

2007-04-16 Thread Paul McGuire
On Apr 16, 7:25 am, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > > long-windedness snipped Oh, P.S., There is a list parser example included in the pyparsing examples directory, called parsePythonValue.py. It will parse nested lists, dicts, and tuples. -- Paul -- http://mail.python.org/mailman/

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 14:28, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > > It did solve the error.. but produced a new one:

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 14:28, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > > It did solve the error.. but produced a new one:

Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking to write a Log file which will be CSV based, and there is a good possibility that it'll get quite busy once its up and running, so I'm looking for the most efficient way to achieve it. Whilst I'm sure i could do something like this. myfile = open("Logs/

Re: yield, curry, mix-in, new.function, global, closure, .... what will work?

2007-04-16 Thread ecir . hana
On Apr 16, 3:05 am, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > > Please, can you elaborate further, I'm not sure if I understood. > > Should I lock global variables i, j during the execution of run()? In > > that case I have to apologize, I showed rather simplified

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread Fuzzyman
On Apr 16, 11:03 am, "lancered" <[EMAIL PROTECTED]> wrote: > Hi Dear all, > > I have some data here in the form of a dictionary, called "vdic". Then > I write them to a data file "f" using the write function as > f.write(str(vdic)). The keys of this dictionary are integers and > values are float

More newbie help required with dictionaries

2007-04-16 Thread loial
The following code only returns the last row(22) added to the machines dictionary. presumably I need some additional syntax to add rows to the dictionary rather than overwrite. What do I need to add? machinekey = "11" machines = { machinekey:[1,0,0,0,0,0,0,0,0,0,0,0,0] } machinekey = "2

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > I'm looking to write a Log file which will be CSV based, and there is a good > possibility that it'll get quite busy once its up and running, so I'm > looking for the most efficient way to achieve it. [... snip ...] > myfile = open("Logs/Applica

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread Dave Borne
On 4/16/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: > I'm looking to write a Log file which will be CSV based, and there is a good > possibility that it'll get quite busy once its up and running, so I'm > looking for the most efficient way to achieve it. Whilst I'm sure i could do >

Re: More newbie help required with dictionaries

2007-04-16 Thread Christoph Haas
On Mon, Apr 16, 2007 at 06:43:37AM -0700, loial wrote: > The following code only returns the last row(22) added to the > machines dictionary. > presumably I need some additional syntax to add rows to the dictionary > rather than overwrite. > > What do I need to add? > > machinekey = "11"

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread skip
Rob> I'm looking to write a Log file which will be CSV based, and there Rob> is a good possibility that it'll get quite busy once its up and Rob> running, so I'm looking for the most efficient way to achieve Rob> it. In addition to Tim's advice, if you're worried about possible lo

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread skip
Dave> Python has built in logging support. It's pretty flexible as far Dave> as formatting output. I can get a bit complicated to set up, but Dave> it will handle traffic well. Really? I've found it to be a dog in heavy logging situations. Skip -- http://mail.python.org/mailman/lis

Re: More newbie help required with dictionaries

2007-04-16 Thread loial
machines[machinekey] = [0,1,0,0,0,0,0,0,0,0,0,0,0] is what I needed...thanks On 16 Apr, 15:07, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Mon, Apr 16, 2007 at 06:43:37AM -0700, loial wrote: > > The following code only returns the last row(22) added to the > > machines dictionary. > > pr

RE: Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
Hello Guys, Thanks for the advice on this one. I'm running Debian Linux as an OS, if that makes any major differences. That inbuilt CSV stuff looked pretty tidy, as does the logging. I'd be keen to learn a little more about that performance wise though. The log at its highest rate of write may be

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread Dave Borne
On 4/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Dave> Python has built in logging support. It's pretty flexible as far > Dave> as formatting output. I can get a bit complicated to set up, but > Dave> it will handle traffic well. > > Really? I've found it to be a dog in hea

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > The log at its highest rate of write may be looking at an operation a > second I think I can probably type stuff in faster than that if I try :) You probably don't have a performance issue there. , I've not got much experience with this kind of thing so I'm n

Re: Python Feature Request: Add the "using" keyword which works like "with" in Visual Basic

2007-04-16 Thread Colin J. Williams
James Stroud wrote: > [EMAIL PROTECTED] wrote: >> Please check for sanity and approve for posting at python-dev. >> >> In Visual Basic there is the keyword "with" which allows an object- >> name to be declared as governing the following statements. For >> example: >> >> with quitCommandButton >> .

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread Alex Martelli
lancered <[EMAIL PROTECTED]> wrote: > Hi Dear all, > > I have some data here in the form of a dictionary, called "vdic". Then > I write them to a data file "f" using the write function as > f.write(str(vdic)). The keys of this dictionary are integers and > values are float numbers. Something l

RE: Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
Thanks for that Tim, I could use a little more help with this CSV stuff this afternoon and I can't get it to write the output I want for the life of me. I'm trying to write a method for my logging class that receives a string as an argument, and then writes a row to the CSV with the string and a

Re: OverflowError: mktime argument out of range ???

2007-04-16 Thread Paul Boddie
John Machin wrote: > > Maybe it does. It sure would be nice to get a definite answer. Pity > nobody documented the time module. "The epoch is the point where the time starts. On January 1st of that year, at 0 hours, the ``time since the epoch'' is zero. For Unix, the epoch is 1970. To find out wha

Re: Writing Log CSV (Efficiently)

2007-04-16 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > Thanks for that Tim, > > I could use a little more help with this CSV stuff this afternoon and I > can't get it to write the output I want for the life of me. I'm trying to > write a method for my logging class that receives a string as an argument, > and then

How to better pickle an extension type

2007-04-16 Thread dgdev
I would like to pickle an extension type (written in pyrex). I have it working thus far by defining three methods: class C: # for pickling __getstate__(self): ... # make 'state_obj' return state_obj __reduce__(self): return

Python and SSL

2007-04-16 Thread billiejoex
Hi, I developed an ftp-server library and now I would like to add support for SSL/TLS as described in RFC 2228: http://tools.ietf.org/html/rfc2228 Currenlty I'm searching for documentation about this subject and I would like to start to ask some questions: - I noticed that socket module provides a

Re: yield, curry, mix-in, new.function, global, closure, .... what will work?

2007-04-16 Thread Jason
On Apr 16, 7:28 am, [EMAIL PROTECTED] wrote: > On Apr 16, 3:05 am, Paul Rubin wrote: > > > [EMAIL PROTECTED] writes: > > > > Please, can you elaborate further, I'm not sure if I understood. > > > Should I lock global variables i, j during the execution of run()? In > > >

win32 register

2007-04-16 Thread Attila Szabo
Hi, I'm a unix programmer and I have minimal ideas, how things work under windows. I have a tkinter stuff, that has to accept data from explorer, I've done it via pipes, because I guess no drag'n'drop method exists... At program launch, it registers a context menu handler to png files, that sends

file resume

2007-04-16 Thread luca72
Hello at all: if i have one file written in binary mode, how can i append others binary data to this file after the its closure. ex my_file = open('blabal', 'wb') then i write something and then my_file.close() now if i need to open it again and append other binary data how can i proceed? Regards

RE: file resume

2007-04-16 Thread Robert Rawlins - Think Blue
Do the same again, but change that 'wb' to 'a' for append :-D should sort you out. Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of luca72 Sent: 16 April 2007 16:57 To: python-list@python.org Subject: file resume Hello at all: if i have one file writt

Re: file resume

2007-04-16 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, luca72 wrote: > if i have one file written in binary mode, how can i append others > binary data to this file after the its closure. > ex > my_file = open('blabal', 'wb') > then i write something and then > my_file.close() > now if i need to open it again and append other b

Lame wrapper for Python

2007-04-16 Thread Harlin Seritt
Is there any type of lame_enc.dll wrapper for Python that's available? Thanks, Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Feature Request: Add the "using" keyword which works like "with" in Visual Basic

2007-04-16 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Please check for sanity and approve for posting at python-dev. Technically, you can post it yourself to python-dev, but you'll just get bounced back here to discuss it with us. ;-) > In Visual Basic there is the keyword "with" which allows an object- > name to be declar

Re: Python and SSL

2007-04-16 Thread kyosohma
On Apr 16, 10:24 am, "billiejoex" <[EMAIL PROTECTED]> wrote: > Hi, > I developed an ftp-server library and now I would like to add support > for SSL/TLS as described in RFC 2228:http://tools.ietf.org/html/rfc2228 > Currenlty I'm searching for documentation about this subject and I > would like to s

moving multiple directories

2007-04-16 Thread DataSmash
Hi, I need to organize thousands of directories full of files. I want to move these directories into other subdirectories. For example, all the directories that start with 01, move to a directory named "one", all directories that start with 02, move to a directory name "two", and so on I can't

Re: Lame wrapper for Python

2007-04-16 Thread kyosohma
On Apr 16, 11:04 am, "Harlin Seritt" <[EMAIL PROTECTED]> wrote: > Is there any type of lame_enc.dll wrapper for Python that's available? > > Thanks, > > Harlin Seritt If you are talking about the LAME codec, then you might be able to use py-lame: http://sourceforge.net/project/showfiles.php?group

script for seconds in given month?

2007-04-16 Thread edfialk
Hi, does anyone happen to know of a script that would return the number of seconds in a month if I give it a month and a year? My python is a little weak, but if anyone could offer some suggestions I think I could handle it myself, or if anyone happens to know of a script already written that perf

Re: Authenticating clients and servers

2007-04-16 Thread Goldfish
On Apr 15, 2:40 pm, Chaz Ginger <[EMAIL PROTECTED]> wrote: > Thomas Krüger wrote: > > Chaz Ginger schrieb: > >> I am writing a distributed server system using Python. I need to support > >> authentication and was wondering what approaches are available under > >> Python and what are the best practi

Python + ogr module?

2007-04-16 Thread Szkandera . Karel
Hi, I need to do web service, which will be convert vector formats, like shapefile, dgn, mapinfo..(and other formats, which are supported in gdal - ogr2ogr). I want to do it with using ogr2ogr in the ogr python module, but i am newbie in python, so here is my questions. Is here anybody, who wrot

C++ extension problem

2007-04-16 Thread pythoncurious
Hi, I'm having a bit of trouble when writing a python extension. I can't seem to figure out what I did wrong. I tried to make a minimal example, but it's still quite a bit of code. It would be very appreciated if anyone could tell me what I've done wrong. First a short description of what I've do

Re: tuples, index method, Python's design

2007-04-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Donn Cave" <[EMAIL PROTECTED]> wrote: > > > > > Well, yes - consider for example the "tm" tuple returned > > from time.localtime() - it's all integers, but heterogeneous > > as could be - tm[0] is Year, tm[1] is

Re: script for seconds in given month?

2007-04-16 Thread Jim
On Apr 16, 12:22 pm, "edfialk" <[EMAIL PROTECTED]> wrote: > Hi, does anyone happen to know of a script that would return the > number of seconds in a month if I give it a month and a year? > > My python is a little weak, but if anyone could offer some suggestions > I think I could handle it myself,

Re: tuples, index method, Python's design

2007-04-16 Thread Chris Mellon
On 4/12/07, Alan Isaac <[EMAIL PROTECTED]> wrote: > Chris Mellon said: > > Sure. I have never done this. In fact, I have only ever written code > > that converted a tuple to a list once, and it was because I wanted > > pop(), not index() > > Well then you apparently made a *mistake*: you chose a tu

Re: script for seconds in given month?

2007-04-16 Thread pythoncurious
On Apr 16, 6:22 pm, "edfialk" <[EMAIL PROTECTED]> wrote: > Hi, does anyone happen to know of a script that would return the > number of seconds in a month if I give it a month and a year? > something like this might work, it should event handle DST correctly. You could read up on mktime() if you w

Re: yield, curry, mix-in, new.function, global, closure, .... what will work?

2007-04-16 Thread ecir . hana
On Apr 16, 5:36 pm, "Jason" <[EMAIL PROTECTED]> wrote: > On Apr 16, 7:28 am, [EMAIL PROTECTED] wrote: > > > > > On Apr 16, 3:05 am, Paul Rubin wrote: > > > > [EMAIL PROTECTED] writes: > > > > > Please, can you elaborate further, I'm not sure if I understood. > > > > Shoul

swig win32 scons

2007-04-16 Thread myheartinamerica
Hello, I spent the morning figuring out how to use SWIG on Microsoft Windows. I compiled the example from the SWIG tutorial on http://www.swig.org. The biggest stumbling block was not knowing that I needed to rename the DLL created to have a PYD extension. I also ended up writing a .def file for e

Re: script for seconds in given month?

2007-04-16 Thread skip
Matt> from time import mktime Matt> def secondsInMonth(year, month): Matt> s1 = mktime((year,month,1,0,0,0,0,0,-1)) Matt> s2 = mktime((year,month+1,1,0,0,0,0,0,-1)) Matt> return s2-s1 Probably won't work if month==12. ;-) Skip -- http://mail.python.org/mailman/li

Re: swig win32 scons

2007-04-16 Thread myheartinamerica
It turns out I didn't need the DEF file for exports. -- http://mail.python.org/mailman/listinfo/python-list

Re: script for seconds in given month?

2007-04-16 Thread Paul McGuire
On Apr 16, 11:22 am, "edfialk" <[EMAIL PROTECTED]> wrote: > Hi, does anyone happen to know of a script that would return the > number of seconds in a month if I give it a month and a year? > > My python is a little weak, but if anyone could offer some suggestions > I think I could handle it myself,

subprocess confusion

2007-04-16 Thread Tim Arnold
Hi, Just discovered that my subprocess call with the preexec_fn wasn't doing what I thought. If 'machine' value is different than the current machine name, I want to remsh the command to that machine, but obviously I misunderstood the preexec_fn arg. Should I just put the remsh in the actual co

  1   2   >