Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread Richard Heathfield
Peter J. Holzer said: > It is possible that the observatory at Greenwich still keeps and > announces GMT, but it has no practical importance anymore. Certainly > what everybody (except specialists in the field) means when they talk > about "GMT" is UTC. I am not a specialist in the field. When

Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread Ben Finney
CBFalconer <[EMAIL PROTECTED]> writes: > "Peter J. Holzer" wrote: > > Hardly. That hasn't been in use for over 35 years (according to > > Wikipedia). > > I am glad to see you depend on absolutely reliable sources. Wikipedia is not an absolutely reliable source. I know of no "absolutely resliable

Re: Unbound Local error --???

2007-07-04 Thread Gabriel Genellina
(Please keep posting on the list - I don't read this account too often) At Friday 29/06/2007 22:03, you wrote: > But what i am asking in particular is, how python > interpretes when we initialize a variable with a > name same as a method name ? for ex: > > def f(): > > ... x = g() > ... g = '

Re: unify els database

2007-07-04 Thread rbsharp
On Jul 3, 2:25 pm, luca72 <[EMAIL PROTECTED]> wrote: > Hello and thanks for your answer, the unify db is on unix-sco and i > need to connect with linux machine with python > > Regards > > Luca Hello, perhaps I introduced the confusion by using the word "connect" ambiguously. What I do is to direct

ignoring a part of returned tuples

2007-07-04 Thread noamtm
Hi, Some functions, like os.walk(), return multiple items packed as a tuple: for (dirpath, dirnames, filenames) in os.walk(...): Now, if you don't care about one of the tuple members, is there a clean way to ignore it, in a way that no unused variable is being created? What I wanted is: for (di

Re: ignoring a part of returned tuples

2007-07-04 Thread Justin Ezequiel
On Jul 4, 4:08 pm, noamtm <[EMAIL PROTECTED]> wrote: > What I wanted is: > for (dirpath, , filenames) in os.walk(...): > > But that doesn't work. for (dirpath, _, filenames) in os.walk(...): -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Paul Rubin
greg <[EMAIL PROTECTED]> writes: > > E.g. your program might pass its test and run properly for years > > before some weird piece of input data causes some regexp to not quite > > work. > > Then you get a bug report, you fix it, and you add a test > for it so that particular bug can't happen again

Re: ignoring a part of returned tuples

2007-07-04 Thread Bruno Desthuilliers
noamtm a écrit : > Hi, > > Some functions, like os.walk(), return multiple items packed as a > tuple: > > for (dirpath, dirnames, filenames) in os.walk(...): > > Now, if you don't care about one of the tuple members, is there a > clean way to ignore it, Yes : just ignore it !-) > in a way that

Re: Python IRC bot using Twisted

2007-07-04 Thread ddtm
On 3, 20:08, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 15:51:30 -, ddtm <[EMAIL PROTECTED]> wrote: > >On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: > >> >On 3, 16:01, Je

windows cetificates

2007-07-04 Thread m.banaouas
hi, is there any way to decrypt an email (already read with poplib, so available on client side) with python using a window certificate (those we can see on ie/internet options/content/certificates) ? the purpose is to decrypt an email sent and crypted by the sender with both his own certifica

Re: what is wrong with that r"\"

2007-07-04 Thread Nick Craig-Wood
Neil Cerutti <[EMAIL PROTECTED]> wrote: > From the Python Language Reference 2.4.1 String Literals: > > When an "r" or "R" prefix is present, a character following a > backslash is included in the string without change, and all > backslashes are left in the string. For example, the st

Re: what is wrong with that r"\"

2007-07-04 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 3, 7:15 am, alf <[EMAIL PROTECTED]> wrote: > > question without words: > > > > >>> r"\" > >File "", line 1 > > r"\" > > ^ > > SyntaxError: EOL while scanning single-quoted string > > >>> r"\ " > > '\\ ' > > One slash escape

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : > greg <[EMAIL PROTECTED]> writes: >>> E.g. your program might pass its test and run properly for years >>> before some weird piece of input data causes some regexp to not quite >>> work. >> Then you get a bug report, you fix it, and you add a test >> for it so that particular

Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Chaps, Is there a command I can run to confirm which version of python I'm running? Another thing I've always wondered, should i be running my applications using './MyFile.py' or 'Python MyFile.Py' what are the benefits of each method? One thing I have noticed is that when I used 'Pyt

Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Chaps, Is there a command I can run to confirm which version of python I'm running? Another thing I've always wondered, should i be running my applications using './MyFile.py' or 'Python MyFile.Py' what are the benefits of each method? One thing I have noticed is that when I used 'Pyt

Re: Which Python Version

2007-07-04 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > Is there a command I can run to confirm which version of python I'm running? From outside Python: python -V (that's a capital V) From inside Python: import sys print sys.version (and a couple of more easily parseable alternatives; look at the sy

RE: Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Thanks Tim, Greatly appreciated, I've been having a few problems with one of my apps recently crashing at all sorts of odd intervals without throwing an error or anything like that, So I'm upgrading to 2.5 to see if they'll make life any simpler. Thanks mate, Rob -Original Message- From

Re: what is wrong with that r"\"

2007-07-04 Thread Neil Cerutti
On 2007-07-04, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: >> String quotes can be escaped with a backslash, but the >> backslash remains in the string; for example, r"\"" is a >> valid string literal consisting of two characters: a >> backslash and a double quote; > > a) That is wei

