Re: Python compilation ??

2007-07-02 Thread Cathy Murphy
Ahh!! lots of thoughts!! Thanks guys!! -- Cathy www.nachofoto.com On 7/2/07, John Nagle <[EMAIL PROTECTED]> wrote: Evan Klitzke wrote: > On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: > >> Is python a compiler language or interpreted language. If it is >> interpreter >> , then why do we h

Re: Portable general timestamp format, not 2038-limited

2007-07-02 Thread Peter J. Holzer
On 2007-07-03 05:12, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Peter J. Holzer wrote: >> On 2007-06-22 20:33, James Harris <[EMAIL PROTECTED]> wrote: >>> I have a requirement to store timestamps in a database. Simple enough >>> you might think but finding a suitably general format is not eas

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

2007-07-02 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > I do have (some of:-) that experience, and am reasonably at ease in > Haskell (except when it comes to coding monads, which I confess I still > have trouble wrapping my head around). I recently found the article http://en.wikibooks.org/wiki/Haskell/Ca

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

2007-07-02 Thread John Nagle
Alex Martelli wrote: > Donn Cave <[EMAIL PROTECTED]> wrote: > > >>In article <[EMAIL PROTECTED]>, >> [EMAIL PROTECTED] (Alex Martelli) wrote: >> >> >>>"Dynamic typing is recommended", they conclude, "when programs must be >>>as flexible as possible". I recommend reading the Agile Manifesto to >>

Re: object references/memory access

2007-07-02 Thread Martin v. Löwis
>>> 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 the CPU since the pipe >>> gets full (or empty for consumer). Note that a producer can't run at >>>

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

2007-07-02 Thread Lenard Lindstrom
Douglas Alan wrote: > Lenard Lindstrom <[EMAIL PROTECTED]> writes: > >> But some things will make it into ISO Python. > > Is there a movement afoot of which I'm unaware to make an ISO standard > for Python? > Not that I know of. But it would seem any language that lasts long enough will become

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

2007-07-02 Thread Lenard Lindstrom
Douglas Alan wrote: > Lenard Lindstrom <[EMAIL PROTECTED]> writes: > >>> Or are you suggesting that early in __main__.main(), when I wish to >>> debug something, I do something like: >>>__builtins__.open = __builtins__.file = MyFile >>> ? >>> I suppose that would work. > >> No, I would never

Re: Portable general timestamp format, not 2038-limited

2007-07-02 Thread Scott David Daniels
Peter J. Holzer wrote: > On 2007-06-22 20:33, James Harris <[EMAIL PROTECTED]> wrote: >> I have a requirement to store timestamps in a database. Simple enough >> you might think but finding a suitably general format is not easy. The >> specifics are >> >> 1) subsecond resolution - milliseconds or,

Re: Rappresenting infinite

2007-07-02 Thread John Nagle
Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > >>float('inf') works well, no? > It is not cross-platform. The parsing of strings into floats and the string > representation of floats is dependent on your system's C library. For these > special values, this differs across platforms. Your code

Re: Python compilation ??

2007-07-02 Thread John Nagle
Evan Klitzke wrote: > On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: > >> Is python a compiler language or interpreted language. If it is >> interpreter >> , then why do we have to compile it? > > > It's an interpreted language. It is compiled into bytecode (not > machine code) the first ti

ZSI Web Service Call

2007-07-02 Thread Stevo
Hi There, I'm looking for an example of a simple SOAP web service call using the Zolera SOAP Infrastructure library. The web service I am trying to call contains a method that is supposed to accept a string as a parameter and output it to a file. I have tried the following and I am able to create

Re: object references/memory access

