Re: How do I dynamically create functions without lambda?

2006-02-03 Thread Fredrik Lundh
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-pastwinners.html#ig2000 -- http://mail.python.org/mailman/listinfo/python-list

Best way to determine if a certain PID is still running

2006-02-03 Thread 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 see if the process I started is finished. I could popen("ps -p %d" % pid)

Movable Python 1.0.0 for Python 2.3 & 2.4

2006-02-03 Thread Fuzzyman
It's finally happened, `Movable Python `_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop `_. The cost is £5 per distribution, payment by PayPal. £1 from every distr

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

2006-02-03 Thread Paul Rubin
David Hirschfield <[EMAIL PROTECTED]> writes: > So, should I run a monitor thread which just calls os.waitpid() and > when the thread indicates via an event that the process completed, I'm > golden? Umm, what OS? And do you have any control over the program running in the subprocess, or is it doi

newbie - script works in PythonWin - fails from Python

2006-02-03 Thread marcus . tettmar
Hi, I have a script that runs fine when I run it from within PythonWin but causes a WindowsError: Exception when I try to run it from the command line using python.exe. What is PythonWin doing differently? -- http://mail.python.org/mailman/listinfo/python-list

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

2006-02-03 Thread Lars Gustäbel
On Thu, Feb 02, 2006 at 05:10:24PM -0800, David Hirschfield wrote: > 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 t

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

2006-02-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I have a script that runs fine when I run it from within PythonWin but > causes a WindowsError: Exception when I try to run it from the command > line using python.exe. What is PythonWin doing differently? is that the entire traceback ? what is the script doing when y

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

2006-02-03 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Hi, > > I have a script that runs fine when I run it from within PythonWin but > causes a WindowsError: Exception when I try to run it from the command > line using python.exe. What is PythonWin doing differently? Hello Marcus, Can you post the full exception, and pre

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

2006-02-03 Thread marcus . tettmar
I'm using ctypes and loading a DLL and running a DLL function. As I say it works perfectly with no errors when I run from PythonWin but gives the following exception when run from command line. WindowsError: exception code 0xeedfade I can use the DLL with no issues in other languages too. It wo

Re: would it be feasable to write python DJing software

2006-02-03 Thread simonwittber
Levi Campbell wrote: > Any and all mixing would probably happen in some sort of multimedia > library written in C (it would be both clumsy to program and slow to > execute if the calculations of raw samples/bytes were done in python) so > there shouldn't be a noticable performance hit. Actually, m

Re: Another try at Python's selfishness

2006-02-03 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > What do you think? The impression I get from your suggestion is that you haven't really understood Python. I'm sure that some things could be better designed or better documented, but your suggestions would actually make things worse. Sorry. Today, Python has a syntacti

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

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 02:29:03 -0800, marcus.tettmar wrote: > I'm using ctypes and loading a DLL and running a DLL function. As I > say it works perfectly with no errors when I run from PythonWin but > gives the following exception when run from command line. > > WindowsError: exception code 0xeed

Re: would it be feasable to write python DJing software

2006-02-03 Thread 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... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> 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, and that > function would return 1. One of us is missing something

Re: Server side newbie

2006-02-03 Thread jimlewis
Can you point me to sample code somewhere? If I had a server-side python script that increments the number in an edit control on clicking a button, I think I could take it from there. -- http://mail.python.org/mailman/listinfo/python-list

Re: would it be feasable to write python DJing software

2006-02-03 Thread Fuzzyman
Ivan Voras 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, not pure python... :) Only in as much as doing anything in

Re: would it be feasable to write python DJing software

2006-02-03 Thread Ivan Voras
Fuzzyman wrote: > Only in as much as doing anything in Python is *really* doing it in C, > surely ? > > Come to that, you're **really** doing it in machine code... I've yet to see someone calling if a == '5': print "it's 5" machine code. It's the distinction on which level the program's l

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
Yes, that's what I had in mind when I said it could be made recursion-safe. It's still not thread-safe, but I think that could be done too, using thread-local-variables instead of globals. > class TestB: > @memberFunction > def do(x): > z = __ # lambda's shouldn't directly referen

Re: would it be feasable to write python DJing software

2006-02-03 Thread Fredrik Lundh
Ivan Voras wrote: > > Come to that, you're **really** doing it in machine code... > > I've yet to see someone calling > > if a == '5': > print "it's 5" > > machine code. It's the distinction on which level the program's logic is > implemented, not at which level it's executed. uhuh? so why

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 12:00:52 +0100, Magnus Lycka 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). It is easy to work around (break?) that behaviour: class A(object): def foo(self): print "normal metho

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> First of all, you are using a really poor example of a "method", > since it doesn't use any attributes of the Foo instance. Agreed. I tried to post a short example, and it obviously was to short to make my point clear. lets take a longer one. Current syntax: class Pair: def __init__(self, a

Re: Server side newbie