Generator for k-permutations without repetition

2007-07-04 Thread bullockbefriending bard
I was able to google a recipe for a k_permutations generator, such that i can write: x = range(1, 4) # (say) [combi for combi in k_permutations(x, 3)] => [[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1, 2, 3], [1, 3, 1], [1, 3, 2], [1, 3, 3], [2, 1, 1], [2, 1, 2], [2, 1, 3], [2, 2, 1

Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Chaps, Is there a command I can run to confirm which version of python I'm running? Another thing I've always wondered, should i be running my applications using './MyFile.py' or 'Python MyFile.Py' what are the benefits of each method? One thing I have noticed is that when I used 'Pyt

Re: what is wrong with that r"\"

2007-07-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jul 2007 11:21:14 +, Neil Cerutti wrote: > If the escaped quotes didn't function in raw strings, I'd be > unable to construct (with a single notation) a regex that > included both kinds of quotes at once. > > re.compile(r"'\"") Where's the problem!? :: re.compile(r"''')

issues with htmlparser.getpos

2007-07-04 Thread dysmas
Hi, Im having an issue with HTMLParser, the getpos() funtion sometimes returns things like : (1, 1247) (1, 2114) (1, 2168) (1, 2228) (1, 2295) (1, 2382) (1, 2441) (1, 2963) (1, 3040) i guess this is because the HTMLParser has not correctly parsed the newline characters in the string fed to it..

Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Chaps, Is there a command I can run to confirm which version of python I'm running? Another thing I've always wondered, should i be running my applications using './MyFile.py' or 'Python MyFile.Py' what are the benefits of each method? One thing I have noticed is that when I used 'Pyt

using subprocess for non-terminating command

2007-07-04 Thread Phoe6
Hi all, Consider this scenario, where in I need to use subprocess to execute a command like 'ping 127.0.0.1' which will have a continuous non- terminating output in Linux. # code >>>import subprocess >>>process = subprocess.Popen('ping 127.0.0.1', shell=True, >>>stdin=subprocess.PIPE, stdout=subp

Re: what is wrong with that r"\"

2007-07-04 Thread Duncan Booth
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Does anyone know the justification for a)? Maybe we should remove it > in py3k? > I think at least part of the justification is that it keeps the grammar simple. The tokenising happens identically irrespective of any modifiers. The r modifier doesn

Which Python Version

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Chaps, Is there a command I can run to confirm which version of python I'm running? Another thing I've always wondered, should i be running my applications using './MyFile.py' or 'Python MyFile.Py' what are the benefits of each method? One thing I have noticed is that when I used 'Pyt

