Re: trouble with time --again

2005-08-30 Thread Do Re Mi chel La Si Do
Hi ! Try : import datetime date1 = datetime.datetime(2005,01,01,8,20,0) print date1.strftime('%Y-%m-%d %H:%M:%S') @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamicly updating an objects fields

2005-08-30 Thread Uwe Lauth
kyle.tk wrote: > I want to make a function that will work like this: > > def updateField(object, fieldName, newValue): > object.fieldName = newValue This function already exists in python. It is called settattr. Regards Uwe -- http://mail.python.org/mailman/listinfo/python-list

test message

2005-08-30 Thread BC
-- http://mail.python.org/mailman/listinfo/python-list

dynamicly updating an objects fields

2005-08-30 Thread kyle.tk
I want to make a function that will work like this: def updateField(object, fieldName, newValue): object.fieldName = newValue fieldName could be anything, the list of objects fields will grow as my project goes on and i want to reuse the same code without adding more if statements to it

ANN: M2Crypto 0.15

2005-08-30 Thread Heikki Toivonen
M2crypto release 0.15 In this M2Crypto release: * Support for OpenSSL up to 0.9.8 * Support for SWIG 1.3.24 * Support for Python 2.4.1 * Twisted integration * Safer defaults for SSL context and post connection check for clients * Eliminated C pointers from interfaces (some may still remain in cal

Re: Jargons of Info Tech industry

2005-08-30 Thread Steve Holden
[Top-posted to try and stop this nonsense]. Two things: Firstly, you are both playing right into Xah Lee's stupid game by continuing to bicker at each other on a thread that shouldn't have lasted more than two posts. Secondly, if you don't both shut up I'll come over there and knock your bloo

Re: reg email packages work

2005-08-30 Thread Robert Kern
praba kar wrote: > --- Sybren Stuvel > <[EMAIL PROTECTED]> wrote: > >>Steve Holden enlightened us with: >> >>>It's obvious you aren't using that EXACT code, >> >>because it doesn't >> >>>formulate a three-paragraph message. So the bit we >> >>really need to >> >>>see is how you capture and formula

Re: Uploading images via cgi?

2005-08-30 Thread Chris Dewin
On Tue, 30 Aug 2005 21:55:26 +, Peter Hansen wrote: > Chris Dewin wrote: >> How do I go about writing a cgi script, that will enable the client to >> upload things to a directory on my website? >> >> I would also like to write a script that enables the client to delete >> items in that direct

Re: reg email packages work

2005-08-30 Thread Steve Holden
praba kar wrote: > --- Sybren Stuvel > <[EMAIL PROTECTED]> wrote: > > >>Steve Holden enlightened us with: >> >>>It's obvious you aren't using that EXACT code, >> >>because it doesn't >> >>>formulate a three-paragraph message. So the bit we >> >>really need to >> >>>see is how you capture and form

Re: Adding bound methods dynamically... CORRECTED

2005-08-30 Thread Devan L
Kevin Little wrote: > I want to dynamically add or replace bound methods in a class. I want > the modifications to be immediately effective across all instances, > whether created before or after the class was modified. I need this > to work for both old ('classic') and new style classes, at both

Re: reg email packages work

2005-08-30 Thread praba kar
--- Sybren Stuvel <[EMAIL PROTECTED]> wrote: > Steve Holden enlightened us with: > > It's obvious you aren't using that EXACT code, > because it doesn't > > formulate a three-paragraph message. So the bit we > really need to > > see is how you capture and formulate the argument > to set_payload()

Re: Jargons of Info Tech industry

2005-08-30 Thread John Bokma
Mark McIntyre <[EMAIL PROTECTED]> wrote: > On 30 Aug 2005 18:06:48 GMT, in comp.lang.c , John Bokma > <[EMAIL PROTECTED]> wrote: > >>Mark McIntyre <[EMAIL PROTECTED]> wrote: >> >>>Its a complete mystery. Just as is the reason why you are x-posting >>>complete garbage to comp.lang.c... >> >>A simi

Re: Adding bound methods dynamically... CORRECTED

2005-08-30 Thread Kevin Little
#!/usr/bin/env python # Sorry... :} cut/paste error fixed... ''' I want to dynamically add or replace bound methods in a class. I want the modifications to be immediately effective across all instances, whether created before or after the class was modified. I need this to work for both old ('c

Re: suggestion for Python graphing package, please

2005-08-30 Thread Kenneth McDonald
I haven't looked at it for a while, but when I was looking at it, MatPlotLib was great (though the API was still in flux). I'd assume it's become even better since then and I certainly hope so, because I'm planning on using it again soon :-). Ken On Aug 29, 2005, at 3:36 PM, Robert Kern wr

