The 3rd Python Game Programming Challenge is Over!

2006-09-23 Thread richard
PyWeek #3 has now finished with the judging results coming in and declaring the winners to be: Individual - Bouncy the Hungry Rabbit http://www.pyweek.org/e/bouncy/ Team - Typus Pocus http://www.pyweek.org/e/PyAr2/ Congratulations to everyone who entered! The full list of entries is

Re: Building things with setup.py

2006-09-23 Thread Martin v. Löwis
James Stroud schrieb: I think I would like to know how to avoid or correct these sort of issues in the future, which seem to be limited, for me at least, to scipy and numpy, with the possible exception of MySQLdb and its dependency on zlib. Ideally, I would like to understand exactly what

Re: distutils on Windows with VC++ 8

2006-09-23 Thread Martin v. Löwis
Rob Williscroft schrieb: Having read Noel Byron's reply also, I'm tempted to say there is some confusion here between a Visual *Studio* toolkit (VS 2003) and a Visual *C++* toolkit (VC 2003). Ah, that could well be. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread Robert Kern
metaperl wrote: Hello, I am looking for a module which has * log levels * output to stdout and file (either/or based on config) * nicely formatted log output (e.g., indentation when appropriate) I tried to use cheeseshop to find such a module, but came up short. I clicked on Browse Tree -

Re: Python 2.5 Installation and Tkinter

2006-09-23 Thread Martin v. Löwis
milan_sanremo schrieb: cc -shared build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/_tkinter.o build/temp.solaris-2.10-i86pc-2.5/tmp/Python-2.5/Modules/tkappinit.o -L/usr/openwin/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 -o build/lib.solaris-2.10-i86pc-2.5/_tkinter.so Yet, the

Re: Doctests for nested functions