Re: Generator for k-permutations without repetition

2007-07-04 Thread Gerard Flanagan
On Jul 4, 1:22 pm, bullockbefriending bard <[EMAIL PROTECTED]> wrote: > I was able to google a recipe for a k_permutations generator, such > that i can write: > > x = range(1, 4) # (say) > [combi for combi in k_permutations(x, 3)] => > > [[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1,

Re: using subprocess for non-terminating command

2007-07-04 Thread zacherates
> How should I handle these kind of commands (ping 127.0.0.1) with > subprocess module. I am using subprocess, instead of os.system because > at anypoint in time, I need access to stdout and stderr of execution. Ping, for one, allows you to set an upper bound on how long it runs (the -c option).

Re: Generator for k-permutations without repetition

2007-07-04 Thread Nis Jørgensen
bullockbefriending bard skrev: > I was able to google a recipe for a k_permutations generator, such > that i can write: > > x = range(1, 4) # (say) > [combi for combi in k_permutations(x, 3)] => > > [[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1, 2, 3], [1, > 3, 1], [1, 3, 2], [1, 3

Re: what is wrong with that r"\"

2007-07-04 Thread Matthieu TC
May I suggest giving the possibility to use any delimiter for a raw string? just like in Vi or ruby. Vi: %s_a_b_g is valid and so is %s/a/b/g Ruby: %q{dj'\ks'a\'"} or %q-dj'\ks'a\'"- So as long as your regex does not use all the valid characters, readability is maintained. -matt -

GObject and Python 2.5

2007-07-04 Thread Robert Rawlins - Think Blue
Hello Guys, Firstly I should apologise for all the mails that keep landing on the list, my SMTP server (supplied by my ISP) seems to be playing silly buggers and sending multiples. I've just installed Python 2.5 on my Debian system and I'm trying to run my application and I get 'ImportError

Re: Debugging "broken pipe" (in telnetlib)

2007-07-04 Thread Samuel
Thanks for your comments, Jean-Paul. -- http://mail.python.org/mailman/listinfo/python-list

Re: Generator for k-permutations without repetition

2007-07-04 Thread bullockbefriending bard
On Jul 4, 7:09 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > bullockbefriending bard skrev: > > > > > I was able to google a recipe for a k_permutations generator, such > > that i can write: > > > x = range(1, 4) # (say) > > [combi for combi in k_permutations(x, 3)] => > > > [[1, 1, 1], [1, 1, 2

Re: ActivePython

2007-07-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Jul 4, 2:03 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: >> Frank Swarbrick <[EMAIL PROTECTED]> wrote: >>> Why might one choose to use ActivePython instead of using the free CPython? >> I believe ActivePython is also free, and it's packaged up differently >> (with more

Re: ignoring a part of returned tuples

2007-07-04 Thread noamtm
On Jul 4, 11:29 am, Bruno Desthuilliers wrote: > A common idiom is to use '_' for unused values, ie: > > for (dirpath, _, filenames) in os.walk(...): That's what I need - this avoids PyLint telling me that I have an unused variable, and also makes it clear that this value is not used. Thanks!

Re: issues with htmlparser.getpos

2007-07-04 Thread Steve Holden
dysmas wrote: > Hi, > > > Im having an issue with HTMLParser, the getpos() funtion sometimes > returns things like : > > (1, 1247) > (1, 2114) > (1, 2168) > (1, 2228) > (1, 2295) > (1, 2382) > (1, 2441) > (1, 2963) > (1, 3040) > > i guess this is because the HTMLParser has not correctly parsed

Re: what is wrong with that r"\"

2007-07-04 Thread Steve Holden
Matthieu TC wrote: > May I suggest giving the possibility to use any delimiter for a raw string? > just like in Vi or ruby. > Of course you may. Thank you for your suggestion. Now, on to other business. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Lt

Re: issues with htmlparser.getpos

2007-07-04 Thread rokadvertising
Steve, thanks for reply there are newlines present, it looks like the files in question are from a mac, (my text editor tells me they are UTF8 & use CR for marking newlines) Cheers -- http://mail.python.org/mailman/listinfo/python-list

CGI vs WSGI

2007-07-04 Thread tuom . larsen
Dear all, what is the difference? Middleware? I'm wondering because the only variables I ever needed were PATH_INFO, REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should be available from CGI, too. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Generator for k-permutations without repetition

2007-07-04 Thread Nis Jørgensen
bullockbefriending bard skrev: > On Jul 4, 7:09 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote: >> bullockbefriending bard skrev: >> A quick solution, not extensively tested >> >> # base needs to be an of the python builtin set >> >> def k_perm(base,k): >> for e in base: >>

Re: CGI vs WSGI

2007-07-04 Thread Michele Simionato
On Jul 4, 2:49 pm, [EMAIL PROTECTED] wrote: > Dear all, > > what is the difference? Middleware? Yes, and also the fact that you have a large choice of WSGI web frameworks to choose from. CGI looks so much 20th century ... ;) Michele Simionato -- http://mail.python.org/mailman/listinfo/python