Adding bound methods dynamically...

2005-08-30 Thread Kevin Little
#!/usr/bin/env python ''' I want to dynamically add or replace bound methods in a class. I want the modifications to be immediately effective across all instances, whether created before or after the class was modified. I need this to work for both old ('classic') and new style classes, at both

Re: Precise timings ?

2005-08-30 Thread Mike Meyer
Madhusudan Singh <[EMAIL PROTECTED]> writes: > No, no. All I am looking for is for the system to report its time with > better resolution. I know it is possible on my hardware, because I can get > at very precise timings using Fortran 95 intrinsics in my other code. Then you could always write a C

Re: Uploading images via cgi?

2005-08-30 Thread Peter Hansen
Chris Dewin wrote: > How do I go about writing a cgi script, that will enable the client to > upload things to a directory on my website? > > I would also like to write a script that enables the client to delete > items in that directory if they want. Given that it's unix server, how do > I go abo

Uploading images via cgi?

2005-08-30 Thread Chris Dewin
How do I go about writing a cgi script, that will enable the client to upload things to a directory on my website? I would also like to write a script that enables the client to delete items in that directory if they want. Given that it's unix server, how do I go about ensuring the files are writt

Re: global interpreter lock

2005-08-30 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: > On Tue, 30 Aug 2005 05:15:34 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: >>Mike Meyer wrote: >> > Bryan Olson <[EMAIL PROTECTED]> writes: >> >> > Bryan Olson writes: >> >> > Trivially, an 'if' statement that depends upon input >> >> >>data is statically p

Re: Yielding a chain of values

2005-08-30 Thread Peter Hansen
Bengt Richter wrote: > On Tue, 30 Aug 2005 23:12:35 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> > wrote: >>Bengt Richter wrote: >>>Maybe >>> yield in inner() >>> >>>could be sugar for the above and become something optimized? >> >>The problem here is that yield isn't a statement any mor

Re: Release of PyPy 0.7.0