2007-07-02 Thread urielka
if both the search server and the web server/script are in the same computer you could use POSH(http://poshmodule.sourceforge.net/) for memory sharing or if you are in UNIX you can use mmap. this is way faster than using sockets and doesn`t require the serialization/deserialization step. -- http:

Re: what is the PythonWin

2007-07-02 Thread O.R.Senthil Kumaran
* Cameron Laird <[EMAIL PROTECTED]> [2007-07-02 17:27:31]: > >PythonWin is a separate project by Mark Hammond providing win32 extensions > >for > >python. > > > >http://sourceforge.net/projects/pywin32/ > . > . > . > I believe the

Re: good matlab interface

2007-07-02 Thread felix seltzer
my problems where more with scipy, which i needed for pymat. scipy gives two import errors (but still imports), and then pymat cant find the libraries that scipy provides. ohwell... i think i can just modify it to work with numpy untill i can sort out the errors. thanks, -felix On 7/2/07, Bria

Re: Tiny/small/minimalist Python?

2007-07-02 Thread Paul Rubin
Irmen de Jong <[EMAIL PROTECTED]> writes: > Back in the days my port of Python to the Commodore Amiga machine ran > quite comfortably on a 50 mhz CPU with 4 Mb of RAM. (ok ok it was > Python 1.5.2, that has to be said). Even that sounds way too slow. Kyoto Common Lisp started in a few seconds on

try/finally in threads

2007-07-02 Thread George Sakkis
I posted this on the Pyro list but I'm not sure if it's related specifically to Pyro. The "finally" clause below is not executed when f() runs on on a (daemon) thread and the program exits. DAEMON here is a global Pyro.code.Daemon instance. def f(): try: DAEMON.requestLoop() finally:

Re: The file executing

2007-07-02 Thread Justin Ezequiel
On Jul 3, 9:40 am, Benjamin <[EMAIL PROTECTED]> wrote: > How does one get the path to the file currently executing (not the > cwd). Thank you os.path.dirname(sys.argv[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-02 Thread Karthik Gurusamy
On Jul 2, 6:32 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Karthik Gurusamy wrote: > > On Jul 2, 3:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Karthik Gurusamy wrote: > >>> On Jul 1, 12:38 pm, dlomsak <[EMAIL PROTECTED]> wrote: > >> [...] > > >>> I have found the stop-and-go between two p

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

2007-07-02 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Alex Martelli) wrote: > > > "Dynamic typing is recommended", they conclude, "when programs must be > > as flexible as possible". I recommend reading the Agile Manifesto to > > understand why maximal flex

Re: Tiny/small/minimalist Python?

2007-07-02 Thread rtk
On Jul 2, 6:26 pm, Irmen de Jong <[EMAIL PROTECTED]> wrote: > Back in the days my port of Python to the Commodore Amiga machine ran > quite comfortably on a 50 mhz CPU with 4 Mb of RAM. (ok ok it was > Python 1.5.2, that has to be said). > Python started in about 5 seconds on that Amiga if I rememb

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

2007-07-02 Thread Douglas Alan
Lenard Lindstrom <[EMAIL PROTECTED]> writes: >> Also, any caught exception is automatically cleared when >> the catching procedure returns anyway, so it's not like Python has >> ever considered a caught exception to be precious information that >> ought to be preserved long past the point where it

The file executing

2007-07-02 Thread Benjamin
How does one get the path to the file currently executing (not the cwd). Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-02 Thread Steve Holden
Karthik Gurusamy wrote: > On Jul 2, 3:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> Karthik Gurusamy wrote: >>> On Jul 1, 12:38 pm, dlomsak <[EMAIL PROTECTED]> wrote: >> [...] >> >>> I have found the stop-and-go between two processes on the same machine >>> leads to very poor throughput. By sto

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

2007-07-02 Thread Douglas Alan
Lenard Lindstrom <[EMAIL PROTECTED]> writes: >> I'm not sure I understand you here. You're saying that I should have >> the foresight to wrap all my file opens is a special class to >> facilitate debugging? > Obviously you had the foresight to realize with statements could > compromise debugging

Re: Programming Idiomatic Code

2007-07-02 Thread attn . steven . kuo
On Jul 2, 5:22 pm, "Nathan Harmston" <[EMAIL PROTECTED]> wrote: > Hi, > > I m sorry but I m bored at work (and no ones looking so I can write > some Python) and following a job advertisement post,I decided to write > the code to do its for the one entitled Ninjas or something like that. > I was won

Re: Probably simple syntax error

2007-07-02 Thread Dustin MacDonald
Ah. Thank you everyone. Sorry for not replying earlier, real life got in the way :) Gerry Herron, Tim Delaney, Mark Peters: Thank you. Switching from parentheses to square brackets fixed the code, and yes, Tim, you were right. It was a list I was working with. And thanks for those links Tim. John

How to FTP a ASCII file

2007-07-02 Thread [EMAIL PROTECTED]
Hi, My program has the following code to transfer a binary file f = open(pathanme+filename,'rb') print "start transfer" self.fthHandle.storbinary('STOR '+filename, f) How can I do an ASCII file transfer?? -Ted -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Idiomatic Code

2007-07-02 Thread Steve Lianoglou
I don't know about idiomatic, but here's a quick list of somethings I'd change. 1) In general, I don't think it's a good idea for a called function to blow out the system on error. So, in this example, I wouldn't have raised errors be caught in the same function only to call os.exit. I'd either de

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

2007-07-02 Thread Lenard Lindstrom
Douglas Alan wrote: > Lenard Lindstrom <[EMAIL PROTECTED]> writes: > >>> You don't necessarily want a function that raises an exception to >>> deallocate all of its resources before raising the exception, since >>> you may want access to these resources for debugging, or what have >>> you. > >> N

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

2007-07-02 Thread Lenard Lindstrom
Douglas Alan wrote: > Lenard Lindstrom <[EMAIL PROTECTED]> writes: > Explicitly clear the exception? With sys.exc_clear? > >>> Yes. Is there a problem with that? > >> As long as nothing tries to re-raise the exception I doubt it breaks >> anything: >> >> >>> import sys >> >>> try: >>

Re: Tiny/small/minimalist Python?

2007-07-02 Thread Irmen de Jong
Paul Rubin wrote: > rtk <[EMAIL PROTECTED]> writes: >> FYI.. I wanted a simple version of Python to run on an ancient DEC >> Alpha box. I got VMS Python 2.5 up and running but it is too slow to >> use. It takes *minutes* to get the interpreter prompt after typing >> 'python'! > > Something is w

Re: Pretty Scheme, ??? Python

2007-07-02 Thread Paul McGuire
On Jul 2, 6:28 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Jul 2, 3:56 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > > > > > > On 2007-07-02, Laurent Pointal <[EMAIL PROTECTED]> wrote: > > > > Neil Cerutti wrote: > > >> How can I make the Python more idiomatic Python? > > > > Have you taken

Re: Probably simple syntax error

2007-07-02 Thread John Machin
On Jul 3, 9:04 am, Dustin MacDonald <[EMAIL PROTECTED]> wrote: > And Cameron: Ah, yes. It does reduce the confusion. I do know that > square brackets are used for *creating* a dictionary (blah = ["A", > "B", "C"], That's a list, not a dictionary. > so I figured the same would apply to accessing

Re: Tiny/small/minimalist Python?

2007-07-02 Thread rtk
On Jul 2, 9:43 am, Paul Rubin wrote: > rtk <[EMAIL PROTECTED]> writes: > > FYI.. I wanted a simple version of Python to run on an ancient DEC > > Alpha box. I got VMS Python 2.5 up and running but it is too slow to > > use. It takes *minutes* to get the interpreter prom

Re: How to FTP a ASCII file

2007-07-02 Thread Adonis Vargas
[EMAIL PROTECTED] wrote: > Hi, > > My program has the following code to transfer a binary file > > f = open(pathanme+filename,'rb') > print "start transfer" > self.fthHandle.storbinary('STOR '+filename, f) > > How can I do an ASCII file transfer?? > -Ted > Taken fro

Re: Pretty Scheme, ??? Python

2007-07-02 Thread Paul McGuire
On Jul 2, 3:56 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-07-02, Laurent Pointal <[EMAIL PROTECTED]> wrote: > > > Neil Cerutti wrote: > >> How can I make the Python more idiomatic Python? > > > Have you taken a look at pyparsing ? > > Yes, I have it. PyParsing has, well, so many convenie

Re: object references/memory access

2007-07-02 Thread Karthik Gurusamy
On Jul 2, 3:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Karthik Gurusamy wrote: > > On Jul 1, 12:38 pm, dlomsak <[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

Re: How to FTP a ASCII file

2007-07-02 Thread John Machin
On Jul 3, 9:02 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > My program has the following code to transfer a binary file > > f = open(pathanme+filename,'rb') > print "start transfer" > self.fthHandle.storbinary('STOR '+filename, f) > > How can I do an ASCII fi

Programming Idiomatic Code

2007-07-02 Thread Nathan Harmston
Hi, I m sorry but I m bored at work (and no ones looking so I can write some Python) and following a job advertisement post,I decided to write the code to do its for the one entitled Ninjas or something like that. I was wondering what could be done to my following code to make it more idiomatic...

Re: Correct abstraction for TK

2007-07-02 Thread Adonis Vargas
[EMAIL PROTECTED] wrote: > I'm looking for a good example of how to correctly abstract TK code > from the rest of my program. I want to just get some user info and > then get 4 values from the GUI. Right now I've written it OOP per the > examples on python.org but it doesn't seem to be meshing very

Re: subprocess -- broken pipe error

2007-07-02 Thread Steve Holden
7stud wrote: > On Jul 2, 2:12 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> a) Who told you pipes should be unbuffered by default, and b) what difference >> does that make anyway? >> > > a) The docs. > > b) If the pipes were buffered then writing a small amount of data like > "text3" to the pipe