Re: issues with htmlparser.getpos

2007-07-04 Thread rokadvertising
On Jul 4, 1:47 pm, [EMAIL PROTECTED] wrote: > Steve, > > thanks for reply > > there are newlines present, it looks like the files in question are > from a mac, (my text editor tells me they are UTF8 & use CR for > marking newlines) > > Cheers d0h, f = open(this_file,"U")

Proposal: s1.intersects(s2)

2007-07-04 Thread David Abrahams
Here's an implementation of the functionality I propose, as a free-standing function: def intersects(s1,s2): if len(s1) < len(s2): for x in s1: if x in s2: return True else: for x in s2: if x i

Re: ignoring a part of returned tuples

2007-07-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jul 2007 05:25:01 -0700, noamtm wrote: > On Jul 4, 11:29 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > >> A common idiom is to use '_' for unused values, ie: >> >> for (dirpath, _, filenames) in os.walk(...): > > That's what I need - this avoids PyLint telling me that I have an

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Roy Smith
greg <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > E.g. your program might pass its test and run properly for years > > before some weird piece of input data causes some regexp to not quite > > work. > > Then you get a bug report, you fix it, and you add a test > for it so that particular bu

Re: Python 2.5 from source without tcl/tk

2007-07-04 Thread Florian Demmer
ok... cannot get rid of the "INFO: Can't locate Tcl/Tk libs and/or headers". Now same thing but weirder with curses: i do not have ncurses-devel installed. still make trys to compile the curses module. how do i prevent that? imo the configure should have more with/without switches... or do i just

Re: Proposal: s1.intersects(s2)

2007-07-04 Thread Thomas Jollans
On Wednesday 04 July 2007, David Abrahams wrote: > Here's an implementation of the functionality I propose, as a > free-standing function: > > def intersects(s1,s2): > if len(s1) < len(s2): > for x in s1: > if x in s2: return True >

[mostly OT] mod_python & doc file system layout

