Re: OO conventions

2006-02-03 Thread Blair P. Houghton
bruno at modulix wrote: > Blair P. Houghton wrote: > > So Image.open(filename) seems right as a factory function that opens > > the file, figures out what it really is, constructs the appropriate > > subclass object (likely by passing a string to the constructor, e.g., > > JPGImage(filename)), and

Re: Recursive function going infinite and I can't see why.

2006-02-03 Thread Gregory Piñero
By the way, all I'm trying to do here is take two trees, randomly find a sub-tree of each and swap the sub-trees. So if anyone has a simple method for doing that I'm certainly open to that too. Thanks again, -Greg On 2/4/06, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Hi, > > Would anyone be a

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread marcus . tettmar
Goodness, you're a nice friendly lot aren't you!? I saw that and I realise that ActivePython COMES with support for Windows. But it doesn't say that it forces scripts you create with it to load modules you haven't implicitly imported yourself! It doesn't say that a script might run in PythonWin

Recursive function going infinite and I can't see why.

2006-02-03 Thread Gregory Piñero
Hi, Would anyone be able to tell me why my function below is getting stuck in infinite recusion? Maybe I'm just tired and missing something obvious? def replace_within_node(node,oldnode,newnode): if node is oldnode: return newnode else: for varname,value in node.__dict__.i

Re: python's library support

2006-02-03 Thread John M. Gabriele
Sean wrote: > I am a newbie in python, and I have a feeling that python provides less > library support than perl www.cpan.org This seems a big discussion > topic. > > I want to know if there is extensive algorithm library support in > python. I know there is a pretty neat module in perl to imple

Re: Another try at Python's selfishness

2006-02-03 Thread Donn Cave
Quoth [EMAIL PROTECTED]: | > Still see no problem. Of course, it goes without saying that | > Python 2.4 doesn't work this way, but given that it's theoretically | > possible for f(a) to be resolved similarly to a.f, then I really | > do not see what you're seeing here. The kwargs parameter appea

Re: python's library support

2006-02-03 Thread Robert Kern
Sean wrote: > I am a newbie in python, and I have a feeling that python provides less > library support than perl www.cpan.org This seems a big discussion > topic. > > I want to know if there is extensive algorithm library support in > python. I know there is a pretty neat module in perl to imple

Re: cannot install scipy

2006-02-03 Thread Robert Kern
John M. Gabriele wrote: > Why not just "apt-get install python-scipy"? > > That's one of the best parts of running Debian. :) It's also one of the worst parts of running Debian (speaking as a happy once-Debian-now-Ubuntu user). In this case, python-scipy is a pretty ancient version of scipy usin

Re: cannot install scipy

2006-02-03 Thread Robert Kern
nitro wrote: > Hi, > > I am using a Debian system. I installed NumPy and everything works > well. When I try to install SciPy, I get the following error. Any help > would be appreciated. > > === > [EMAIL PROTECTED]:~/scipy/scipy-0.4.4$ python setup.py install > import core -> failed: > /usr/lib/p

Re: python's library support

2006-02-03 Thread Kirk McDonald
Sean wrote: > I am a newbie in python, and I have a feeling that python provides less > library support than perl www.cpan.org This seems a big discussion > topic. > > I want to know if there is extensive algorithm library support in > python. I know there is a pretty neat module in perl to imple

Re: Another try at Python's selfishness

2006-02-03 Thread Alex Martelli
Terry Reedy <[EMAIL PROTECTED]> wrote: ... > As was once pointed out to me some years ago, when I wrote something > similar, a.f() is not just a shortcut for A.f(a) [a.__class__.f(a)]. The > latter only looks for f in the class A namespace while the former also > looks in superclass namespace

Re: Another try at Python's selfishness

2006-02-03 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > your idea. Could you summarize how exactly "f(x,y=z)" should be > resolved, i.e. where it should look for "f"? Lexically: local scope, outer functions outwards, globals, builtins. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Another try at Python's selfishness

2006-02-03 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > would be. Token? Too specific. Maybe it would have been better to just > have just said "...but now foo.bar has ...". Agreed. > model I have is "y" is a label in some namespace x, and you have to (in > some sense) look up where "y" should go reg

Re: cannot install scipy

2006-02-03 Thread nitro
I should add the following informtion that it also printed out: === Ran 972 tests in 2.471s FAILED (failures=1) === -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot install scipy