Re: subprocess -- broken pipe error

2007-07-02 Thread Steve Holden
7stud wrote: > On Jul 2, 1:58 pm, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: >> 7stud wrote: >>> Thanks for the response. So are you saying that the only way you >>> can get data out of a pipe is when the subprocess has terminated? >> No, not only because Pipes aren't related to processes in a

Re: Python compilation ??

2007-07-02 Thread Steve Holden
Jean-Paul Calderone wrote: > On Mon, 02 Jul 2007 16:14:41 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >> Evan Klitzke wrote: >>> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: Is python a compiler language or interpreted language. If it is interpreter , then why do we have to compi

Re: object references/memory access

2007-07-02 Thread Steve Holden
Karthik Gurusamy wrote: > On Jul 1, 12:38 pm, dlomsak <[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 the CPU since t

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

2007-07-02 Thread Steve Holden
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Alex Martelli) wrote: > >> "Dynamic typing is recommended", they conclude, "when programs must be >> as flexible as possible". I recommend reading the Agile Manifesto to >> understand why maximal flexibility is crucial in

Correct abstraction for TK

2007-07-02 Thread luke . hoersten
I'm looking for a good example of how to correctly abstract TK code from the rest of my program. I want to just get some user info and then get 4 values from the GUI. Right now I've written it OOP per the examples on python.org but it doesn't seem to be meshing very well with the rest of my project