2007-07-04 Thread Jan Danielsson
Hello all, This is probably more of an apache question, but I'm guessing there will be other mod_python-beginners who are wondering the same thing. Let's say I have a web app called MyApp. It uses the usual images and style sheets. I keep it all in ~/projects/MyApp/{styles,images,index.py,

Re: using subprocess for non-terminating command

2007-07-04 Thread O.R.Senthil Kumaran
* zacherates <[EMAIL PROTECTED]> [2007-07-04 12:09:03]: > > How should I handle these kind of commands (ping 127.0.0.1) with > > subprocess module. I am using subprocess, instead of os.system because > > at anypoint in time, I need access to stdout and stderr of execution. > > Ping, for one, allo

Re: Proposal: s1.intersects(s2)

2007-07-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jul 2007 16:18:58 +0200, Thomas Jollans wrote: > On Wednesday 04 July 2007, David Abrahams wrote: >> Right now, the only convenient thing to do is >> >> if s1 & s2 ... >> >> but that builds a whole new set. IMO that query should be available >> as a method of set itself. >

Re: Proposal: s1.intersects(s2)

2007-07-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jul 2007 09:59:24 -0400, David Abrahams wrote: > Here's an implementation of the functionality I propose, as a > free-standing function: > > def intersects(s1,s2): > if len(s1) < len(s2): > for x in s1: > if x in s2: return True >

reading email using django

2007-07-04 Thread filox
i've just installed django and it seems pretty cool. i've managed to send an email succesfully, but i didn't find any information on reading email. is that even possible with django (e.g. open my gmail inbox and read mail from it)? -- You're never too young to have a Vietnam flashback -- h

Re: using subprocess for non-terminating command

2007-07-04 Thread Jerry Hill
On 7/4/07, O.R.Senthil Kumaran <[EMAIL PROTECTED]> wrote: > Yes, I am aware of the ping -c option. But again even that does not help. > try > process = subprocess.Popen('ping -c 10 127.0.0.1', stdin=subprocess.PIPE, > shell=True) > process.stdout.read() # This will hang again. When I try that, it

Re: Memory leak issue with complex data structure

2007-07-04 Thread Josiah Carlson
Alan Franzoni wrote: > I have a root node which is not referenced by any other node. So, I > created a "clear()" method which is called on all children (by calling > their clear() method" and then clears the set with the references of the > node itself. Using the .clear() method on sets (or dictio

Re: CGI vs WSGI

2007-07-04 Thread Josiah Carlson
[EMAIL PROTECTED] wrote: > I'm wondering because the only variables I ever needed were PATH_INFO, > REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should > be available from CGI, too. CGI starts up a new process for every request, using stdin/stdout for passing information. I beli

Re: Python's "only one way to do it" philosophy isn't good?

2007-07-04 Thread Jorgen Grahn
On Fri, 29 Jun 2007 12:53:49 -0400, Douglas Alan <[EMAIL PROTECTED]> wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > >> "Python" doesn't *have* any refcounting semantics. > > I'm not convinced that Python has *any* semantics at all outside of > specific implementations. It has never been stand

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Alex Martelli
Roy Smith <[EMAIL PROTECTED]> wrote: > greg <[EMAIL PROTECTED]> wrote: > > > Paul Rubin wrote: > > > E.g. your program might pass its test and run properly for years > > > before some weird piece of input data causes some regexp to not quite > > > work. > > > > Then you get a bug report, you fix

Memory leak issue with complex data structure

2007-07-04 Thread Alan Franzoni
Hello, I've got a complex data structure (graph-like). Each of my nodes may reference zero or more other nodes, internally managed by a set() object. I have a root node which is not referenced by any other node. So, I created a "clear()" method which is called on all children (by calling their cle

Re: using subprocess for non-terminating command

2007-07-04 Thread Steve Holden
O.R.Senthil Kumaran wrote: > * zacherates <[EMAIL PROTECTED]> [2007-07-04 12:09:03]: > >>> How should I handle these kind of commands (ping 127.0.0.1) with >>> subprocess module. I am using subprocess, instead of os.system because >>> at anypoint in time, I need access to stdout and stderr of exec

Re: Reversing a string

2007-07-04 Thread Aahz
In article <[EMAIL PROTECTED]>, Martin Durkin <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Alex Martelli) wrote in >news:[EMAIL PROTECTED]: >> >> So, something like: >> >> for c in reversed(x): print c >> >> is mostly likely how I'd present the solution to the task. > >This is an interesting

Help search files

2007-07-04 Thread Alejandro Decchi
Hello Someone can help me how to search file in a directory. I need to do a form where the user write the word to search and if the file was found the user must could download the file making click in the link Sorry my english thz Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: what is wrong with that r"\"

2007-07-04 Thread Neil Cerutti
On 2007-07-04, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-07-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Wed, 04 Jul 2007 11:21:14 +, Neil Cerutti wrote: >> >>> If the escaped quotes didn't function in raw strings, I'd be >>> unable to construct (with a single notation)

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Paul Rubin
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Because static type checks impose a lot of arbitrary restrictions, > boilerplate code etc, which tends to make code more complicated than > it needs to be, which is a good way of introducing bugs that wouldn't > have existed without static type chec

Re: Reversing a string

2007-07-04 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: ... > This works in all versions of Python back to 1.5.2 IIRC. reversed() is > a moderately new built-in function; Yep: it came with Python 2.4, first alpha just 4 years ago, final release about 3 years and 8 months ago. "Moderately new" seems an appropriate ta

Re: what is wrong with that r"\"

2007-07-04 Thread Neil Cerutti
On 2007-07-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 04 Jul 2007 11:21:14 +, Neil Cerutti wrote: > >> If the escaped quotes didn't function in raw strings, I'd be >> unable to construct (with a single notation) a regex that >> included both kinds of quotes at once. >> >

Re: ActivePython

2007-07-04 Thread Trent Mick
Frank Swarbrick wrote: > Why might one choose to use ActivePython instead of using the free CPython? Expanding on what Alex already said, there are a few reasons: 1. On Windows, ActivePython also includes the PyWin32 [1] extensions which otherwise you'd have to install separately over a python.o

Re: How can i change an Object type ?

2007-07-04 Thread kyosohma
On Jul 4, 12:40 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > KuhlmannSascha <[EMAIL PROTECTED]> wrote: > > >i tried now for several hours to read through a win32com API to access > >Itunes and read out myplaylists. > > >First of all the Code: > >... > >The current Logic is to access first Itunes an

Re: ActivePython

2007-07-04 Thread Steve Holden
Trent Mick wrote: > Frank Swarbrick wrote: [...] > Steve Holden wrote: > > ...the last time I looked the ActivePython distribution > > doesn't allow redistribution at all (i.e. it's not technically open > > source). > > Steve is correct that ActivePython isn't open source. It is free (as in >

Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread James Harris
On 1 Jul, 15:11, "Peter J. Holzer" <[EMAIL PROTECTED]> wrote: ... > Stick to unix timestamps but store them as a double precision floating > point number. The 53 bit mantissa gives you currently a resolution of > about 200 ns, slowly deteriorating (you will hit ms resolution in about > 280,000 year

Does Python work with QuickBooks SDK?

2007-07-04 Thread walterbyrd
My guess is that it would, but I can find no mention of python in the intuit developers site. I can find some references to PHP and Perl, but no Python. I looks to me like Intuit develops have a strong preference for visual- basic, then c/c++, then delphi. I find it just a little bit surprising,

Re: Interest in a one-day business conference for Python, Zope and Plone companies ?

2007-07-04 Thread Thomas Heller
eGenix Team: M.-A. Lemburg schrieb: > Hello, > > eGenix is looking into organizing a one day conference > specifically for companies doing business with Python, Zope and > Plone. The conference will likely be held in or close to > Düsseldorf, Germany, which is lively medium-sized city, with good >

Re: object references/memory access

2007-07-04 Thread John Nagle
Karthik Gurusamy wrote: > On Jul 2, 10:57 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >I have found the stop-and-go between two processes on the same machine >leads to very poor throughput. By stop-and-go, I mean the producer and >consumer are constantly getting on and off of th

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Paul Boddie
Paul Rubin wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > > Because static type checks impose a lot of arbitrary restrictions, > > boilerplate code etc, which tends to make code more complicated than > > it needs to be, which is a good way of introducing bugs that wouldn't > > have exis

Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread James Harris
On 3 Jul, 06:12, Scott David Daniels <[EMAIL PROTECTED]> wrote: ... > Inspired format: > Days since a some standard date (the TAI date may be a good such > date) expressed as fixed point 64-bit (32-bit day part, 32-bit > day-fraction part) or floating point (using Intel's double-precision, > f

ReSTedit ported to Linux?

2007-07-04 Thread Helmut Jarausch
Hi, does anybody know if ReSTedit (originally for Mac OS X) has been ported to Linux? Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread John Nagle
Paul Boddie wrote: > Paul Rubin wrote: > > The campaign for optional > static typing in Python rapidly became bogged down in this matter, > fearing that any resulting specification for type information might > not be the right combination of flexible and powerful to fit in with > the rest of the l

Re: using subprocess for non-terminating command

2007-07-04 Thread O.R.Senthil Kumaran
* Jerry Hill <[EMAIL PROTECTED]> [2007-07-04 11:23:33]: > > That's because you tied stdin to a pipe in your Popen call, but then > tried to read from stdout. Try this instead: My mistake. I had just 'typed' the command in the mail itself and forgot to include the stdin, stdout, and stderr and

Re: Help search files

2007-07-04 Thread Mariano Mara
Alejandro Decchi escribió: > Hello Someone can help me how to search file in a directory. I need to > do a form where the user write the word to search and if the file was > found the user must could download the file making click in the link > Sorry my english > thz > Alex > You could try os.wa

Re: Does Python work with QuickBooks SDK?

2007-07-04 Thread kyosohma
On Jul 4, 1:51 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > My guess is that it would, but I can find no mention of python in the > intuit developers site. I can find some references to PHP and Perl, > but no Python. > > I looks to me like Intuit develops have a strong preference for visual- > basi

Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread O.R.Senthil Kumaran
Following is a tk code, which will display a checkbutton, and when checkbox is enabled, it will show the below present Label. What I was trying is, when checkbox is enabled the Label should be shown and when checkbox is disabled, the window should look like before. But, I am finding that once ena

Find This Module

2007-07-04 Thread [EMAIL PROTECTED]
I'm looking at the source for the module sre_compile.py and it does this import: import _sre But I can't find a file related to _sre anywhere. Where is it? And more generally, how does one find the location of a built in module? Thanks, Greg -- http://mail.python.org/mailman/listinfo/python

Re: Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread Wojciech Muła
O.R.Senthil Kumaran wrote: > Any suggestions on how can i make this checkbutton effect. > 1) Press Enable IP, the Label IP should be shown. > 2) Toggle Enable IP (So that its unset). the Label IP should not be shown. > > #!/usr/bin/python > from Tkinter import * > root = Tk() > root.title('somethi