2006-02-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Can you point me to sample code somewhere? If I had a server-side > python script that increments the number in an edit control on clicking > a button, I think I could take it from there. Oh man, I hate to say this since it's not a good situation, but what you're asking

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> I still see "newbie-friendliness" as a > MAJOR plus for Python -- it increases the chance that users > of your software will become contributors. Yes, I 100% agree to that point! But the point is, the current situation is not newbie-friendly (I can tell, I am a newbie): I declare a method with 3

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 03:23:00 -0800, n.estner 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, and that >>

Re: Server side newbie

2006-02-03 Thread Ravi Teja
swisscheese wrote: > I have a simple python desktop app with several edit controls and a > couple of buttons. It just does some math. What's the simplest way to > make it a server-side app so visitors to my site can run the app via > their browser? If the math is simple, you can just use JavaScri

Re: HTMLDocument and Xpath

2006-02-03 Thread Alan Kennedy
[EMAIL PROTECTED] > Hi, I want to use xpath to scrape info from a website using pyXML but I > keep getting no results. > > For example, in the following, I want to return the text "Element1" I > can't get xpath to return anything at all. What's wrong with this > code? Your xpath expression is wro

Re: Another try at Python's selfishness

2006-02-03 Thread n . estner
> You could try running it to see: > > >>> class A: > > ... def test(a, **kwargs): return 1 > ... > >>> class B: > > ... def test(b, **kwargs): return 2 > ... > >>> test(a=A(), b=B()) > > Traceback (most recent call last): > File "", line 1, in ? > NameError: name 'test' is not defined >

fixedint.py enhanced for auto-coercion (fixed-width python integers)

2006-02-03 Thread Andy Sy
Hi Dan, I find that when doing bit-twiddling in pure Python, fixed-width integer support is an extremely handy capability to have in Python regardless of what the apologists (for its absence) say. I added some stuff to fixedint.py to make >>> x=SByte(80) >>> x+200 fixedint.SignedType(8)(24) th

Re: Another try at Python's selfishness

2006-02-03 Thread Antoon Pardon
Op 2006-02-03, [EMAIL PROTECTED] schreef <[EMAIL PROTECTED]>: >> First of all, you are using a really poor example of a "method", >> since it doesn't use any attributes of the Foo instance. > > Agreed. I tried to post a short example, and it obviously was to short > to make my point clear. lets tak

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 04:14:33 -0800, n.estner wrote: [snip] >> Since namespaces are critical to Python, your test code is a problem that >> just cannot happen in Python. It is a non-issue. Python will not get >> confused between the two definitions of test. > > I've been answering to Donn Cave's

Re: OO conventions

2006-02-03 Thread Steven D'Aprano
On Thu, 02 Feb 2006 17:00:26 -0800, Blair P. Houghton wrote: > Image would be a superclass to JPGImage, BMPImage, PNGImage, etc... > > But which to use could only be determined AFTER opening the file, > because "file.jpg" doesn't have type JPG, it has type string and > semantic value "maybe a jpe

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 03:51:03 -0800, n.estner wrote: > My alternative syntax suggestion would be this one: > > class Pair: > def self.__init__(a,b): > self.a = a > self.b = b > > def self.sum(): > return self.a + self.b > > def this.product (): > retur

Embedding Python into C/C++ applications

2006-02-03 Thread John Dean
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 -- Best Regards John -- http://mail.python.org/mailman/listinfo/python-list

Re: Another try at Python's selfishness

2006-02-03 Thread Steven D'Aprano
On Fri, 03 Feb 2006 03:59:10 -0800, n.estner wrote: >> I still see "newbie-friendliness" as a >> MAJOR plus for Python -- it increases the chance that users >> of your software will become contributors. > > Yes, I 100% agree to that point! > But the point is, the current situation is not newbie-f

Re: OO conventions

2006-02-03 Thread Nicola Musatti
Steven D'Aprano wrote: [...] > If a class has a natural, obvious default state (e.g. a mutable string > class might start off empty, a mutable int class might start off as zero, > a binary tree might start off as an empty node with no children) then it > makes sense to initialise the class, then a

Re: Server side newbie

2006-02-03 Thread jimlewis
Thanks but the math is a bit complex and already coded and debugged in a python desktop gui. -- http://mail.python.org/mailman/listinfo/python-list

Re: Control if a input text is IP

2006-02-03 Thread Fuzzyman
Fredrik Lundh wrote: > Sbaush wrote: > > > My app has in input an ip address in IPv4 notation. > > is there a function that control if input is a string in IPv4 notation? > > here's one way to do it: Here's a function from the 'validate' module that comes with ConfigObj : def dottedQuadToNum(ip)

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

2006-02-03 Thread Roy Smith
David Hirschfield <[EMAIL PROTECTED]> wrote: > 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 see if > the proce

Re: How do I dynamically create functions without lambda?

2006-02-03 Thread Magnus Lycka
Terry Hancock wrote: > Note also in the datasets that *overperformers* *underrated* > their performance. Well, if you're the best in the group and aren't perfectly exact in your evaluation of your position relative to others, you can't overrate yourself. It's quite natural that the self evaluation

Re: Another try at Python's selfishness

2006-02-03 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > The main reason (at least for me) is that there's simply too much > "magic" in it. Why does the expression left of the '.' get promoted to > the first parameter? One of the reasons I like Lua is because it doesn't do this, instead using the : operator to designate metho