Re: Pretty Scheme, ??? Python

2007-07-02 Thread Neil Cerutti
On 2007-07-02, Laurent Pointal <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> How can I make the Python more idiomatic Python? > > Have you taken a look at pyparsing ? Yes, I have it. PyParsing has, well, so many convenience features they seem to shout down whatever the core features are, and

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

2007-07-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > "Dynamic typing is recommended", they conclude, "when programs must be > as flexible as possible". I recommend reading the Agile Manifesto to > understand why maximal flexibility is crucial in most real-world > applica

Dynamic Language Ninja (or Pirate) - Telecommuting Allowed

2007-07-02 Thread [EMAIL PROTECTED]
I searched for old messages containing job posts, and saw no one complaining, so I assume it is ok to post here. Please accept my apologies if it is not. That said, here's our position! Dynamic Language Ninja (or Pirate) Etsy is an online marketplace for buying and selling all things handmade: cl

python script for monitoring input/output parameters of online gaming client

2007-07-02 Thread jj kk
Hi, I'd like to be able to capture parameters of online gaming client applications (the kind of client software you install to play poker, backgammon... online) with the aim of writing python software that analyzes this data. I'm clueless, as I know next to nothing about python networking. Could

python script for monitoring input/output parameters of online gaming client

2007-07-02 Thread jj kk
Hi, I'd like to be able to capture parameters of online gaming client applications (the kind of client software you install to play poker, backgammon... online) with the aim of writing python software that analyzes this data. I'm clueless, as I know next to nothing about python networking. Could