Re: using subprocess for non-terminating command

2007-07-04 Thread zacherates
> Only when the program has executed and the output available, subprocess can > read through PIPE's stdout it seems ( not at any other time). > With killing, I loose the output. This is untrue. >>> process.stdout.read() # Blocks until end of stream. >>> process.stdout.read(1) # Reads one character

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > This has been tried. Original K&R C had non-enforced static typing. > All "struct" pointers were equivalent. It wasn't pretty. > > It takes strict programmer discipline to make non-enforced static > typing work. I've seen it work in an aerospac

Re: CGI vs WSGI

2007-07-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Dear all, > > what is the difference? Middleware? > > I'm wondering because the only variables I ever needed were PATH_INFO, > REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should > be available from CGI, too. > > Thanks. > WSGI is intented as a ga

Re: Does Python work with QuickBooks SDK?

2007-07-04 Thread [EMAIL PROTECTED]
On Jul 4, 2:51 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > My guess is that it would, but I can find no mention of python in the > intuit developers site. I can find some references to PHP and Perl, > but no Python. > > I looks to me like Intuit develops have a strong preference for visual- > basi

Re: 15 Exercises to Know A Programming Language

2007-07-04 Thread Martin
On Jul 3, 1:47 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Jul 3, 7:58 pm, Martin <[EMAIL PROTECTED]> wrote: > > > > > I am trying to improve my Python skills through some exercises. > > Currently I am working on Larry's "15 exercises to know a programming > > language " (http://www.knowing.net