2006-02-03 Thread nitro
I just ran and had one test fail - any ideas? scipy.test(level=1, verbosity=2) == FAIL: check_cdf (scipy.stats.distributions.test_distributions.test_fatiguelife) -

Re: cannot install scipy

2006-02-03 Thread nitro
LOL! Thanks- ashamed :-) nitro -- http://mail.python.org/mailman/listinfo/python-list

Re: IPy module

2006-02-03 Thread David Murmann
yawgmoth7 schrieb: > I was discussing this in another email, sadly I have misplaced the > email. I got the module IPy, and I am taking a variable from the > user(An IP) and doing something like this: > > startip = raw_input("Enter start IP: ") > ip = IPy.IP(startip\255) > for x in ip(): > > >

python's library support

2006-02-03 Thread Sean
I am a newbie in python, and I have a feeling that python provides less library support than perl www.cpan.org This seems a big discussion topic. I want to know if there is extensive algorithm library support in python. I know there is a pretty neat module in perl to implement graph theory. Is th

Re: cannot install scipy

2006-02-03 Thread John M. Gabriele
nitro wrote: > Hi, > > I am using a Debian system. I installed NumPy and everything works > well. When I try to install SciPy, I get the following error. Any help > would be appreciated. > > === > [EMAIL PROTECTED]:~/scipy/scipy-0.4.4$ python setup.py install > import core -> failed: > /usr/lib/p

Re: fairly large webapp: from Java to Python. experiences?

2006-02-03 Thread John M. Gabriele
[EMAIL PROTECTED] wrote: > To replace a large framework you will probably need a framework. Well, I'm sure not all web frameworks are created equal, however, CherryPy does bill itself as a "web framework". > Take a > look at http://www.djangoproject.com or http://www.turbogears.org. They > both u

Re: Automatic class attribute

2006-02-03 Thread Franck PEREZ
On 2/3/06, Kirk McDonald <[EMAIL PROTECTED]> wrote: > Franck PEREZ wrote: > > Hello all, > > > > Considering the following code : > > > > class C(object): > >...: observers = [] > >...: > >...: @classmethod > >...: def showObservers(cls): > >...: print cls.ob

[ANN] PyChecker 0.8.17 released

2006-02-03 Thread Neal Norwitz
A new version of PyChecker is available. There are two notable new features (command line options): --only and -#/--limit. --only will only print warnings from files specified on the command line. --limit will limit the number of warnings printed. By default, only 10 warnings are

Re: Making Popen items terminate when program ends.

2006-02-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > You should > either prefix your string with an "r" (just before the opening quotation > mark) or escape the backslashes (as in use "C:\\Folder..." instead of > just "C:\Folder"). Of the two alternatives, raw stings are

Re: Making Popen items terminate when program ends.

2006-02-03 Thread Peter Hansen
Ernesto wrote: > I used Popen to launch a seperate telnet window, like this: > > subprocess.Popen("start telnet.exe -f C:\Folder\File.txt localhost > 6000",shell=True) I can't answer the direct question, but this is the second post of yours I've seen with clear danger signals: you apparently don

Re: Global variables, Classes, inheritance

2006-02-03 Thread Kirk McDonald
DaveM wrote: > Although I've programmed for fun - on and off - since the mid 70's, I'm > definitely an OO (and specifically Python) beginner. > > My first question is about global variables. Are they, as I'm starting to > suspect, a sin against God or just best avoided? Having got my current > ap

Re: Global variables, Classes, inheritance

2006-02-03 Thread Michael Spencer
DaveM wrote: > Although I've programmed for fun - on and off - since the mid 70's, I'm > definitely an OO (and specifically Python) beginner. > > My first question is about global variables. Are they, as I'm starting to > suspect, a sin against God or just best avoided? Having got my current > ap

Re: fairly large webapp: from Java to Python. experiences?

2006-02-03 Thread [EMAIL PROTECTED]
To replace a large framework you will probably need a framework. Take a look at http://www.djangoproject.com or http://www.turbogears.org. They both use some of the tools you mention but operate on a higher level. I find Python fairly easy to maintain. Unfortunatly, I do not find it easy to take a

Re: Global variables, Classes, inheritance

2006-02-03 Thread Claudio Grondi
DaveM wrote: > Although I've programmed for fun - on and off - since the mid 70's, I'm > definitely an OO (and specifically Python) beginner. > > My first question is about global variables. Are they, as I'm starting to > suspect, a sin against God or just best avoided? Having got my current > ap