Re: Python compilation ??

2007-07-02 Thread Jean-Paul Calderone
On Mon, 02 Jul 2007 16:14:41 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >Evan Klitzke wrote: >> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >>> Is python a compiler language or interpreted language. If it is interpreter >>> , then why do we have to compile it? >> >> It's an interpreted l

Re: subprocess -- broken pipe error

2007-07-02 Thread 7stud
On Jul 2, 2:12 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > a) Who told you pipes should be unbuffered by default, and b) what difference > does that make anyway? > a) The docs. b) If the pipes were buffered then writing a small amount of data like "text3" to the pipe would cause the other side

Re: howto resend args and kwargs to other func?

2007-07-02 Thread Duncan Booth
Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > Frank Swarbrick <[EMAIL PROTECTED]> wrote: >>dmitrey wrote: >>> Thanks all, I have solved the problem. >>Why do people do this without posting what the actual solution is > > Hey, if we're expected to magically deduce what the problem is > without

Re: Python compilation ??

2007-07-02 Thread Michael Hoffman
Steve Holden wrote: > Evan Klitzke wrote: >> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >>> Is python a compiler language or interpreted language. If it is >>> interpreter >>> , then why do we have to compile it? >> >> It's an interpreted language. It is compiled into bytecode (not >> mach

Re: Bug in Python class static variable?

2007-07-02 Thread Duncan Booth
Bruza <[EMAIL PROTECTED]> wrote: > On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> Bruza <[EMAIL PROTECTED]> wrote: >> > I am trying to define a class static variable. But the value of the >> > static variable seems to be only defined inside the file that the >> > class is declared.

Re: Pretty Scheme, ??? Python

2007-07-02 Thread Laurent Pointal
Neil Cerutti wrote: ... > How can I make the Python more idiomatic Python? Have you taken a look at pyparsing ? http://pyparsing.wikispaces.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-02 Thread Karthik Gurusamy
On Jul 1, 12:38 pm, dlomsak <[EMAIL PROTECTED]> wrote: > Thanks for the responses folks. I'm starting to think that there is > merely an inefficiency in how I'm using the sockets. The expensive > part of the program is definitely the socket transfer because I timed > each part of the routine indivi

Re: Python compilation ??

2007-07-02 Thread Steve Holden
Evan Klitzke wrote: > On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >> Is python a compiler language or interpreted language. If it is interpreter >> , then why do we have to compile it? > > It's an interpreted language. It is compiled into bytecode (not > machine code) the first time a scrip

Re: subprocess -- broken pipe error

2007-07-02 Thread Steve Holden
7stud wrote: > Why doesn't the following program write to the file? > > driver.py > --- > import subprocess as sub > > p = sub.Popen(["python", "-u", "test1.py"], stdin=sub.PIPE, > stdout=sub.PIPE) > > > p.stdin.write("text3") > > while True: > pass > --- > > test1.py: > -

Re: subprocess -- broken pipe error

2007-07-02 Thread 7stud
On Jul 2, 2:03 pm, Bjoern Schliessmann wrote: > 7stud wrote: > > Why doesn't the following program write to the file? > > [...] > > It just hangs, and then when I hit Ctrl+C and look in the file, > > the data isn't in there. > > Also, the pipe may be unbuffered by > default; file access isn't. >

Re: subprocess -- broken pipe error

2007-07-02 Thread 7stud
On Jul 2, 1:58 pm, Bjoern Schliessmann wrote: > 7stud wrote: > > Thanks for the response. So are you saying that the only way you > > can get data out of a pipe is when the subprocess has terminated? > > No, not only because Pipes aren't related to processes in any > special way. > > He said that