Re: Find This Module

2007-07-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jul 2007 20:00:07 +, [EMAIL PROTECTED] wrote: > I'm looking at the source for the module sre_compile.py and it does > this import: > > import _sre > > But I can't find a file related to _sre anywhere. Where is it? And > more generally, how does one find the location of a built i

AIML, Python, Java

2007-07-04 Thread Boris Ozegovic
Hi I have a chatterbot written in AIML. I am using PyAIML, and HTTP server as a mediator between user and PyAIML. Server calls PyAIML, and sends the result string to the sensor network which is written in Java; and in the end, server returns value from Java method. Can I somehow call Java metho

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >>Because static type checks impose a lot of arbitrary restrictions, >>boilerplate code etc, which tends to make code more complicated than >>it needs to be, which is a good way of introducing bugs that wouldn't >>have existe

Re: Does Python work with QuickBooks SDK?

2007-07-04 Thread walterbyrd
Thanks to Greg and Mike. I am not looking for specifics right now. I was just wondering if there was a practical way to do use python to integrate with intuit apps. Apparently, there is. -- http://mail.python.org/mailman/listinfo/python-list

Re: using subprocess for non-terminating command

2007-07-04 Thread prikar20
On Jul 4, 12:29 pm, "O.R.Senthil Kumaran" <[EMAIL PROTECTED]> wrote: > * Jerry Hill <[EMAIL PROTECTED]> [2007-07-04 11:23:33]: > > > > > That's because you tied stdin to a pipe in your Popen call, but then > > tried to read from stdout. Try this instead: > > My mistake. I had just 'typed' the co