2006-09-23 Thread Just
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Can doctests be added to nested functions too? (This can be useful to me, I use nested function when I don't have attributes that I have to remember, but I want to split the logic in some subparts anyway). I think we had that discussion

how to remember login in zope?

2006-09-23 Thread astarocean
how to remember login in zope? so when user came back , they needn't input username and password again. i'm using zope,extensiveuserfolder and cookiecrumbler, exuserfolder is set to cookie-based authentication. i'm not using cmf or plone , how could i handle this? thanks a lot. i'm working

Re: Doctests for nested functions

2006-09-23 Thread Paddy
Just wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Can doctests be added to nested functions too? (This can be useful to me, I use nested function when I don't have attributes that I have to remember, but I want to split the logic in some subparts anyway). I think we

Re: what is the best practice to separate Pygtk and long running thread code

2006-09-23 Thread seb
Hi, I am running on WinXP so that is not so convenient to communicate between separate processes. In the past I have used blocking files but it may be a slow communication way for some applications. It may also be too much depending on the disk on which the program is run (network drives with

Re: Building things with setup.py

2006-09-23 Thread James Stroud
Ben Finney wrote: James Stroud [EMAIL PROTECTED] writes: rantI try things until a build works. I consider everything I do until acquiring a working build as necessary. Going back to see exactly what I did to make things work is not a viable option Before trying such I don't know what I

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread MonkeeSage
Steve Holden wrote: Is this a serious suggestion, or simply an attempt at sardonic obscurantism? Well, I was being serious, but now I'm afraid to see what kind of evils I've acidentally stepped in, heh!? I honestly don't see anything wrong with creating a DSL for a given problem domain. Where

Blogging solution on SkunkWeb

2006-09-23 Thread shalinmangar
Hi, I use SkunkWeb as my application server for my web application. I intend to put up a blog on the website but I haven't been able to find out a good blogging software for SkunkWeb. Most of them are based on Zope/Plone or use CGI or mod_python. The basic features I need are: 1. Multi-user

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread Bjoern Schliessmann
metaperl wrote: Hello, I am looking for a module which has * log levels * output to stdout and file (either/or based on config) * nicely formatted log output (e.g., indentation when appropriate) Sorry for being nosey, but how'd you use indentation in a log? Regards, Björn -- BOFH excuse

Re: grabbing random words

2006-09-23 Thread Bjoern Schliessmann
Jay wrote: How would I be able to grab random words from an internet source. I'd like to grab a random word from a comprehensive internet dictionary. What would be the best source and the best way to go about this? The *best* source would be a function of the internet dictionary that

Re: Building things with setup.py

2006-09-23 Thread James Stroud
Martin v. Löwis wrote: James Stroud schrieb: I think I would like to know how to avoid or correct these sort of issues in the future, which seem to be limited, for me at least, to scipy and numpy, with the possible exception of MySQLdb and its dependency on zlib. Ideally, I would like to

Re: no-installation version of python

2006-09-23 Thread Bjoern Schliessmann
Robert Kern wrote: I think he wants a no-install (or, perhaps more accurately, simply-unzip-to-install) version of the interpreter that doesn't need to touch the Windows registry or copy DLLs to system locations. py2exe builds such a thing (or nearly so) for the application itself, if it

Re: Building things with setup.py

2006-09-23 Thread James Stroud
Robert Kern wrote: Okay, this is possibly part of the problem. numpy.distutils handles FORTRAN code differently than other extension modules; this is why pure C extension modules both inside numpy and elsewehere were linking fine. Try unsetenving $CPPFLAGS and $LDFLAGS and adding those

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread Gabriel Genellina
At Saturday 23/9/2006 06:35, Bjoern Schliessmann wrote: Hello, I am looking for a module which has * log levels * output to stdout and file (either/or based on config) * nicely formatted log output (e.g., indentation when appropriate) Sorry for being nosey, but how'd you use indentation in

Re: Automatic import PEP

2006-09-23 Thread Andrea
Opinions? Great :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread Bjoern Schliessmann
Gabriel Genellina wrote: [log w/indentation] I do - what's wrong? Imagine the following on a single line... Ah, K. Got it :) Regards, Björn -- BOFH excuse #351: PEBKAC (Problem Exists Between Keyboard And Chair) -- http://mail.python.org/mailman/listinfo/python-list

Re: grabbing random words

2006-09-23 Thread bearophileHUGS
Jay: How would I be able to grab random words from an internet source. I'd like to grab a random word from a comprehensive internet dictionary. What would be the best source and the best way to go about this? Why do you need to grab them from the net? A simpler solution seems to keep a local

Python and checked exceptions

2006-09-23 Thread Kay Schluehr
A new cookbook recipe suggesting two decorators @throws and @catches for treatment of checked exceptions in Python: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131 This might be of practical interest for some and theoretical interest for others - in particular those who know

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread metaperl
Robert Kern wrote: metaperl wrote: Hello, I am looking for a module which has You should look in the standard library before hitting the Package Index. http://www.python.org/doc/current/lib/module-logging.html Very nice module. Thanks for the pointer. --

re vs sre?

2006-09-23 Thread Lawrence D'Oliveiro
I learned about Python regular expressions from the Web documentation http://docs.python.org/lib/lib.html. This describes a module named re. Then I saw some code written by a colleague, and he was using a module named sre. I checked my Python 2.4.3 installation, and sure enough, I have a module

Re: Python and checked exceptions

2006-09-23 Thread Peter Otten
Kay Schluehr wrote: A new cookbook recipe suggesting two decorators @throws and @catches for treatment of checked exceptions in Python: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131 This might be of practical interest for some and theoretical interest for others - in

A critique of cgi.escape

2006-09-23 Thread Lawrence D'Oliveiro
The escape function in the cgi module escapes characters with special meanings in HTML. The ones that need escaping are '', '' and ''. However, cgi.escape only escapes the quote character if you pass a second argument of True (the default is False): cgi.escape(the \quick\ brown fox)

Re: Python and checked exceptions

2006-09-23 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Kay Schluehr wrote: A new cookbook recipe suggesting two decorators @throws and @catches for treatment of checked exceptions in Python: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131 This might be of practical interest for some and theoretical

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Bjoern Schliessmann wrote: In my C++ code, it happens so often that I forget or overread a !. And if I want to understand my functions later on, my brain quite wrinkles looking at parentheses, !s, s and ||s. Which is why C++ allows not, and and or. --

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], MonkeeSage wrote: I don't really see anything wrong with creating a custom class for evaluating those kinds of logical statements. It does make the code for statements more concise and easy to follow (with less binding ambiguity). Why not express everything in

Need compile python code

2006-09-23 Thread mistral
Need compile python code, source is in html and starts with parameters: #!/bin/sh - exec python -O $0 $@ I have installed ActivePython for windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: One program in different GUI Toolkits

2006-09-23 Thread metaperl
Franz Steinhaeusler wrote: Hello NG, I have a suggestion. For simplifying learning or switching between different GUI Toolkits, I could imagine to have one short clearly presented program in different GUI Toolkits. Anybody is interested in implementing in one other GUI? We could put in

Re: grabbing random words

2006-09-23 Thread MonkeeSage
Another approach would be to just scrape a CS's random (5.75 x 10^30) word haiku generator. ;) import urllib import libxml2 import random uri = 'http://www.cs.indiana.edu/cgi-bin/haiku' sock = urllib.urlopen(uri) data = sock.read() sock.close() doc = libxml2.htmlParseDoc(data, None)

Re: Application logging to screen and file - any favorite modules (no luck on cheeseshop)

2006-09-23 Thread metaperl
Bjoern Schliessmann wrote: metaperl wrote: Hello, I am looking for a module which has * log levels * output to stdout and file (either/or based on config) * nicely formatted log output (e.g., indentation when appropriate) Sorry for being nosey, but how'd you use indentation in a log?

Re: re vs sre?

2006-09-23 Thread Peter Otten
Lawrence D'Oliveiro wrote: I learned about Python regular expressions from the Web documentation http://docs.python.org/lib/lib.html. This describes a module named re. Then I saw some code written by a colleague, and he was using a module named sre. I checked my Python 2.4.3 installation, and

Re: re vs sre?

2006-09-23 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Peter Otten wrote: Lawrence D'Oliveiro wrote: I learned about Python regular expressions from the Web documentation http://docs.python.org/lib/lib.html. This describes a module named re. Then I saw some code written by a colleague, and he was using a module

Re: CONSTRUCT - New/Old Style Classes, build-in/extension types

2006-09-23 Thread Ilias Lazaridis
Steve Holden wrote: Ilias Lazaridis wrote: Steve Holden wrote: ... Though of course the easiest way to enforce your classes to new style is to begin each module with __metaclass__ = type I assume placing this in the central site import (e.g. sitecustomize.py) would collapse python? (I

QuoteSQL

2006-09-23 Thread Lawrence D'Oliveiro
Why doesn't MySQLdb provide a function like this: def QuoteSQL(Str, DoWild) : returns a MySQL string literal which evaluates to Str. Needed for those times when MySQLdb's automatic quoting isn't good enough. Result = [] for Ch in str(Str) : if Ch == \0 : Ch =

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread MonkeeSage
Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], MonkeeSage wrote: I don't really see anything wrong with creating a custom class for evaluating those kinds of logical statements. It does make the code for statements more concise and easy to follow (with less binding ambiguity).

Re: Need compile python code

2006-09-23 Thread Bjoern Schliessmann
mistral wrote: Need compile python code, source is in html and starts with parameters: Excuse me? #!/bin/sh - exec python -O $0 $@ Is the line break intended? I have installed ActivePython for windows. What exactly do you want? Python code is always compiled (to byte code) before it's

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread MonkeeSage
MonkeeSage wrote: Why not express everything in Conjunctive Normal Form? [snip] Oh, you meant the actual form. Duh! Yeah, that would work. For some reason I was thinking you were asking why I didn't implement the standard symbols, sorry. Regards, Jordan --

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: Which is why C++ allows not, and and or. Is this standards compliant? My reference (book) doesn't contain it, but g++ allows it. Regards, Björn -- BOFH excuse #441: Hash table has woodworm -- http://mail.python.org/mailman/listinfo/python-list

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread MonkeeSage
Bjoern Schliessmann wrote: Lawrence D'Oliveiro wrote: Which is why C++ allows not, and and or. Is this standards compliant? My reference (book) doesn't contain it, but g++ allows it. The C++ standard provides _operator keywords_ (Fig. 21.8) that can be used in place of several C++

Converting Perl Web Report to Python

2006-09-23 Thread [EMAIL PROTECTED]
I enjoyed Paul Barry's September article in Linux Journal entitled, Web Reporting with MySQL, CSS and Perl. It provides a simple, elegant way to use HTML to display database content without any sql markup in the cgi script. The cgi script simply calls the Mysql command line with the HTML option

Re: QuoteSQL

2006-09-23 Thread John Machin
Lawrence D'Oliveiro wrote: Why doesn't MySQLdb provide a function like this: Because the author has read PEP 8? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and checked exceptions

2006-09-23 Thread Diez B. Roggisch
This might be of practical interest for some and theoretical interest for others - in particular those who know checked ex as a language feature of Java. The trouble with having to declare every possible exception that a function might throw is that it rapidly turns into a complete mess.

Re: Need compile python code

2006-09-23 Thread mistral
Bjoern Schliessmann писал(а): mistral wrote: Need compile python code, source is in html and starts with parameters: Excuse me? #!/bin/sh - exec python -O $0 $@ Is the line break intended? I have installed ActivePython for windows. What exactly do you want? Python code is

Re: Need compile python code

2006-09-23 Thread mistral
Bjoern Schliessmann писал(а): mistral wrote: Need compile python code, source is in html and starts with parameters: Excuse me? #!/bin/sh - exec python -O $0 $@ Is the line break intended? I have installed ActivePython for windows. What exactly do you want? Python code is

Re: distutils on Windows with VC++ 8

2006-09-23 Thread Rob Williscroft
Rob Williscroft wrote in news:Xns9846DDC7A18E0rtwfreenetREMOVEcouk@ 216.196.109.145 in comp.lang.python: That's yet another option. Somebody reported that the compiler in the .NET SDK won't support generating optimized code, though. That's a problem for some people. I belive that was true

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread daniel
John Machin wrote: daniel wrote: there's a dll extension used to be imported with no error under version 2.4.3, but the new python complains that the name of the module can't be found. seems not mentioned in the official documentation, any work around to fix the issue without switching

Re: Python and checked exceptions

2006-09-23 Thread Kay Schluehr
Peter Otten wrote: Kay Schluehr wrote: A new cookbook recipe suggesting two decorators @throws and @catches for treatment of checked exceptions in Python: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498131 This might be of practical interest for some and theoretical

f2py on windows tutorials

2006-09-23 Thread Flavio
Hello, Compiling f2py extensions in Linux is a trivial task, You can even automate it with distutils. Now, in a Windows machine this does not seem to be an easy task. At least, I could not find any decent tutorial on how to do it. Is there a way to do this? Can some one point me to a tutorial.,

Re: One program in different GUI Toolkits

2006-09-23 Thread Wolfgang Keller
On Wed, 20 Sep 2006 08:27:30 +0200, Franz Steinhaeusler wrote (in article [EMAIL PROTECTED]): What about for example wxProject? What about something that could be actually useful for end-users? :- E.g. a GUI wrapper for Httrack? The back-end is already there:

Re: QuoteSQL

2006-09-23 Thread Anders J. Munch
Lawrence D'Oliveiro wrote: Why doesn't MySQLdb provide a function like this: def QuoteSQL(Str, DoWild) : returns a MySQL string literal which evaluates to Str. Needed for those times when MySQLdb's automatic quoting isn't good enough. Presumably because you're expected to use

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread John Machin
daniel wrote: John Machin wrote: daniel wrote: there's a dll extension used to be imported with no error under version 2.4.3, but the new python complains that the name of the module can't be found. seems not mentioned in the official documentation, any work around to fix the issue

Spliting a string on non alpha characters

2006-09-23 Thread stdazi
Hello! I'm relatively new to python but I already noticed that many lines of python code can be simplified to a oneliner by some clever coder. As the topics says, I'm trying to split lines like this : 'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala] 'foobbbar.. xyz' - [foo, bbbar, xyz]

help with debugging a ctypes problem

2006-09-23 Thread gap
I'm no c programmer, and I'm a ctypes newbie. I'll frame my problem as simply as I can. Sorry if it's too much or not enough info. I don't expect an explicit answer (but maybe), just help figuring out how to debug. WinXP, python 2.4.2 I'm using ctypes to access functions in a commercial

IDLE - Customizing output format

2006-09-23 Thread Ilias Lazaridis
IDLE has an output format like this: object type 'object' type type 'type' object.__class__ type 'type' object.__bases__ How can I customize it to become like that: object type 'object' type type 'type' object.__class__ type 'type' object.__bases__ or that:

Re: Spliting a string on non alpha characters

2006-09-23 Thread Tim Chase
I'm relatively new to python but I already noticed that many lines of python code can be simplified to a oneliner by some clever coder. As the topics says, I'm trying to split lines like this : 'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala] 'foobbbar.. xyz' - [foo, bbbar, xyz]

Re: Spliting a string on non alpha characters

2006-09-23 Thread Mark Peters
I'm relatively new to python but I already noticed that many lines of python code can be simplified to a oneliner by some clever coder. As the topics says, I'm trying to split lines like this : 'foo bar- blah/hm.lala' - [foo, bar, blah, hm, lala] 'foobbbar.. xyz' - [foo, bbbar, xyz]

Relative import first impressions

2006-09-23 Thread Anders J. Munch
Now 2.5 is out, and we have a syntax for explicit relative imports (PEP 328, http://www.python.org/dev/peps/pep-0328/, in case anyone wasn't paying attention). The long-term plan is that the classical import syntax becomes absolute import only, so that all imports are explicitly one or the other.

Re: Building things with setup.py

2006-09-23 Thread Martin v. Löwis
James Stroud schrieb: COMMENTARYThough great for self development, I'm not so sure such lessons should be necessary to build these tools./COMMENTARY Yes. The lesson you should take from this is: don't try to be smarter than the authors of the software. It should build out of the box, if you

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread daniel
thank you so much for your help.. I've got no idea about pyd or dll stuff, started to learn python just several weeks ago. so the implementation rules of python extension module must have been changed, for now, I have to wait for the new release of that module and switch back to python 2.4 to get

Re: Need compile python code

2006-09-23 Thread MonkeeSage
mistral wrote: Just to comple python ode - it creates html page, nothing more, nothing else.. Just generate one html page. I *think* this is what you want: python -O -m py_compile file.py python file.pyo See: http://docs.python.org/lib/module-pycompile.html Regards, Jordan --

ANN: PyDSTool v0.83.3 released

2006-09-23 Thread Rob Clewley
We are pleased to announce version 0.83.3 of our open-source simulation, modeling, and analysis package PyDSTool. New features include improved graphical capabilities in the PyCont bifurcation and continuation sub-package and its interface with AUTO, and better support for domain bound

Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling - nada, just stupid,primitive, straightforward call. And while there is a lot of help on embedding, I

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread Gerard Flanagan
volcano wrote: Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling - nada, just stupid,primitive, straightforward call. And while there is a lot of

Re: Timeline for Python?

2006-09-23 Thread wesley chun
In article [EMAIL PROTECTED], crystalattice [EMAIL PROTECTED] wrote: From: Sebastian Bassi [EMAIL PROTECTED] Date: Thurs, Aug 31 2006 7:51 am Subject: Re: Timeline for Python? Groups: comp.lang.python I am working on a Python book, since it could be completed in about a year (writing

Re: Help

2006-09-23 Thread wesley chun
From: Rrajal [EMAIL PROTECTED] Date: Mon, Sep 18 2006 9:50 am Subject: Re: Help Groups: comp.lang.python Hi there, I am new in this subject so could you please tell me from where I can get help (or good e-book) of python? do you have some kind of programming background? if so, good intro

Re: A critique of cgi.escape

2006-09-23 Thread Fredrik Lundh
Lawrence D'Oliveiro wrote: So I think the default for the second argument to cgi.escape should be changed to True. Or alternatively, the second argument should be removed altogether, and quotes should always be escaped. you're confused: cgi.escape(s) is designed to be used for ordinary text,

Re: Fatal error after RE-installing Python 2.3.4

2006-09-23 Thread Cappy2112
What happens when you run C:\Python2.3\python.exe from the command line (or the equivalent path)? How about pythonw.exe (or the windowed equivalent, not sure about the naming)? Are .py and .pyw files displayed with the correct icons? Yes. When installing Python packages, is Python 2.3

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Gerard Flanagan wrote: volcano wrote: Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling - nada, just stupid,primitive, straightforward call.

Re: no-installation version of python

2006-09-23 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Is there a stand-alone version of python out there that I can package with my scripts so that I don't have to bother with something like py2exe? why not just ship the standard python interpreter with your applications? just make a copy of the c:\python24 (or 25)

Re: Fatal error after RE-installing Python 2.3.4

2006-09-23 Thread Cappy2112
deleted the core 2.3.4 distribution [from where? how?] or uninstalled? Uninstalled Was c:\windows\system32\python23.dll blown away? Yes, as part of the uninstall process. Are you installing it for all users or for a single user? ALl users, using Admin priveledges Do a search for

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread Gerard Flanagan
volcano wrote: Gerard Flanagan wrote: volcano wrote: Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling - nada, just stupid,primitive,

Re: Running Python script from C++ code(.NET)

2006-09-23 Thread volcano
Gerard Flanagan wrote: volcano wrote: Gerard Flanagan wrote: volcano wrote: Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling -

Re: Need compile python code

2006-09-23 Thread mistral
MonkeeSage писал(а): mistral wrote: Just to comple python ode - it creates html page, nothing more, nothing else.. Just generate one html page. I *think* this is what you want: python -O -m py_compile file.py python file.pyo See: http://docs.python.org/lib/module-pycompile.html

Re: what's new missing

2006-09-23 Thread Lawrence Oluyede
David Isaac [EMAIL PROTECTED] wrote: What's New document for Python 2.5? http://docs.python.org/dev/whatsnew/whatsnew25.html pretends to hold it, but the links are corrupt. It's without /dev/ -- Lawrence - http://www.oluyede.org/blog Nothing is more dangerous than an idea if it's the only

Re: what's new missing

2006-09-23 Thread David Isaac
Alan Isaac [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Where does one get the What's New document for Python 2.5? http://docs.python.org/dev/whatsnew/whatsnew25.html pretends to hold it, but the links are corrupt. OK, here it is: http://docs.python.org/whatsnew/whatsnew25.html

Re: Need compile python code

2006-09-23 Thread MonkeeSage
mistral wrote: this not work for me, show compilation error. Is there simple way compile pythone file? its absolutely unclear with command line. Just show me exact command I need run(from python interactive shell?) OK... # cd to where the file.py is $ cd /some/dir # start python

Re: newbe's re question

2006-09-23 Thread [EMAIL PROTECTED]
These are csound files. Csound recently added python as a scripting language and is allowing also allowing csound calls from outside of csound. The nice thing about csound is that instead of worrying about virus and large files it is an interpiter and all the files look somewhat like html.

Re: Need compile python code

2006-09-23 Thread MonkeeSage
MonkeeSage wrote: import py_compile py_compiler.compile('file.py') ^^^ Should be: py_compile.compile('file.py') -- http://mail.python.org/mailman/listinfo/python-list

Re: Need compile python code

2006-09-23 Thread mistral
MonkeeSage wrote: mistral wrote: this not work for me, show compilation error. Is there simple way compile pythone file? its absolutely unclear with command line. Just show me exact command I need run(from python interactive shell?) OK... # cd to where the file.py is $ cd /some/dir

wxmsw26uh_vc.dll not found when using wxAgg backend

2006-09-23 Thread michel legrand
Hello, Copy wxmsw26uh_vc.dll inC:\python24\lib\site-packages\matplotlib\backends.To find wxmsw26uh_vc.dll, you can downloadwxPython2.6-win32-unicode-2.6.3.3-py24.exe,and execute in aspecific directory and extract the file wxmsw26uh_vc.dll(C:\...\wx-2.6-msw-unicode\wx) Regards, Michel

Re: Need compile python code

2006-09-23 Thread Carsten Haese
On 23 Sep 2006 12:24:58 -0700, mistral wrote No, something is wrong there. what I need is just compile one python file which will generate html page, with parameters: exec python -O $0 $@ This is not a python script. It appears to be a Unix shell script that calls a python script. Maybe it

Re: Need compile python code

2006-09-23 Thread MonkeeSage
mistral wrote: No, something is wrong there. what I need is just compile one python file which will generate html page, with parameters: exec python -O $0 $@ just need simple way do this(script is correct), i will not set any patches anywhere, can i do this wrom normal GUI? Hmmm... Are you

Re: anybody using python 2.5 that raises error while importing?

2006-09-23 Thread Martin v. Löwis
Dennis Lee Bieber schrieb: On 23 Sep 2006 09:24:09 -0700, daniel [EMAIL PROTECTED] declaimed the following in comp.lang.python: so the implementation rules of python extension module must have been changed, for now, I have to wait for the new release of that module and No change...

Re: f2py on windows tutorials

2006-09-23 Thread Robert Kern
Flavio wrote: Hello, Compiling f2py extensions in Linux is a trivial task, You can even automate it with distutils. Now, in a Windows machine this does not seem to be an easy task. At least, I could not find any decent tutorial on how to do it. Is there a way to do this? Can some one

Strange __future__ behavior in Python 2.5

2006-09-23 Thread mdsteele
My understanding of the __future__ statement is that you may say something like: from __future__ import foo, bar to enable more than one feature. However, this does not seem to be working properly in 2.5; it behaves as expected when typed into the interactive interpreter, but not when it is in

Re: Looking for opinions

2006-09-23 Thread Bruno Desthuilliers
crystalattice a écrit : I've been working on a game for several months but now I'm thinking I may be going about it the wrong way. It's an online RPG designed to recreate a pen paper session, kind of like the OpenRPG project. Originally I planned on doing something like OpenRPG with a

Re: help with debugging a ctypes problem

2006-09-23 Thread p . lavarre
help figuring out how to debug ... ctypes ... a commercial dll. A certain function takes five arguments, foo(a, b, c, d, e). Can I view the appropriate stack? ... Any other ideas or advice? etc? Did you call the foo of _cdecl ctypes.cdll or the foo of _stdcall = ctypes.windll? What is the

Re: returning None instead of value: how to fix?

2006-09-23 Thread Bruno Desthuilliers
sam a écrit : i am starting to experiment with recursion, and decided to write a fairly trivial little program which took a float as input, then called a function to halve it recursively until it was less than 1: And forgot to return the result from the recursive call, I guess ?-) --

Reverse a String?

2006-09-23 Thread Gregory Piñero
Is my mind playing tricks on me? I really remember being able to reverse a string as in: text='greg' print text.reverse() 'gerg' Is it possible thats in some Python install and not in others? I just switched to linux. In any case, can we get that added? Here's my workaround for now: def

Re: Reverse a String?

2006-09-23 Thread Robert Kern
Gregory Piñero wrote: Is my mind playing tricks on me? I really remember being able to reverse a string as in: text='greg' print text.reverse() 'gerg' Is it possible thats in some Python install and not in others? I just switched to linux. In any case, can we get that added? Not in

Re: returning None instead of value: how to fix?

2006-09-23 Thread Bruno Desthuilliers
Neil Cerutti a écrit : (snip) It's not out of the kindness of our hearts that we help. Heck, I don't know what it is. Probably I just like reading my own drivel on the internet and occassionally helping others is a good excuse. Lol !-) +1 OTQOTW --

Re: Reverse a String?

2006-09-23 Thread Leif K-Brooks
Gregory Piñero wrote: Is my mind playing tricks on me? I really remember being able to reverse a string as in: text='greg' print text.reverse() 'gerg' That method has never existed AFAIK. Maybe you're thinking of the reverse() method on lists? In any case, the you can reverse strings in

Re: something for itertools

2006-09-23 Thread Bruno Desthuilliers
George Sakkis a écrit : Daniel Nogradi wrote: In a recent thread, http://mail.python.org/pipermail/python-list/2006-September/361512.html, a couple of very useful and enlightening itertools examples were given and was wondering if my problem also can be solved in an elegant way by itertools. I

Re: Reverse a String?

2006-09-23 Thread p . lavarre
That 'foo'[::-1] is the Python reverse string idiom I'll try here forward, thanks. Also '.h.e.l.l.o'[1::2] to pick out every second char, etc., thanks. Three footnotes: 1) Reverse string isn't yet in http://www.python.org/doc/faq/ 2) Google Groups searches here yesterday instead pushed me

Re: Global module variables as default parameters

2006-09-23 Thread Christoph Haas
Thanks to all who answered. On Friday 22 September 2006 17:28, Marc 'BlackJack' Rintsch wrote: Christoph Haas wrote: TestModule.py globalvar = 0 def def1(): print globalvar def def2(foo=globalvar): print foo

Re: Reverse a String?

2006-09-23 Thread Gregory Piñero
On 9/23/06, Robert Kern [EMAIL PROTECTED] wrote: Not in that form, no, since this already exists: text[::-1] Wow, that's really cool! Here are my questions: 1. How long has this thing been going on? I didn't know slice even took an extra argument like that. 2. Where can I get the lowdown

Re: Isn't bool __invert__ behaviour strange?

2006-09-23 Thread Bjoern Schliessmann
MonkeeSage wrote: The C++ standard provides _operator keywords_ (Fig. 21.8) that can be used in place of several C++ operators. (Deitel Deitel, 2001; 1082). Thanks. Only if I'd known that earlier ;) Regards, Björn -- BOFH excuse #39: terrorist activities --

  1   2   >