Global variables, Classes, inheritance

2006-02-03 Thread DaveM
Although I've programmed for fun - on and off - since the mid 70's, I'm definitely an OO (and specifically Python) beginner. My first question is about global variables. Are they, as I'm starting to suspect, a sin against God or just best avoided? Having got my current application working using t

Re: dynamic class instantiation

2006-02-03 Thread Volker Grabsch
Kent Johnson wrote: > Ognen Duzlevski wrote: >> I appreciate your comments. Basically, the reason why this code generator >> exists is the fact that I do not want to hard-code the resulting xml in >> any way. The users of the web/db framework of which this solution is part of >> might like the "we

Re: Best way to determine if a certain PID is still running

2006-02-03 Thread MrJean1
Take look at the poll() methods in the subprocess.py source file of your Python install. It shows how to use the os.wait_pid(pid, os.WNOHANG) to check whether a process is still running or has terminated (and how, from the returned status value). Btw, on *nix you must call os.wait_pid(pid, ...) t

Re: Best way to determine if a certain PID is still running

2006-02-03 Thread MrJean1
Take look at the poll() methods in the subprocess.py source file of your Python install. It shows how to use the os.wait_pid(pid, os.WNOHANG) to check whether a process is still running or has terminated (and how, from the returned status value). Btw, on *nix you must call os.wait_pid(pid, ...) t

cannot install scipy

2006-02-03 Thread nitro
Hi, I am using a Debian system. I installed NumPy and everything works well. When I try to install SciPy, I get the following error. Any help would be appreciated. === [EMAIL PROTECTED]:~/scipy/scipy-0.4.4$ python setup.py install import core -> failed: /usr/lib/python2.3/site-packages/numpy/core

Re: classmethod and instance method

2006-02-03 Thread Xavier Morel
[EMAIL PROTECTED] wrote: > Yes that's better. Didn't know about the __class__ attribute. I > thought there must be a way to access this but couldn't find it in the > docs. > > Thanks, > > Andy > dir(), help() and the interactive interpreter (IDLE or CLI) are your best friends. Any time you w

Making Popen items terminate when program ends.

2006-02-03 Thread Ernesto
I used Popen to launch a seperate telnet window, like this: subprocess.Popen("start telnet.exe -f C:\Folder\File.txt localhost 6000",shell=True) I is preferable to have this telnet window with the python program. Is there something I can do to that line of code to make that happen, or perhaps an

Re: Python on Windows

2006-02-03 Thread Grant Edwards
On 2006-02-03, Larry Bates <[EMAIL PROTECTED]> wrote: >> What would folks suggest is the easiest way to package it to run on >> other windows PCs? Like the man said, my vote is for py2exe + inno-setup >> I would love a single .exe file that would run without ANY OTHER FILES >> even if it was 50

Re: problems writing tuple to log file

2006-02-03 Thread localpricemaps
the, the issue is that the last loop adds the last value of everything to the data array -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Windows

2006-02-03 Thread Larry Bates
Simon Faulkner wrote: > I've just written my first (simple) WxPython program - yy! > > What would folks suggest is the easiest way to package it to run on > other windows PCs? > > I would love a single .exe file that would run without ANY OTHER FILES > even if it was 50 Mb! > > TIA > > > S

Re: indentation messing up my tuple?

2006-02-03 Thread localpricemaps
the, the issue is that the last loop adds the last value of everything to the data array -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe question

2006-02-03 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I just installed py2exe to create a binary of my Python script. > However, py2exe does not seem to create a binary from my .py script. > This is what I have done: > I create a setup.py script: > " > # setup.py > from distutils.core import setup > import py2exe >

Re: Fuzzy Lookups

