Re: [Tutor] os.listdir fn

2004-12-11 Thread Kent Johnson
Are you sure this does what you want? You compute 'scripts' and 'filenames' and throw them away. I think this function will return the base name of all the files *and folders* in ./icon.scripts/opname. If you are trying to return the base name of every file or directory whose extension is '.scrip

[Tutor] Any Math Modules ?

2004-12-11 Thread Harm Kirchhoff
I am currently updating the DMOZ section of: http://www.dmoz.org/Computers/Programming/Languages/Python/Modules/Math_and_Calculations/ If anyone has some useful python packages for math that are not listed in DMOZ, please let me know. It makes life much easier if your code can be found by search en

Re: [Tutor] Re: Could I have used time or datetime modules here?

2004-12-11 Thread Kent Johnson
Liam Clarke wrote: As far as I know, you'll either have to - run Python 2.3 or - run Python 2.3 until they release a new version of Pygame, Yes, any Python addon that uses .pyd or .dll files has to be recompiled for Python2.4. Pygame has many .pyd files so you have to use Python 2.3. Here is a th

[Tutor] function that returns a fn

2004-12-11 Thread Nandan
I'm looking for resources to help me with a fn that returns a fn after binding one of its arguments (aka currying, like the bind1st of C++) Considering Python syntax is quite straightforward, this is my first try: def getjlistrenderer(opname): def listrender(): # use opnam

[Tutor] Pygame problems

2004-12-11 Thread David Holland
I am not sure if this is the right place, apologies if not. Anyway in a game I wrote using pygame, I would like to increase the initial message so it is over several lines. This is the code in the example game if pygame.font: font = pygame.font.Font(None, 36) text = font.render

Re: [Tutor] function that returns a fn

2004-12-11 Thread Kent Johnson
Yes, it really is that simple. :-) A common example is a function that makes a function which adds a constant to its argument: >>> def makeadder(n): ... def adder(x): ... return x + n ... return adder ... Make a function that adds 3 to its argument...note there is no special syntax for the

[Tutor] Re: Pygame problems

2004-12-11 Thread Lee Harr
I am not sure if this is the right place, apologies if not. http://pygame.org/ http://pygame.org/info.shtml#maillist Now how can I get this to be on more than one line and bigger (for my simple game I need a much more detailed explanation). http://mu.arete.cc/pcr/ http://mu.arete.cc/pcr/proj/text

Re: [Tutor] PDF and Python

2004-12-11 Thread Aztech Guy
Hi, If you only want to convert text files, this tool I wrote may be even easier than using ReportLab: http://sourceforge.net/projects/xtopdf It is based on ReportLab. You can use it both as a standalone command-line tool, to convert a single text file to PDF. Run PDFWriter.py. You can easily