deleated bios?

2007-07-04 Thread acprkit
Hi I have an ibm thinkpad x23, and shut it down about an hour ago. When I went to reboot , all the lights come on then they go off and only the light with the z in a circle stays on. The screen stays blank and the hard drive spins. Could I have deleated the bios when I added memory (shocked the mo

Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread Peter J. Holzer
On 2007-07-04 18:46, James Harris <[EMAIL PROTECTED]> wrote: > On 1 Jul, 15:11, "Peter J. Holzer" <[EMAIL PROTECTED]> wrote: > ... >> Stick to unix timestamps but store them as a double precision floating >> point number. The 53 bit mantissa gives you currently a resolution of >> about 200 ns, slow

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Paul Rubin
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Haskell - as other languages using type-inference like OCaml - are in > a different category. Yes, I know, don't say it, they are statically > typed - but it's mostly structural typing, not declarative > typing. Which makes them much more usable IMH

Re: Reversing a string

2007-07-04 Thread Jan Vorwerk
Martin Durkin a écrit , le 02.07.2007 06:38: > This is an interesting point to me. I am just learning Python and I > wonder how I would know that a built in function already exists? > At what point do I stop searching for a ready made solution to a > particular problem and start programming my o

Re: using subprocess for non-terminating command

2007-07-04 Thread Karthik Gurusamy
On Jul 4, 4:38 am, Phoe6 <[EMAIL PROTECTED]> wrote: > Hi all, > Consider this scenario, where in I need to use subprocess to execute a > command like 'ping 127.0.0.1' which will have a continuous non- > terminating output in Linux. > > # code > > >>>import subprocess > >>>process = subprocess.Popen

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >>Haskell - as other languages using type-inference like OCaml - are in >>a different category. Yes, I know, don't say it, they are statically >>typed - but it's mostly structural typing, not declarative >>typing. Which makes

MethodType/FunctionType and decorators

2007-07-04 Thread Alex Popescu
Hi all! I am pretty new to Python, so please excuse me if I am missing something. Lately, I've been playing with decorators and I am a bit confused about some behavior. Here is the code that puzzles me: in python shell: def function(): pass class A(object): def method(self): pass from

Re: Portable general timestamp format, not 2038-limited

2007-07-04 Thread James Harris
On 4 Jul, 22:18, "Peter J. Holzer" <[EMAIL PROTECTED]> wrote: ... > But it really doesn't matter much. If you ignore leap seconds, using > days instead of seconds is just a constant factor (in fact, the unix > timestamp ignores leap seconds, too, so it's always a constant factor). > You can't repre

  1   2   >