2005-08-30 Thread Carl Friedrich Bolz
Michael Hudson wrote: [snip >>Obviously therefore anyone seeking to translate their existing code from >>python to an executable directly using pypy would not be doing it for >>performance reasons (again, something I'm aware of watching the >>updates come out and having run svn checkouts at previo

Re: micro-python - is it possible?

2005-08-30 Thread Alejandro Weinstein
Evil Bastard wrote: > Hi, > > Has anyone done any serious work on producing a subset of python's > language definition that would suit it to a tiny microcontroller > environment? Take a look at PyMite : http://www.python.org/pycon/papers/pymite/ From the abstract : "PyMite is a flyweight Pyth

Re: py2app and Bittornado

2005-08-30 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Yeah, already saw that, which is why I said the py2app wasn't thar much > help. That just seems to create a broken .app file. > > You wouldn't happen to know a nice way to interact with the > PythonMac-SIG group without subscribing and subjecting my inbox to rape > by a

Re: py2app and Bittornado

2005-08-30 Thread bsharitt
Yeah, already saw that, which is why I said the py2app wasn't thar much help. That just seems to create a broken .app file. You wouldn't happen to know a nice way to interact with the PythonMac-SIG group without subscribing and subjecting my inbox to rape by a bunch of useless messages would you?

Re: Question about threading.Lock().aquire(waitflag)

2005-08-30 Thread Tim Peters
[EMAIL PROTECTED] > is treated as a boolean or as a number. > > Running on Windows, I get two different behaviors from > the following calls to acquire: > > aLock = threading.Lock() > ... > > # Thread 0 > # This one often succeeds > aLock.acquire(1) > ... > > # Thread 1 > # When

Question about threading.Lock().aquire(waitflag)

2005-08-30 Thread [EMAIL PROTECTED]
It's not clear to me from the Python docs whether waitflag is treated as a boolean or as a number. Running on Windows, I get two different behaviors from the following calls to acquire: aLock = threading.Lock() ... # Thread 0 # This one often succeeds aLock.acquire(1) ... #

Re: Yielding a chain of values

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 23:12:35 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Tue, 30 Aug 2005 12:18:59 GMT, Michael Hudson <[EMAIL PROTECTED]> wrote: >> >>>Talin <[EMAIL PROTECTED]> writes: >>> I'm finding that a lot of places within my code, I want to retu

Re: py2app and Bittornado

2005-08-30 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I'm trying to get Bittornado to run on Mac OS X (10.4 with Python > 2.3.5) but I've only ever dealt with Python at lower lever scripting > stuff, never wxPython or another GUI stuff. py2app is supposed to be > the tool to create Mac friendly Python applications(like py2ex

py2app and Bittornado

2005-08-30 Thread bsharitt
I'm trying to get Bittornado to run on Mac OS X (10.4 with Python 2.3.5) but I've only ever dealt with Python at lower lever scripting stuff, never wxPython or another GUI stuff. py2app is supposed to be the tool to create Mac friendly Python applications(like py2exe on Windows), but the documentat

RE: micro-python - is it possible?

2005-08-30 Thread Delaney, Timothy (Tim)
Wouter van Ooijen (www.voti.nl) wrote: >> No, not a tiny microcontroller environment. In the >> microcontroller world, "tiny" means 100 bytes of ram and 4KB of >> code space. > > That's medium :) > > PIC10F200: 256 12-bit instructions, 16 bytes RAM. Show off. Tim Delaney -- http://mail.pytho

Re: Bicycle Repair Man usability

2005-08-30 Thread matt
Eclipse's java refactoring tool puts BRM to shame. This probably has a lot to do with the static typing of Java and the JDTs nice built in compiler. When doing Java development the refactoring support is really nice (and using a nice ide make's java development almost as easy as python, since the

Re: Jargons of Info Tech industry

2005-08-30 Thread Mark McIntyre
On 30 Aug 2005 18:06:48 GMT, in comp.lang.c , John Bokma <[EMAIL PROTECTED]> wrote: >Mark McIntyre <[EMAIL PROTECTED]> wrote: > >>Its a complete mystery. Just as is the reason why you are x-posting >>complete garbage to comp.lang.c... > >A similar mystery as in why Mark clueless n00b II McIntyre t

Re: Problem with string -> int conversion ?

2005-08-30 Thread Fredrik Lundh
Madhusudan Singh wrote: > I am working with an application that I designed with the Designer > pyuic > workflow and I get the following error on trying to process the contents > of > a combobox : > > Traceback (most recent call last): > File "measure.py", line 908, in acquiredata >np=self.ge

Re: Precise timings ?

2005-08-30 Thread Fernando Perez
Madhusudan Singh wrote: > Madhusudan Singh wrote: > >> Hi >> >> I am using time.clock() to get the current time of the processor in >> seconds. For my application, I need really high resolution but currently >> seem to be limited to 0.01 second. Is there a way to specify the >> resolution (say 1

Bicycle Repair Man usability

2005-08-30 Thread Rex Eastbourne
Are there any Bicycle Repair Man users here? I recently got PyDev for Eclipse, which comes with BRM. I am disappointed with what I've seen, although I'm not sure if I'm using its full functionality. According to PyDev's documentation, this is what one can do: -Rename a function/variable -Block of

Problem with string -> int conversion ?

2005-08-30 Thread Madhusudan Singh
Hi I am working with an application that I designed with the Designer > pyuic workflow and I get the following error on trying to process the contents of a combobox : Traceback (most recent call last): File "measure.py", line 908, in acquiredata np=self.getNPrange() File "measure.py", li

Re: OpenSource documentation problems

2005-08-30 Thread Benji York
Terry Hancock wrote: > OTOH, there are lots of poorly-documented third-party Python > modules (as in any language). Zope is a particularly nasty > example -- though I think I understand some of the reasons > behind that (rapidly changing API, poor interaction with doc > tools, etc). Are you refe

Bicycle Repair Man usability

2005-08-30 Thread Rex Eastbourne
Are there any Bicycle Repair Man users here? I recently got PyDev for Eclipse, which comes with BRM. I am disappointed with what I've seen, although I'm not sure if I'm using its full functionality. According to PyDev's documentation, this is what one can do: -Rename a function/variable -Block of

Re: pyGame - Logitech rumble pad input OS X (10.3.9)

2005-08-30 Thread Terry Hancock
On Tuesday 30 August 2005 03:17 pm, kjm wrote: > I have modified/written a small piece of code that initializes the > joystick, and pygame does recognize it. I was wondering if someone has > a small snippet of code to get me going? I have posted the code I'm > using to initialize the joystick, pl

Re: OpenSource documentation problems

2005-08-30 Thread Terry Hancock
On Tuesday 30 August 2005 02:32 am, Bryan Olson wrote: > I don't see any need to look beyond Python for a good example of > poor documentation. Are there serious Python programmers who > don't constantly struggle with errors and omissions in the doc? Uh, yes, actually. IMHO, the available Python

Re: variable hell

2005-08-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Steve, can I quote you on that? > > "You can lead an idiot to idioms, but you can't make him think!" -- > Steve Holden 2005 > Looks like you just did :-). Feel free. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC htt

Re: Precise timings ?

2005-08-30 Thread Fredrik Lundh
Madhusudan Singh wrote: > time.time() seems to report (using %e to format the o/p) a fixed number of > the order ~1e9. you're confused. time.time() reports the wall time in fractional seconds since the epoch (usually jan 1, 1970). if you take the difference between two calls, you'll find that t

Re: Embedding Matplotlib images into wxPython

2005-08-30 Thread [EMAIL PROTECTED]
Well, to answer my own question, the problem turned out to be that I was using the 'wx' backend and not the 'wxagg' one. Attempting to use the former typically resulted in a not implemented error upon the call to imshow. I was working from an older set of matplotlib example files which didn't inclu

Re: Precise timings ?

2005-08-30 Thread Madhusudan Singh
Bengt Richter wrote: > windows or unix? time.time and time.clock seem to reverse roles as > best-resolution time sources depending on which platform. > Linux. time.time() seems to report (using %e to format the o/p) a fixed number of the order ~1e9. > If you have a pentium with a rdtsc instru

Re: Precise timings ?

2005-08-30 Thread Madhusudan Singh
Madhusudan Singh wrote: > Hi > > I am using time.clock() to get the current time of the processor in > seconds. For my application, I need really high resolution but currently > seem to be limited to 0.01 second. Is there a way to specify the > resolution (say 1-10 microseconds) ? My processor is

Re: Yielding a chain of values

2005-08-30 Thread Reinhold Birkenfeld
Bengt Richter wrote: > On Tue, 30 Aug 2005 12:18:59 GMT, Michael Hudson <[EMAIL PROTECTED]> wrote: > >>Talin <[EMAIL PROTECTED]> writes: >> >>> I'm finding that a lot of places within my code, I want to return the >>> output of a generator from another generator. Currently the only >>> method I kn

Re: What are new-style classes?

2005-08-30 Thread Reinhold Birkenfeld
Colin J. Williams wrote: I recently heard about 'new-style classes'. I am very sorry if this sounds like a newbie question, but what are they? I checked the Python Manual but did not find anything conclusive. Could someone please enlighten me? Thanks! >>> >>>"New style" classes are

Re: py2exe can't compile this program

2005-08-30 Thread billiejoex
Really thank you. It works. -- http://mail.python.org/mailman/listinfo/python-list

Re: variable hell

2005-08-30 Thread [EMAIL PROTECTED]
Steve, can I quote you on that? "You can lead an idiot to idioms, but you can't make him think!" -- Steve Holden 2005 -- http://mail.python.org/mailman/listinfo/python-list

Re: Precise timings ?

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 13:36:57 -0400, Madhusudan Singh <[EMAIL PROTECTED]> wrote: >Hi > >I am using time.clock() to get the current time of the processor in seconds. >For my application, I need really high resolution but currently seem to be >limited to 0.01 second. Is there a way to specify the res

Re: telnet.read_until() from telnetlib

2005-08-30 Thread [EMAIL PROTECTED]
but the 'expect' gives you more details about the failure... read the documentation on telnet objects here: "http://docs.python.org/lib/telnet-objects.html";. It says this specifically: "If end of file is found and no text was read, raise EOFError. Otherwise, when nothing matches, return (-1, None,

Re: Precise timings ?

2005-08-30 Thread Michael Hudson
Madhusudan Singh <[EMAIL PROTECTED]> writes: > Hi > > I am using time.clock() to get the current time of the processor in seconds. > For my application, I need really high resolution but currently seem to be > limited to 0.01 second. Is there a way to specify the resolution (say 1-10 > microsecond

wxpython + ogl

2005-08-30 Thread Andrzej
Hi! I'm writing a simple digital circuit simulator in order to familirise with (wx)python. I thought it would be an easy task with help from ogl lib. After a not so brief encounter with wx specs I've started to code but I just can't figure out how to get user-defined attachment points to work.

Re: Yielding a chain of values

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 12:18:59 GMT, Michael Hudson <[EMAIL PROTECTED]> wrote: >Talin <[EMAIL PROTECTED]> writes: > >> I'm finding that a lot of places within my code, I want to return the >> output of a generator from another generator. Currently the only >> method I know of to do this is to explici

pyGame - Logitech rumble pad input OS X (10.3.9)

2005-08-30 Thread kjm
Hi everyone, I have recently acquired a Logitech Rumble pad to use as an input device. I have been having trouble getting the event que to respond that a button or hat arrow has been pressed. This is on a system running OS 10.3.9. I have modified/written a small piece of code that initializes t

Re: Release of PyPy 0.7.0

2005-08-30 Thread Michael Sparks
Michael Hudson wrote: ... > The chance of any random module you have written being rpython is more > or less zero, so it's not _that_ interesting for you to try to compile > them with PyPy. I know - the code I use contains LOTS of generators for example, which obviously don't fit the requirements

Re: File parser

2005-08-30 Thread Angelic Devil
"Rune Strand" <[EMAIL PROTECTED]> writes: Thanks. This shows definate promise. I've already tailored it for what I need, and it appears to be working. -- "Society in every state is a blessing, but Government, even in its best state, is but a necessary evil; in its worst state, an intolerable

Re: Python2Html regex question

2005-08-30 Thread Fredrik Lundh
Gerard Flanagan wrote: > Either way, the (c#) source is available for the above formatter and it > looks like it would be straightforward to create a Python formatter by > extending a base class and providing the following three things: > > 1) a list of python keywords import keyword print keywor

Lambda with copy.deepcopy()

2005-08-30 Thread Joshua Ginsberg
Howdy -- I have a class that has an attribute that is a dictionary that contains an object that has a kword argument that is a lambda. Confused yet? Simplified example: import copy class Foo: def __init__(self, fn=None): self.fn = fn class Bar: d = {'foobar':

Re: py to exe: suggestions?

2005-08-30 Thread Ivan Shevanski
Not sure if you already got the answer to this lol but since this is one thing about python i do know how to do, use CXFreeze. Its basicly a combination of all the programs you have already tryed. Works great for me =D sorry I dont have a link, just google it. -Ivan __

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread Bengt Richter
On 30 Aug 2005 10:07:06 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-08-30, Terry Reedy schreef <[EMAIL PROTECTED]>: >> >> "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message >> news:[EMAIL PROTECTED] >> >>> Really it's x[-1]'s behavior that should go, not find/rfind. >> >> I

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 11:56:24 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: >Robert Kern wrote: > > Bryan Olson wrote: > > > > > >> Currently, user-defined classes can implement Python > >> subscripting and slicing without implementing Python's len() > >> function. In our proposal, the '$

Re: ANN: PyDev 0.9.8 released

2005-08-30 Thread Max M
Fabio Zadrozny wrote: > Hi Max, > > I may be a little (or maybe a lot) biased for it (as I'm its > maintainer), but as I do 'eat my own dogfood', I though I might share it > with you... Enthusiasm doesn't disqualify ;-) > At my company, everybody that programs with python switched to pydev.

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread Paul Rubin
[EMAIL PROTECTED] (Bengt Richter) writes: > What about if when brackets trail as if attributes, it means > your-style slicing written with colons instead of semicolons? > > sequence.[start : stop : step] This is nice. It gets rid of the whole $1,$2,etc syntax as well. -- http://mail.p

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 08:53:27 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: [...] >Specification > > We propose a new style of slicing and indexing for Python > sequences. Instead of: > > sequence[start : stop : step] > > new-style slicing uses the syntax: > > sequence[star

Re: Python2Html regex question

2005-08-30 Thread Gerard Flanagan
Perfect. Thanks Trent. Gerard -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble with time --again

2005-08-30 Thread nephish
he he. yep, just spent a lot of time on this one. life moves on. cheers! sk -- http://mail.python.org/mailman/listinfo/python-list

Re: micro-python - is it possible?

2005-08-30 Thread Paul Rubin
Evil Bastard <[EMAIL PROTECTED]> writes: > Has anyone done any serious work on producing a subset of python's > language definition that would suit it to a tiny microcontroller > environment? We just had this thread a few weeks ago and you decided to use FORTH that time. The answers are the same

Re: Code run from IDLE but not via double-clicking on its *.py

2005-08-30 Thread n00m
Oops.. not everything so super as I thought. Incredible but from command line it results as: D:\>python23\python d:\python23\00\socket6.py Traceback (most recent call last): File "d:\python23\00\socket6.py", line 1, in ? import socket, thread File "D:\Python23\00\socket.py", line 3, in ?

Re: Jargons of Info Tech industry

2005-08-30 Thread John Bokma
Alan Balmer <[EMAIL PROTECTED]> wrote: > Another obnoxious cross-poster identified. Thank you. You mean Alan clueless n00b Balmer? At least you got the follow up doesn't work the first time. Try to get the other message I wrote as well: ignore this thread, it will stop in 1-2 days out of itself

Re: Jargons of Info Tech industry

2005-08-30 Thread John Bokma
Mark McIntyre <[EMAIL PROTECTED]> wrote: >Its a complete mystery. Just as is the reason why you are x-posting >complete garbage to comp.lang.c... A similar mystery as in why Mark clueless n00b II McIntyre thinks it's a good idea to cross post to all other groups except comp.lang.c? Again: stop

Re: reg email packages work

2005-08-30 Thread Steve Holden
Sybren Stuvel wrote: > Steve Holden enlightened us with: > >>It's obvious you aren't using that EXACT code, because it doesn't >>formulate a three-paragraph message. So the bit we really need to >>see is how you capture and formulate the argument to set_payload(). > > > I'd rather see what I ask

Re: trouble with time --again

2005-08-30 Thread Kristian Zoerhoff
On 30 Aug 2005 10:54:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > i feel like a complete idiot. Now don't go and do that. Mistakes happen. -- Kristian kristian.zoerhoff(AT)gmail.com zoerhoff(AT)freeshell.org -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble with time --again

2005-08-30 Thread nephish
OH my god. youre right. i feel like a complete idiot. thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-08-30 Thread Alan Balmer
On Tue, 30 Aug 2005 11:30:19 GMT, [EMAIL PROTECTED] wrote: >In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote: >> Alan Balmer <[EMAIL PROTECTED]> wrote: > >>> On 29 Aug 2005 21:12:13 GMT, John Bokma <[EMAIL PROTECTED]> wrote: > > Now, go away. And please, stay away. > Like I al

Re: SpamBayes wins PCW Editors Choice Award for anti-spam software.

2005-08-30 Thread Steve Holden
Alan Kennedy wrote: > Hi All, > > If there any contributors of SpamBayes reading, Congratulations! To which I add mine, even though I normally try to avoid "me too" posts. The software is a great achievement, and deserves popular success. > [...] > The only problem was they listed the "manuf

Re: trouble with time --again

2005-08-30 Thread Kristian Zoerhoff
On 30 Aug 2005 10:42:41 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hey there, > could someone show me where i am going wrong here? > > >>> date1 = '2005-01-01 8:20:00' > >>> date1 = strptime('%Y-%m-%d %H:%M:%S',date1) > > raise ValueError("time data did not match format: data=%s fmt=

Re: global interpreter lock

2005-08-30 Thread Bengt Richter
On Tue, 30 Aug 2005 05:15:34 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: >Mike Meyer wrote: > > Bryan Olson <[EMAIL PROTECTED]> writes: > >> > Bryan Olson writes: > >> > Trivially, an 'if' statement that depends upon input > >> >>data is statically predictable. Use of async I/O means makes the > >

trouble with time --again

2005-08-30 Thread nephish
Hey there, could someone show me where i am going wrong here? >>> date1 = '2005-01-01 8:20:00' >>> date1 = strptime('%Y-%m-%d %H:%M:%S',date1) raise ValueError("time data did not match format: data=%s fmt=%s" % ValueError: time data did not match format: data=%Y-%m-%d%H:%M:%S fmt=2005-01-01 8:

Re: how to join two Dictionary together?

2005-08-30 Thread Aahz
In article <[EMAIL PROTECTED]>, DENG <[EMAIL PROTECTED]> wrote: > >dict1={...something...} >dict2={...somethind else ..} >dict1 + dict2 Another option to look into: if you're only using the dict keys and not the valus, maybe you should use sets. -- Aahz ([EMAIL PROTECTED]) <*> h

Re: variable hell

2005-08-30 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>Yes. A large part of learning a language is discovering the many idioms >>that have already been established for doing certain things. These are a >>kind of shorthand, established by long convention, that allow one to >>avoid the "learning-by-use"

Precise timings ?

2005-08-30 Thread Madhusudan Singh
Hi I am using time.clock() to get the current time of the processor in seconds. For my application, I need really high resolution but currently seem to be limited to 0.01 second. Is there a way to specify the resolution (say 1-10 microseconds) ? My processor is a 1.4 MHz Intel processor. Surely, i

Re: Python2Html regex question

2005-08-30 Thread Trent Mick
[Gerard Flanagan wrote] > I've been using the Html Formatter at > http://www.manoli.net/csharpformat to format c# code (paste your code > into the box, click the button and get html/css). Is there anything > similar for Python code, does anyone know? Checkout SilverCity: http://silvercity.sou

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing, was Re: Bug in slice type

2005-08-30 Thread Steve Holden
Antoon Pardon wrote: > Op 2005-08-29, Steve Holden schreef <[EMAIL PROTECTED]>: > >>Antoon Pardon wrote: >> >>>Op 2005-08-27, Steve Holden schreef <[EMAIL PROTECTED]>: >>> >>> If you want an exception from your code when 'w' isn't in the string you should consider using index() rather tha

Python2Html regex question

2005-08-30 Thread Gerard Flanagan
Hello I've been using the Html Formatter at http://www.manoli.net/csharpformat to format c# code (paste your code into the box, click the button and get html/css). Is there anything similar for Python code, does anyone know? Either way, the (c#) source is available for the above formatter and it

Re: Writing Multithreaded Client-Server in Python.

2005-08-30 Thread Steve Holden
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > >>What it does do, is handle each request (from the same client too) in a >>new separate thread. Convenient if your processing intensive handle may >>otherwise slow down the main server process becoming less responsive to >>other requests. >>What it

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-08-30 Thread phil hunt
On Tue, 30 Aug 2005 08:53:27 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: > Specifically, to support new-style slicing, a class that > accepts index or slice arguments to any of: > > __getitem__ > __setitem__ > __delitem__ > __getslice__ > __setslice__

Re: micro-python - is it possible?

2005-08-30 Thread Michael Hudson
Magnus Lycka <[EMAIL PROTECTED]> writes: > Evil Bastard wrote: >> Hi, >> Has anyone done any serious work on producing a subset of python's >> language definition that would suit it to a tiny microcontroller >> environment? > > Isn't pypy meant to support different backends with different > requir

py2exe can't compile this program

2005-08-30 Thread Uwe Schmitt
> > Hi all. I tried to compile this little source with py2exe: > http://pastebin.com/350143 > ...but once I execute the program I encount this error: > > C:\src\dist>sniffer.exe > Traceback (most recent call last): > File "sniffer.py", line 24, in ? > File "sniffer.py", line 18, in get_int >

Re: File parser

2005-08-30 Thread Mike C. Fletcher
infidel wrote: >Angelic Devil wrote: > > ... >Some time ago I was toying around with writing a tool in python to >parse our VB6 code (the original idea was to write our own .NET >conversion tool because the Wizard that comes with VS.NET sucks hard on >some things). I tried various parsing tool

Embedding Matplotlib images into wxPython

2005-08-30 Thread [EMAIL PROTECTED]
I am trying to embed images into a wxPython app (created using Boa Constructor), but have not been able to do so. I know how to embed plots, but images seem to be a problem. I've tried using code analogous to the example given at the Matplotlib website to no avail. If anybody has been successful at

Re: ANN: PyDev 0.9.8 released

2005-08-30 Thread Fabio Zadrozny
Hi Max, I may be a little (or maybe a lot) biased for it (as I'm its maintainer), but as I do 'eat my own dogfood', I though I might share it with you... At my company, everybody that programs with python switched to pydev. Most people used 'highly customized' text-editors before pydev, as the

Re: Code run from IDLE but not via double-clicking on its *.py

2005-08-30 Thread n00m
Thank you, guys, for your replies! Now it works! -- http://mail.python.org/mailman/listinfo/python-list

Re: global interpreter lock

2005-08-30 Thread phil hunt
On Sun, 28 Aug 2005 19:25:55 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >Bryan Olson <[EMAIL PROTECTED]> writes: >> phil hunt wrote: >> > Yes, find solutions. Don't find dangerous dead-ends that look like >> > solutions but which will give you lots of trouble. >> If concurrency is a dead end, w

Re: global interpreter lock

2005-08-30 Thread phil hunt
On Sun, 28 Aug 2005 20:34:07 GMT, Bryan Olson <[EMAIL PROTECTED]> wrote: >phil hunt wrote: > > Yes, find solutions. Don't find dangerous dead-ends that look like > > solutions but which will give you lots of trouble. > >If concurrency is a dead end, why do the programs that provide >the most sophis

Re: pydoc, best practices, and Data class

2005-08-30 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > I have a python program that I am trying to generate documentation for. > But in one of my files I have a class called "Data", when pydoc gets to > this class it just barfs. Well more specifically it generates > documentation for only that one class in the file, it ignore

Re: What are new-style classes?

2005-08-30 Thread Colin J. Williams
Reinhold Birkenfeld wrote: > Terry Hancock wrote: > >>On Sunday 28 August 2005 04:47 am, Vaibhav wrote: >> >>>I recently heard about 'new-style classes'. I am very sorry if this >>>sounds like a newbie question, but what are they? I checked the Python >>>Manual but did not find anything conclusive

Re: Problem with select.poll and popen2

2005-08-30 Thread Magnus Lycka
Magnus Lycka wrote: > I'm trying to read standard out in a process started with popen2 > in a non-blocking way. (Other good ways of doing this than the > one I tried are appreciated.) I'm starting to get on top of this. First of all, I was confused by POLLIN and POLLOUT, since it's IN or OUT of th

Re: micro-python - is it possible?

2005-08-30 Thread Magnus Lycka
Evil Bastard wrote: > Hi, > > Has anyone done any serious work on producing a subset of python's > language definition that would suit it to a tiny microcontroller > environment? Isn't pypy meant to support different backends with different requirements and constraints using the same basic langua

py2exe can't compile this program

2005-08-30 Thread billiejoex
Hi all. I tried to compile this little source with py2exe: http://pastebin.com/350143 ...but once I execute the program I encount this error: C:\src\dist>sniffer.exe Traceback (most recent call last): File "sniffer.py", line 24, in ? File "sniffer.py", line 18, in get_int LookupError: no codec

  1   2   >