Re: subprocess -- broken pipe error

2007-07-02 Thread Bjoern Schliessmann
7stud wrote: > Why doesn't the following program write to the file? > [...] > It just hangs, and then when I hit Ctrl+C and look in the file, > the data isn't in there. I suppose your running child process isn't closed cleanly if you terminate the parent process. Also, the pipe may be unbuffered

Re: subprocess -- broken pipe error

2007-07-02 Thread Bjoern Schliessmann
7stud wrote: > Thanks for the response. So are you saying that the only way you > can get data out of a pipe is when the subprocess has terminated? No, not only because Pipes aren't related to processes in any special way. He said that you can't write to a pipe whose reader has already terminat

Re: Bug in Python class static variable?

2007-07-02 Thread Bruza
On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Bruza <[EMAIL PROTECTED]> wrote: > > I am trying to define a class static variable. But the value of the > > static variable seems to be only defined inside the file that the > > class is declared. See the code below. When I run "python w

Re: Rappresenting infinite

2007-07-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > float('inf') works well, no? > >>>> inf = float('inf') >>>> inf / inf >nan >>>> -inf >-inf >>>> inf / 0 >ZeroDivisionError: float division >>>> 1 / inf >0.0 >>>> 0 * float('inf') >nan It is not cross-platform. The parsing of

Re: need help with win32com

2007-07-02 Thread kyosohma
On Jul 2, 11:38 am, Thomas <[EMAIL PROTECTED]> wrote: > I want to be able to access an excel file and extract the code from > the macro that is in the file. How can I do this? > > -- > ~Thomas~ You should be able to use PythonWin and the makepy utility to get handles to the Excel object. See the

Re: subprocess -- broken pipe error

2007-07-02 Thread 7stud
Why doesn't the following program write to the file? driver.py --- import subprocess as sub p = sub.Popen(["python", "-u", "test1.py"], stdin=sub.PIPE, stdout=sub.PIPE) p.stdin.write("text3") while True: pass --- test1.py: - import sys data = sys.stdin.read() f = open("a

Re: Rappresenting infinite

2007-07-02 Thread [EMAIL PROTECTED]
On Jun 27, 6:41 am, andrea <[EMAIL PROTECTED]> wrote: > I would like to have a useful rappresentation of infinite, is there > already something?? > > I was thinking to something like this > > class Inf(int): > """numero infinito""" > def __init__(self,negative=False): >

Re: sort pygtk gtktreeview column containing dates

2007-07-02 Thread Jan Vorwerk
Hi, I did something similar already in wxPython, but not yet in PyGTK. Therefore I cannot provide the actual solution... Since noone answered, I will still give you a hint : http://www.pygtk.org/pygtk2tutorial/sec-TreeModelInterface.html See 14.2.9. Sorting TreeModel Rows and set_sort_func(so

Re: Python compilation ??

2007-07-02 Thread Evan Klitzke
On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: > Is python a compiler language or interpreted language. If it is interpreter > , then why do we have to compile it? It's an interpreted language. It is compiled into bytecode (not machine code) the first time a script is run to speed up subsequen

Python compilation ??

2007-07-02 Thread Cathy Murphy
Is python a compiler language or interpreted language. If it is interpreter , then why do we have to compile it? Python newbie -- Cathy www.nachofoto.com -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess -- broken pipe error

2007-07-02 Thread 7stud
On Jul 2, 11:32 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 2, 1:12 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > Can someone explain what a broken pipe is? The following produces a > > broken pipe error: > > > -- > > import subprocess as sub > > > p = sub.Popen(

Re: what is the PythonWin

2007-07-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, O.R.Senthil Kumaran <[EMAIL PROTECTED]> wrote: >* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2007-07-01 15:53:30]: > >> In PythonWin, select Tools | COM MakePy utility | Microsoft Speech >> Object Library 5.1). >> >> I can't find PythonWin .. Does anybody know what this

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

2007-07-02 Thread Douglas Alan
Lenard Lindstrom <[EMAIL PROTECTED]> writes: >> You don't necessarily want a function that raises an exception to >> deallocate all of its resources before raising the exception, since >> you may want access to these resources for debugging, or what have >> you. > No problem: > > [...] > > >>> c