2006-02-03 Thread BBands
Diez B. Roggisch wrote: > I did a levenshtein-fuzzy-search myself, however I enhanced my version by > normalizing the distance the following way: > > def relative(a, b): > """ > Computes a relative distance between two strings. Its in the range > (0-1] where 1 means total equality. >

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> Still see no problem. Of course, it goes without saying that > Python 2.4 doesn't work this way, but given that it's theoretically > possible for f(a) to be resolved similarly to a.f, then I really > do not see what you're seeing here. The kwargs parameter appears > irrelevant from where I'm si

Re: Python on Windows

2006-02-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: >>I would love a single .exe file that would run without ANY OTHER FILES >>even if it was 50 Mb! > > > You should look at pyinstaller > (http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi), as far as I know > the only py->exe compiler that makes single file executables for

Re: web.py + cheetah delivering incomplete pages

2006-02-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > yeah, posted it there too, but, you see, there are but 95 members in > that group -- guess it's more productive to ask this right here. we'll > see. There's a good chance that about 80 of those 95 people read this newsgroup regularly, and that this newsgroup has only a

Re: MySQLdb question... using table name as arg

2006-02-03 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Sean Berry <[EMAIL PROTECTED]> wrote: >I have four tables that all have the same column names (50 in each.) > >I have created an admin program to edit, delete and add records to the >tables and would like to use the table name as a variable in each query so >the co

Re: Automatic class attribute

2006-02-03 Thread Kirk McDonald
Franck PEREZ wrote: > Hello all, > > Considering the following code : > > class C(object): >...: observers = [] >...: >...: @classmethod >...: def showObservers(cls): >...: print cls.observers > > class D1(C): >...: observers = [] #could it be move

import numeric crashes python.exe

2006-02-03 Thread tuka
Hi all, I have been trying import numeric (from numpy install) and each time it crashes python.exe on windows XP. I am runing python2.4.2 and have used the original distribution and an activestate distribution with no difference in result. Has anyone been having the same problem ? Is there a poss

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
wait a minute, that did work correctly. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: would it be feasable to write python DJing software

2006-02-03 Thread Ivan Voras
Terry Hancock wrote: > To me, "doing it in C" implies that I must write some C > code. Ok, perhaps it is a bit imprecise :) > In this case, that won't be required at all. Everything the > OP wants to do can be done exclusively by writing Python > code. He will, of course, be *using* some exten

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
jay graves wrote: > > This should work but only lightly tested. > subprocess.Popen("start telnet.exe -f C:\Folder\output.txt localhost > 6000",shell=True) Thanks a lot, but this still didn't launch a seperate telnet window. I just want the telnet window to open up and do "it's thing" in the back

fairly large webapp: from Java to Python. experiences?

2006-02-03 Thread john_sips_tea
I've got a fairly substantial webapp written in Java (plus Tomcat, Hibernate, Struts, JSP, MySQL) that is a bit of a bear to work with. I didn't write it. Much of it is only very sparsely documented (if at all). No design docs anywhere. It's a large webapp with many classes and fairly deep inherita

Re: Launch Windows command window....

2006-02-03 Thread jay graves
Ernesto wrote: > subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000") > is improved, but still doesn't launch a SEPERATE window... This should work but only lightly tested. subprocess.Popen("start telnet.exe -f C:\Folder\output.txt localhost 6000",shell=True) You don't say what y

Automatic class attribute

2006-02-03 Thread Franck PEREZ
Hello all, Considering the following code : class C(object): ...: observers = [] ...: ...: @classmethod ...: def showObservers(cls): ...: print cls.observers class D1(C): ...: observers = [] #could it be moved in C ? class D2(C): ...: observers =

Re: Python on Windows

2006-02-03 Thread svbrk
> I would love a single .exe file that would run without ANY OTHER FILES > even if it was 50 Mb! You should look at pyinstaller (http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi), as far as I know the only py->exe compiler that makes single file executables for windows. You may even bundle additio

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
I'm one step closer... subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000") is improved, but still doesn't launch a SEPERATE window... -- http://mail.python.org/mailman/listinfo/python-list

Launch Windows command window....

2006-02-03 Thread Ernesto
I'm trying to launch a seperate telnet window from within my python program. The command I thought I was supposed to use is below: os.system("telnet.exe -f C:\Folder\output.txt localhost 6000") This creates a telnet window inside the current window. This is not desirable. I need it to launch a

Re: Run Windows shortcut

2006-02-03 Thread Ernesto
Nevermind this is not the design I need. -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python into C/C++ applications

2006-02-03 Thread Farshid Lashkari
John Dean wrote: > Hi > > Could somebody, please tell me where I can find information about embedding > Python into a C/C++ application. The example in the docs is rather simple. I > am looking for something a bit more complex and longer > Are you looking for a specific kind of example? Here is

Re: web.py + cheetah delivering incomplete pages

2006-02-03 Thread [EMAIL PROTECTED]
yeah, posted it there too, but, you see, there are but 95 members in that group -- guess it's more productive to ask this right here. we'll see. _w. -- http://mail.python.org/mailman/listinfo/python-list

Re: Another try at Python's selfishness

2006-02-03 Thread Jean-Paul Calderone
On Fri, 3 Feb 2006 15:27:51 -0500, Terry Reedy <[EMAIL PROTECTED]> wrote: > >"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> [EMAIL PROTECTED] wrote: >> Today, Python has a syntactic shortcut. If 'a' is an >> instance of class 'A', a.f(x,y,z) is a shortcut for >> A.f(

Run Windows shortcut

2006-02-03 Thread Ernesto
Assuming the shortcut is in the current directory, how could I launch the shortcut (without waiting for it to finish) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: would it be feasable to write python DJing software

2006-02-03 Thread Grant Edwards
On 2006-02-03, Ivan Voras <[EMAIL PROTECTED]> wrote: Actually, manipulating and mixing audio samples can be both fast and elegant, in Python, if you use Numeric or a similar library. >>> >>>... at which point you're actually doing it in C, not pure python... :) >> >> If that's the way you

Re: Another try at Python's selfishness

2006-02-03 Thread Terry Reedy
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: > Today, Python has a syntactic shortcut. If 'a' is an > instance of class 'A', a.f(x,y,z) is a shortcut for > A.f(a,x,y,z). If you don't use the shortcut, there is > no magic at all, just the un

Re: would it be feasable to write python DJing software

2006-02-03 Thread Terry Hancock
On Fri, 03 Feb 2006 20:03:01 +0100 Ivan Voras <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > > On 2006-02-03, Ivan Voras <[EMAIL PROTECTED]> wrote: > > > >>[EMAIL PROTECTED] wrote: > >> > >>>Actually, manipulating and mixing audio samples can be > >both fast and >>elegant, in Python, if you u

Re: How do I dynamically create functions without lambda?

2006-02-03 Thread Terry Hancock
On Fri, 3 Feb 2006 09:39:39 +0100 "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > > Frankly this paper sounds like a bid for the "Journal of > > Irreproducible Results" that somehow got accidentally > > submitted to a serious journal > http://www.improbable.com/ig/ig-pastwin

Re: MySQLdb question... using table name as arg

2006-02-03 Thread Scott David Daniels
Carsten Haese wrote: > On Fri, 2006-02-03 at 13:24, Sean Berry wrote: >> I have four tables that all have the same column names (50 in each.) >> I ... would like to use the table name as a variable in each query so >> the code can be used for each of the 4 tables >> To ensure that string are q

Python - python-list

2006-02-03 Thread gilcneth (sent by Nabble.com)
Hello, I am trying to automate my personal website logons and recently discovered cPamie, which looks like it may be a very handy tool indeed. But, so far, I have not had any luck using it for website logons.  This may or may not be a cPamie issue, so please bear with me. The site I am trying t

Re: OO conventions

2006-02-03 Thread I V
Nicola Musatti wrote: > I don't think this is all there is to it. Even though a class such as > Image might not have a sensible default, initial state it still might > not be reasonable to burden it with the ability to collect the > information needed to reach such an initial state. To put it it an

Re: would it be feasable to write python DJing software

2006-02-03 Thread Ivan Voras
Grant Edwards wrote: > On 2006-02-03, Ivan Voras <[EMAIL PROTECTED]> wrote: > >>[EMAIL PROTECTED] wrote: >> >>>Actually, manipulating and mixing audio samples can be both fast and >>>elegant, in Python, if you use Numeric or a similar library. >> >>... at which point you're actually doing it in C,

Re: MySQLdb question... using table name as arg

2006-02-03 Thread Sean Berry
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 2006-02-03 at 13:24, Sean Berry wrote: >> I have four tables that all have the same column names (50 in each.) >> >> I have created an admin program to edit, delete and add records to the >> tables and would lik

Re: Another try at Python's selfishness

2006-02-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > > That usage (self is second parameter to B.test) is bound > > to cause trouble in general, but in this case doesn't have > > any effect I can see. The function call "test" would be > > resolved from its first parameter, instance of A, a

Re: MySQLdb question... using table name as arg

2006-02-03 Thread Carsten Haese
On Fri, 2006-02-03 at 13:24, Sean Berry wrote: > I have four tables that all have the same column names (50 in each.) > > I have created an admin program to edit, delete and add records to the > tables and would like to use the table name as a variable in each query so > the code can be used for

MySQLdb question... using table name as arg

2006-02-03 Thread Sean Berry
I have four tables that all have the same column names (50 in each.) I have created an admin program to edit, delete and add records to the tables and would like to use the table name as a variable in each query so the code can be used for each of the 4 tables. Usually I would do something lik

Re: Another try at Python's selfishness

2006-02-03 Thread Jean-Paul Calderone
On 3 Feb 2006 08:58:56 -0800, [EMAIL PROTECTED] wrote: >> ... >> Unfortunately, none of this suggests that it's reasonable to have >> >> def x.y(z): ... >> >> mean the same as >> >> def y(x, z): ... > >Actually, it shouldn't. The idea was, that >def x.y(z): ... >(explicitly) introduces an unbou

Re: Compiling

2006-02-03 Thread Paul Boddie
Oh, and I forgot another Aycock creation: UCPy [16]. Paul [16] http://pages.cpsc.ucalgary.ca/~aycock/papers/ucpy.pdf -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling

2006-02-03 Thread Paul Boddie
Simon Faulkner wrote: > > I love Python for it's ease and speed of development especially for the > "Programming Challenged" like me but why hasn't someone written a > compiler for Python? There are various compilers for Python, but they vary in terms of capabilities, language support and method o

Re: Compiling

2006-02-03 Thread bruno at modulix
Simon Faulkner wrote: >>> I love Python for it's ease and speed of development especially for the >>> "Programming Challenged" like me but why hasn't someone written a >>> compiler for Python? >> >> >> >> But there *is* a compiler for Python. >> http://www.python.org/doc/2.4.2/lib/module-compiler.h

Re: web.py + cheetah delivering incomplete pages

2006-02-03 Thread Guyon Morée
hi, i think you'd have better luck at http://groups.google.com/group/webpy -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling

2006-02-03 Thread Rocco Moretti
Simon Faulkner wrote: > Pardon me if this has been done to death but I can't find a simple > explanation. > > I love Python for it's ease and speed of development especially for the > "Programming Challenged" like me but why hasn't someone written a > compiler for Python? > > I guess it's not

Re: Compiling

2006-02-03 Thread Simon Faulkner
>>I love Python for it's ease and speed of development especially for the >>"Programming Challenged" like me but why hasn't someone written a >>compiler for Python? > > > But there *is* a compiler for Python. > http://www.python.org/doc/2.4.2/lib/module-compiler.html ty Bruno, I must confes that

Re: Compiling

2006-02-03 Thread Rene Pijlman
Simon Faulkner: >why hasn't someone written a compiler for Python? http://www.python.org/doc/faq/general.html#can-python-be-compiled-to-machine-code-c-or-some-other-language -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling

2006-02-03 Thread Scott David Daniels
Simon Faulkner wrote: > ... why hasn't someone written a compiler for Python? > I guess it's not that simple eh? What would you call PyPy? As to the idea of a python-to-machine code translator, the benefit would not be very great without at least a PyPy level of understanding of the code -- no s

Re: Python on Windows

2006-02-03 Thread bruno at modulix
Simon Faulkner wrote: > I've just written my first (simple) WxPython program - yy! > > What would folks suggest is the easiest way to package it to run on > other windows PCs? I can't tell for sure since I do not use Windows, but I think Py2Exe is what you're looking for. -- bruno desthui

Re: Compiling

2006-02-03 Thread bruno at modulix
Simon Faulkner wrote: > Pardon me if this has been done to death but I can't find a simple > explanation. > > I love Python for it's ease and speed of development especially for the > "Programming Challenged" like me but why hasn't someone written a > compiler for Python? But there *is* a compile

Re: OS.MKDIR( ) Overwriting previous folder created...

2006-02-03 Thread nirsof
The corect way is to try os.mkdir, catch the exception and check the errno value, which tell you why the call failed. If the directory exists, you can ignore the exception, if its another error, you usually had to raise it again and let the caller handle it. Example: import errno try: os.mkd

Re: Python on Windows

2006-02-03 Thread Xavier Morel
Simon Faulkner wrote: > I've just written my first (simple) WxPython program - yy! > > What would folks suggest is the easiest way to package it to run on > other windows PCs? > > I would love a single .exe file that would run without ANY OTHER FILES > even if it was 50 Mb! > > TIA > > >

Python on Windows

2006-02-03 Thread Simon Faulkner
I've just written my first (simple) WxPython program - yy! What would folks suggest is the easiest way to package it to run on other windows PCs? I would love a single .exe file that would run without ANY OTHER FILES even if it was 50 Mb! TIA Simon -- http://mail.python.org/mailman/list

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread marcus . tettmar
Hi, Sorry, I'm not trying to make things hard! I just can't figure why it works when run from PythonWin and not from Python - PythonWin MUST load some extra library. Anyway, I have finally fixed it by adding import win32com to the top of the script. Am guessing the DLL uses COM and PythonWin mu

Re: problems writing tuple to log file

2006-02-03 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > i am having a problem writing a tuple to a text file. my code is > below. I'd rather say you are having a problem with logic. > what i end up getting is a text file that looks like this > > burger, 7up > burger, 7up > burger, 7up Which is exactly what one would expec

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread Fredrik Lundh
Thomas Heller wrote: > > This is all I get: > > > > error 250477278 > > Traceback (most recent call last): > > File "script1.py", line 5, in ? > > Inst = lib.Initialize(0) > > WindowsError: exception code 0xeedfade > > > > I get this when running python.exe script1.py > > > > ** When run fro

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 07:00:37 -0800, marcus.tettmar wrote: > Hi, > > This is all I get: > > error 250477278 What is this line? That doesn't look like part of a Python traceback. I suppose it is possible that the DLL is printing it before the exception is raised. Or did you type it yourself? >

Compiling

2006-02-03 Thread Simon Faulkner
Pardon me if this has been done to death but I can't find a simple explanation. I love Python for it's ease and speed of development especially for the "Programming Challenged" like me but why hasn't someone written a compiler for Python? I guess it's not that simple eh? Simon -- http://mail

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> ... > Unfortunately, none of this suggests that it's reasonable to have > > def x.y(z): ... > > mean the same as > > def y(x, z): ... Actually, it shouldn't. The idea was, that def x.y(z): ... (explicitly) introduces an unbound method. That's not introducing a new conect to python, it's just

Re: problems writing tuple to log file

2006-02-03 Thread Juho Schultz
[EMAIL PROTECTED] wrote: > i am having a problem writing a tuple to a text file. my code is > below. > > what i end up getting is a text file that looks like this > > burger, 7up > burger, 7up > burger, 7up > > and this is instead of getting a list that should look like this > > burger, 7up >

Re: would it be feasable to write python DJing software

2006-02-03 Thread Tom Anderson
On Fri, 3 Feb 2006, Ivan Voras wrote: > Levi Campbell wrote: > >> Hi, I'm thinking about writing a system for DJing in python, but I'm >> not sure if Python is fast enough to handle the realtime audio needed >> for DJing, could a guru shed some light on this subject and tell me if >> this is do

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 07:40:38 -0800, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... >> > Why shouldn't >> > def self.x(): >> > declare two new identifiers ("x" and "self"), too? >> >> Sure, but now the call foo.bar > > "call"? Call? Who said anything about a call?

Wanted: Django Programmer Seeking PyCon Fame and Glory

2006-02-03 Thread Jeff Rush
Coming to PyCon 2006 in Dallas in a few weeks? Want to make a name for yourself before you arrive? Think Django is cool and want everyone else to know it? Whip up a Django app to slide into the PyCon website (already running Django in part) that hooks into Google's Map API. Provide a way for

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread marcus . tettmar
Unfortunately not. Is there any doc anywhere that shows how to make the script run from the command line the same way it does within PythonWin? -- http://mail.python.org/mailman/listinfo/python-list

Re: learning python, using string help

2006-02-03 Thread Tom Anderson
On Fri, 2 Feb 2006, [EMAIL PROTECTED] wrote: > silly newbie mistake > > your code runs fine on my openbsd box. ( I didnt uncomment the return > map(...) line My apologies - i should have made it clearer in the comment that it was hardwired to return example data! > thanks for the awesome exampl

Re: Best way to determine if a certain PID is still running

2006-02-03 Thread Thomas Guettler
Am Thu, 02 Feb 2006 17:10:24 -0800 schrieb David Hirschfield: > I'm launching a process via an os.spawnvp(os.P_NOWAIT,...) call. > So now I have the pid of the process, and I want a way to see if that > process is complete. > > I don't want to block on os.waitpid(), I just want a quick way to se

  1   2   >