Regular expression query

2006-02-03 Thread Martin Biddiscombe
It's probably quite simple, but what I want is a regular expression to parse strings of the form: "parameter=12ab" "parameter=12ab foo bar" "parameter='12ab'" "parameter='12ab' biz boz" "parameter="12ab"" "parameter="12ab" junk" in each case returning 12ab as a match. "parameter" is known and fix

Re: HTMLDocument and Xpath

2006-02-03 Thread swilson
Alan Kennedy wrote: > [EMAIL PROTECTED] > > Hi, I want to use xpath to scrape info from a website using pyXML but I > > keep getting no results. > > > > For example, in the following, I want to return the text "Element1" I > > can't get xpath to return anything at all. What's wrong with this > >

Re: OO conventions

2006-02-03 Thread bruno at modulix
Blair P. Houghton wrote: (snip) > 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 returns the object via th

web.py + cheetah delivering incomplete pages

2006-02-03 Thread [EMAIL PROTECTED]
hi, yesterday i started with web.py / flup / cheetah, and managed to get a first webpage to diaplay on my windows box running apache. unfortunately, the following code import web urls = ( '(.*)', 'view' ) class view: def GET( self, name ): web.render( 'view.html' ) web.in

Re: Another try at Python's selfishness

2006-02-03 Thread Antoon Pardon
Op 2006-02-03, Ben Sizer schreef <[EMAIL PROTECTED]>: > > [EMAIL PROTECTED] wrote: >> The main reason (at least for me) is that there's simply too much >> "magic" in it. Why does the expression left of the '.' get promoted to >> the first parameter? > > One of the reasons I like Lua is because it d

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

2006-02-03 Thread marcus . tettmar
Hi, 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 from inside PythonWin it runs beautifully and returns with no

Re: Another try at Python's selfishness

2006-02-03 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Having read previous discussions on python-dev I think I'm not the only > Python programmer who doesn't particularly like python's "self" > parameter: bang ! You're dead ! (no no, just kidding !-) > > class Foo: old-style classes are deprecated. class Foo(object

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: > [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 t

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

2006-02-03 Thread Thomas Heller
[EMAIL PROTECTED] writes: > Hi, > > 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 from inside

Re: Another try at Python's selfishness

2006-02-03 Thread Alex Martelli
Magnus Lycka <[EMAIL PROTECTED]> wrote: ... > which isn't needed at all. So far, the existence of x.y somewhere > in Python always implied that x was already introduced explicitly > in the program, and you suggest that we violate that both in the Almost... import (and from) statements are excep

Re: would it be feasable to write python DJing software

2006-02-03 Thread Andrew Gwozdziewycz
> If that's the way you want to look at it, there is nothing that > can be done in pure python. Both the built-ins and the basic > operators and sematics are implimented in C. What makes python a powerful programming language? It's the fact that it bundles up all sorts of c-code into a nice easy

Re: would it be feasable to write python DJing software

2006-02-03 Thread Grant Edwards
On 2006-02-03, Fuzzyman <[EMAIL PROTECTED]> wrote: > Come to that, you're **really** doing it in machine code... And probably not the machine code emitted by the assembler but rather the actual micro-code that's implemented in hardware that's running a program that implements the VM for the machi

Re: Fromatting an xml file

2006-02-03 Thread Harry George
"sir_alex" <[EMAIL PROTECTED]> writes: > Hi! I have a little problem writing xml files formatted in a way like > the following: > > > bla > bla > > > Every new node element should have a tabulation before it, but when I > use xml.dom.minidom I use writexml, which considers as

Re: Another try at Python's selfishness

2006-02-03 Thread Alex Martelli
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"? > has special meaning inside a def statement > than elsewhere. Elsewhere, foo.bar is an attribute access, look

Re: Regular expression query

2006-02-03 Thread bruno at modulix
Martin Biddiscombe wrote: > It's probably quite simple, but what I want is a regular expression If it's simple, then you probably *dont* want a regexp. > to > parse strings of the form: > > "parameter=12ab" > "parameter=12ab foo bar" > "parameter='12ab'" > "parameter='12ab' biz boz" > "parameter

problems writing tuple to log file

2006-02-03 Thread localpricemaps
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 fries ,coke cake ,milk note that i have print stat

Re: Regular expression query

2006-02-03 Thread Tim Chase
> "parameter=12ab" > "parameter=12ab foo bar" > "parameter='12ab'" > "parameter='12ab' biz boz" > "parameter="12ab"" > "parameter="12ab" junk" > > in each case returning 12ab as a match. "parameter" is known and fixed. > The parameter value may or may not be enclosed in single or double > quotes,

py2exe question

2006-02-03 Thread mitsura
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 setup(name="APP1", scripts=["C:\\Python24\\_AP

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

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: 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

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: 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?

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: 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: 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

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: 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? >

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: 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 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

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: 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 > > >

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: 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: 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 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: 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 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 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: 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 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: 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 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: 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

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: 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

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 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: 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: 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

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: 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

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: 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: 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 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

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: 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(

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

  1   2   >