Re: The best platform and editor for Python

2007-07-02 Thread kimiraikkonen
Thanks for the replies so far. Also i have to learn: What is the most reliable and easy way to start learning Ptyhon? Books? Trusted code sammples(where?)? I know the importance and eases of Python quiet. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

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

2007-07-02 Thread Douglas Alan
Lenard Lindstrom <[EMAIL PROTECTED]> writes: >>> Explicitly clear the exception? With sys.exc_clear? >> Yes. Is there a problem with that? > As long as nothing tries to re-raise the exception I doubt it breaks > anything: > > >>> import sys > >>> try: > raise StandardError("Hello") > ex

Re: subprocess -- broken pipe error

2007-07-02 Thread [EMAIL PROTECTED]
On Jul 2, 1:12 pm, 7stud <[EMAIL PROTECTED]> wrote: > Hi, > > Can someone explain what a broken pipe is? The following produces a > broken pipe error: > > -- > import subprocess as sub > > p = sub.Popen(["ls", "-al", "../"], stdin=sub.PIPE, stdout=sub.PIPE) > > print p.stdout.read() > #out

Re: The best platform and editor for Python

2007-07-02 Thread kimiraikkonen
On Jul 2, 3:49 pm, evil tabby cat <[EMAIL PROTECTED]> wrote: > On Jul 2, 5:10 am, kimiraikkonen <[EMAIL PROTECTED]> wrote: > > > Hi, > > For experienced with Pyhton users, which developing software and > > enviroment would you suggest for Pyhton programming? Compiler+Editor > > +Debugger. > > > Als

Pretty Scheme, ??? Python

2007-07-02 Thread Neil Cerutti
The following simple language parser and interpreter is from chapter 2 of the textbook: _Programming Languages: Application and Interpretation_, by Shriram Krishnamurthi. http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/ First, I'll show the Scheme version of the program, which uses the c

Re: Rappresenting infinite

2007-07-02 Thread andrea
Mm very interesting thread, for my needs from numpy import inf is more than enough :) -- http://mail.python.org/mailman/listinfo/python-list

Re: howto resend args and kwargs to other func?

2007-07-02 Thread Sion Arrowsmith
Frank Swarbrick <[EMAIL PROTECTED]> wrote: >dmitrey wrote: >> Thanks all, I have solved the problem. >Why do people do this without posting what the actual solution is Hey, if we're expected to magically deduce what the problem is without being told an error messages, surely we can magically

subprocess -- broken pipe error

2007-07-02 Thread 7stud
Hi, Can someone explain what a broken pipe is? The following produces a broken pipe error: -- import subprocess as sub p = sub.Popen(["ls", "-al", "../"], stdin=sub.PIPE, stdout=sub.PIPE) print p.stdout.read() #outputs the files correctly p.stdin.write("ls\n") #IOError: [Errno 32] Bro

Re: Probably simple syntax error

2007-07-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mark Peters <[EMAIL PROTECTED]> wrote: . . . >Square brackets indicate the index into a sequence (like a list) > I'm wary of this line, especially in isolation. I hope it reduces, rather than

Re: Problem with PEXPECT in Python

2007-07-02 Thread Noah
Kevin Erickson wrote: > On Jun 30, 5:50 pm, Kevin Erickson <[EMAIL PROTECTED]> wrote: > > #Begin Code > > > > import sys > > import pexpect > > > > def GetServerData(self): > > foo = pexpect.spawn('scp [EMAIL PROTECTED]:/home/config/ > > role{/file1,/files/file2,/files/file3} /tmp') >

need help with win32com

2007-07-02 Thread Thomas
I want to be able to access an excel file and extract the code from the macro that is in the file. How can I do this? -- ~Thomas~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Portable general timestamp format, not 2038-limited

2007-07-02 Thread John W. Kennedy
Martin Gregorie wrote: > Roedy Green wrote: >> >> To add to the confusion you have GPS, Loran and Julian day also used >> as scientific times. > > > GPS time is UTC time No it isn't. GPS has never introduced a leap second, and is still on uncorrected UTC-as-of-1980. However, the GPS signal also

Re: Reading stdout and stderr of an external program

2007-07-02 Thread Ben Cartwright
> I need to be able to read the stdout and stderr streams of an external > program that I launch from my python script. os.system( 'my_prog' + > '>& err.log' ) and was planning on monitoring err.log and to display > its contents. Is this the best way to do this? from subprocess import Popen stdout

Re: Reading stdout and stderr of an external program

2007-07-02 Thread Thomas Jollans
On Monday 02 July 2007, Murali wrote: > Hi Python programmers, > > I need to be able to read the stdout and stderr streams of an external > program that I launch from my python script. os.system( 'my_prog' + > '>& err.log' ) and was planning on monitoring err.log and to display > its contents. Is t

Re: Tiny/small/minimalist Python?

2007-07-02 Thread Paul Rubin
rtk <[EMAIL PROTECTED]> writes: > FYI.. I wanted a simple version of Python to run on an ancient DEC > Alpha box. I got VMS Python 2.5 up and running but it is too slow to > use. It takes *minutes* to get the interpreter prompt after typing > 'python'! Something is wrong. Maybe it's trying to

Reading stdout and stderr of an external program

2007-07-02 Thread Murali
Hi Python programmers, I need to be able to read the stdout and stderr streams of an external program that I launch from my python script. os.system( 'my_prog' + '>& err.log' ) and was planning on monitoring err.log and to display its contents. Is this the best way to do this? Thanks, Murali. --

Re: Tiny/small/minimalist Python?

2007-07-02 Thread rtk
On Jul 1, 10:12 pm, Paul Rubin wrote: > You've gotten good suggestions about Python configurations. Depending > on your application you might look at alternative languages as well. > Lua and Hedgehog Lisp both come to mind as small embedded interpreters. PyMite will get

Python-URL! - weekly Python news and links (Jul 2)

2007-07-02 Thread Cameron Laird
QOTW: "Modules are objects too - they're a good example of singletons. If you want to create a class containing only static methods: use a module instead. If you want to create a class having a single instance (a singleton), most of the time you can use a module instead. Functions don't *have* to

Re: Probably simple syntax error

2007-07-02 Thread ptn
> > Problem 6: big_randomized_int can only have values in 0, 1, ..., 98, > 99. So small_randomized_int will have the value 0, always. > > Perhaps you meant: > small_randomised_float = big_randomized_int / 100.0 > > > small_randomized_int = Round(small_randomized_int, 2) > > # R

Re: object references/memory access

2007-07-02 Thread dlomsak
Okay, Im back at work and got to put some of these suggestions to use. cPickle is doing a great job a hiking up the serialization rate and cutting out the +=data helped a lot too. The entire search process now for this same data set is down to about 4-5 seconds from pressing 'search' to having the

unify els database

2007-07-02 Thread luca72
Hello How i can use to connect to a unify els database with python Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

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

2007-07-02 Thread eGenix Team: M.-A. Lemburg
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 airport connections world-wide and specifically t

Re: Python changing keywords name

2007-07-02 Thread Michael Hoffman
Gabriel Genellina wrote: > "except" is hard to translate, and > even in English I don't see what is the intended meaning (is it a noun? > a verb? an adverb? all look wrong). It's a preposition. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

python svn pre-commit hook

2007-07-02 Thread evil tabby cat
This is a python script which is fired off from a batchfile pre- commit.bat on Windows2000 server. Everything I've read says that it should work & each part does work when tested individually. But when it runs within subversion this statement always ends with this log_msg being an empty string. l

Re: good matlab interface

2007-07-02 Thread Brian Blais
On Jun 30, 2007, at 2:31 AM, felix seltzer wrote: > Does any one know of a good matlab interface? > I would just use scipy or numpy, but i also need to use > the matlab neural network functions. I have tried PyMat, but am > having > a hard time getting it to install correctly. > What problems

  1   2   >