Screen Shots?

2007-12-04 Thread katie smith
UGH so frustrating. In my game there is a minimap. On top of the minimap is a window showing the part of the map your viewing. The minimap is composed of other little pictures piled of top of eachother. I want to know how to basically take a picture from ex.((50,50),to (150,150)) and blit the

Re: writing results to array

2007-12-04 Thread Chris
On Dec 3, 10:45 pm, Bevan Jenkins [EMAIL PROTECTED] wrote: Hello, I have recently discovered the python language and am having a lot of fun getting head around the basics of it. However, I have run into a stumbling block that I have not been able to overcome, so I thought I would ask for

Re: compiling python source code under VC8

2007-12-04 Thread Martin v. Löwis
I am trying to build python from scratch under VC8. The build process runs and completes succesfully in debug mode resulting in python_d.exe. But when i try to run this exe it returns an assertion error and application crashes. What Python version are you trying to compile? This sounds like

Re: Generating API documentation as a textfile

2007-12-04 Thread Laurent Pointal
MonkeeSage a écrit : On Dec 3, 8:58 am, Samuel [EMAIL PROTECTED] wrote: On Mon, 03 Dec 2007 06:45:45 -0800, Giampaolo Rodola' wrote: dir.__doc__ This contains only the docstring one object (module, class, function, ...). I was thinking more of the complete API documentation that can be found

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Zara
On Sat, 1 Dec 2007 13:40:10 -0800 (PST), Russ P. [EMAIL PROTECTED] wrote: On Dec 1, 12:47 pm, J. Clifford Dyer [EMAIL PROTECTED] wrote: On Sat, 2007-12-01 at 12:10 -0800, Russ P. wrote: On Dec 1, 2:10 am, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: Russ P. wrote: I agree that

make money with bux!!

2007-12-04 Thread beronz
http://bux.to/?r=beronz use this link to register What is Bux.to? Bux.to is a new innovative, international and FREE English based service that allows advertisers to reach thousands of potential customers by displaying their ad on our, Surf Ads page. How does it work? You view websites in 30

Re: connect to server question

2007-12-04 Thread Martin v. Löwis
Here's the code I presently use in a Bash Shell script: /bin/mkdir -p /Volumes/A_Share /sbin/mount_afp afp://username:[EMAIL PROTECTED]/A_Share /Volumes/A_Share Can something similar be done with Python? You can always use os.system to do what the shell does, ie.

Re: os.access() under windows

2007-12-04 Thread Tim Golden
Martin v. Löwis wrote: It would be possible to fix this specific case, by always returning True for directories; and perhaps I'll do that for 2.5.2. Martin. Could you confirm that the outline below correctly describes the behaviour of the os.access function under Windows, please? If you

Why use Slot? from Peter Norvig's AI code

2007-12-04 Thread Davy
Hi all, When reading Python source code of Peter Norvig's AI book, I found it hard for me to understand the idea of slot (function nested in function). Please see program() nested in make_agent_program(), why not use program() directly? ## http://aima-python.googlecode.com/svn/trunk/agents.py

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread cokofreedom
On Dec 4, 11:36 am, MarkE [EMAIL PROTECTED] wrote: Ithon Pie - Fun -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread MarkE
Ithon -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Tóth Csaba
Dennis Lee Bieber írta: Changing the name of the language, at this stage, means giving up over ten years of history and rebuilding name recognition from scratch... Along with having to rename Jython, IronPython, CherryPy, probably Boa Constructor, the pysqlite DB adapter, numpy, scipy,

Re: Problems with import

2007-12-04 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi, I have some problems when importing a library. Suppose I have a directory /home/user/pythonlib/package in which I have a python- library called test.py. Now I want to import that, so I put the following directory into the PYTHONPATH: /home/user/pythonlib and in

PYTHONPATH and PYTHON_PATH

2007-12-04 Thread loial
Is there any difference? Does it matter which I use? -- http://mail.python.org/mailman/listinfo/python-list

Problems with import

2007-12-04 Thread alexLIGO
Hi, I have some problems when importing a library. Suppose I have a directory /home/user/pythonlib/package in which I have a python- library called test.py. Now I want to import that, so I put the following directory into the PYTHONPATH: /home/user/pythonlib and in my main python script I put:

Problems with import

2007-12-04 Thread Alexander Dietz
Hi, I have some problems when importing a library. Suppose I have a directory /home/user/pythonlib/package in which I have a python-library called test.py. Now I want to import that, so I put the following directory into the PYTHONPATH: /home/user/pythonlib and in my main python script I put:

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread grflanagan
On Dec 4, 11:53 am, [EMAIL PROTECTED] wrote: On Dec 4, 11:36 am, MarkE [EMAIL PROTECTED] wrote: Ithon Pie - Fun Pie-a-thon? http://montypython.tribe.net/thread/fd519910-25e3-4102-b898-8815d6ece32a http://www.flickr.com/photos/kirstywombat/1862165664/ --

Re: Problems with import

2007-12-04 Thread Alexander Dietz
Aaah, this it it! Thank you very much... Alex On Dec 4, 2007 11:49 AM, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I have some problems when importing a library. Suppose I have a directory /home/user/pythonlib/package in which I have a python- library

read lines

2007-12-04 Thread Horacius ReX
Hi, I have a text file like this; 1 -33.453579 2 -148.487125 3 -195.067172 4 -115.958374 5 -100.597841 6 -121.566441 7 -121.025381 8 -132.103507 9 -108.939327 10 -97.046703 11 -52.866534 12 -48.432623 13 -112.790419 14 -98.516975 15 -98.724436 So I want to write a program in python that reads

Re: Why use Slot? from Peter Norvig's AI code

2007-12-04 Thread Bruno Desthuilliers
Davy a écrit : Hi all, When reading Python source code of Peter Norvig's AI book, I found it hard for me to understand the idea of slot (function nested in function). First point : this code seems to be based on an older (way older) Python version, so some things would not be done that

Re: read lines

2007-12-04 Thread Chris
On Dec 4, 2:14 pm, Horacius ReX [EMAIL PROTECTED] wrote: Hi, I have a text file like this; 1 -33.453579 2 -148.487125 3 -195.067172 4 -115.958374 5 -100.597841 6 -121.566441 7 -121.025381 8 -132.103507 9 -108.939327 10 -97.046703 11 -52.866534 12 -48.432623 13 -112.790419 14

Re: python 2.5 - f=open('a_file.txt','w') gives [Errno 2]

2007-12-04 Thread dirkheld
How exactly are you starting the Python interpreter? No such file or directory on file creation can happen when you try to create a file in a directory that has ceased to exist: Damn...now it's time to be ashamed. Because of my new installation of leopard I used another computername. So the

Re: PYTHONPATH and PYTHON_PATH

2007-12-04 Thread Christian Heimes
loial wrote: Is there any difference? Does it matter which I use? Yes, it does matter. The former is interpreted by Python, the latter isn't. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: read lines

2007-12-04 Thread Zepo Len
Hi, I have a text file like this; 1 -33.453579 2 -148.487125 So I want to write a program in python that reads each line and detects which numbers of the second column are the maximum and the minimum. I tried with; import os, sys,re,string # first parameter is the name of the

Re: read lines

2007-12-04 Thread Neil Cerutti
On 2007-12-04, Horacius ReX [EMAIL PROTECTED] wrote: Hi, I have a text file like this; 1 -33.453579 2 -148.487125 3 -195.067172 4 -115.958374 5 -100.597841 6 -121.566441 7 -121.025381 8 -132.103507 9 -108.939327 10 -97.046703 11 -52.866534 12 -48.432623 13 -112.790419 14 -98.516975

Re: converting to and from octal escaped UTF--8

2007-12-04 Thread Piet van Oostrum
Michael Goerz [EMAIL PROTECTED] (MG) wrote: MG if (ord(character) 32) or (ord(character) 128): If you encode chars 32 it seems more appropriate to also encode 127. Moreover your code is quadratic in the size of the string so if you use long strings it would be better to use join. --

newbie:this program stops responding after pressing quit button

2007-12-04 Thread Boris
I am using windows vista and python 2.5 .This program stops responding after pressing quit button. I am not able to figure the problem out. please help. from Tkinter import * def greeting( ): print 'Hello stdout world!...' win = Frame( ) win.pack( ) Label(win, text='Hello container

Re: read lines

2007-12-04 Thread Piet van Oostrum
Horacius ReX [EMAIL PROTECTED] (HR) wrote: HR while 1: HR line = infile1.readline() You have an infinite loop. Fortunately your program stops because of the error. When you encounter end of file, line becomes the empty string and the split gives you only 1 item instead of 2. So add

Re: read lines

2007-12-04 Thread Zepo Len
Your regex is not working correctly I guess, I don't even know why you are using a regex, something like this would work just fine: import sys nums = [float(line.split(' -')[1]) for line in open(sys.argv[1])] print 'min=', min(nums), 'max=', max(nums) Sorry, that should be line.split() -

Re: converting to and from octal escaped UTF--8

2007-12-04 Thread MonkeeSage
On Dec 3, 8:10 am, Michael Goerz [EMAIL PROTECTED] wrote: MonkeeSage wrote: On Dec 3, 1:31 am, MonkeeSage [EMAIL PROTECTED] wrote: On Dec 2, 11:46 pm, Michael Spencer [EMAIL PROTECTED] wrote: Michael Goerz wrote: Hi, I am writing unicode stings into a special text file that requires to

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Marc 'BlackJack' Rintsch
On Tue, 04 Dec 2007 08:31:55 +0100, Zara wrote: On Sat, 1 Dec 2007 16:51:35 +0200, Dotan Cohen [EMAIL PROTECTED] wrote: On 30/11/2007, Gerardo Herzig [EMAIL PROTECTED] wrote: You will be eaten by the Snake-Ra god tonight! Wasn't Ra the Sun god? He meant quetzatcoatl. We could rename the

Re: Delete a instance passed by reference into a method

2007-12-04 Thread Carsten Haese
On Mon, 2007-12-03 at 18:27 -0800, hdante wrote: (note, you don't want to do this, it's a proof of concept) import sys class A(object): def __init__(self): pass def m1(self, x = None): if x == None: x =

Re: read lines

2007-12-04 Thread Bruno Desthuilliers
Chris a écrit : On Dec 4, 2:14 pm, Horacius ReX [EMAIL PROTECTED] wrote: Hi, I have a text file like this; 1 -33.453579 2 -148.487125 3 -195.067172 4 -115.958374 5 -100.597841 6 -121.566441 7 -121.025381 8 -132.103507 9 -108.939327 10 -97.046703 11 -52.866534 12 -48.432623 13

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Bjoern Schliessmann
Marc 'BlackJack' Rintsch wrote: On Tue, 04 Dec 2007 08:31:55 +0100, Zara wrote: He meant quetzatcoatl. We could rename the language. That name is already taken in the programming language domain. There's a Tiny C compiler for 6510 based targets: Uh, why don't take one of his aliases?

reloading modules and isinstance()

2007-12-04 Thread Tlis
I am using a software system with an embedded Python interpreter (version 2.3) for scripting. The KcsPoint2D.py module contains a Point2D class with the following method: def SetFromMidpoint(self, p1, p2): if not isinstance(p1, Point2D) or not isinstance(p2, Point2D): raise TypeError,

Re: read lines

2007-12-04 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : (snip) # Notice that here, b is a string, not a number... try: b = int(tmp[1]) oops, I meant: b = float(tmp[1]) Idem here: def extract_number(iterable): for linenum, line in enumerate(iterable): try:

RE:connect to server question

2007-12-04 Thread jyoung79
Hi Martin, Thanks very much for your help. This works perfect!! Jay Here's the code I presently use in a Bash Shell script: /bin/mkdir -p /Volumes/A_Share /sbin/mount_afp afp://username:[EMAIL PROTECTED]/A_Share /Volumes/A_Share Can something similar be done with Python? You

Re: reloading modules and isinstance()

2007-12-04 Thread Diez B. Roggisch
Tlis wrote: I am using a software system with an embedded Python interpreter (version 2.3) for scripting. The KcsPoint2D.py module contains a Point2D class with the following method: def SetFromMidpoint(self, p1, p2): if not isinstance(p1, Point2D) or not isinstance(p2, Point2D):

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread George Sakkis
On Dec 3, 12:50 pm, Russ P. [EMAIL PROTECTED] wrote: I know this because I've been through it myself. When I tell people that I use Python, I often qualify it by pointing out that it is used extensively at Google. In other words, I'm banking on the reputation of Google to offset the goofiness

Die, thread! Die! (Was Re: Python is not a good name)

2007-12-04 Thread Shane Geiger
Die, thread! Die! grflanagan wrote: On Dec 4, 11:53 am, [EMAIL PROTECTED] wrote: On Dec 4, 11:36 am, MarkE [EMAIL PROTECTED] wrote: Ithon Pie - Fun Pie-a-thon? http://montypython.tribe.net/thread/fd519910-25e3-4102-b898-8815d6ece32a

Python surpasses Perl in TIOBE index

2007-12-04 Thread marcpenninga
This is *not* an attempt to start yet another Python-versus- AnyOtherProgrammingLanguage flame war, but I thought people might be interested in this: http://www.tiobe.com/tpci.htm Marc -- http://mail.python.org/mailman/listinfo/python-list

Question involving a Python app...

2007-12-04 Thread Nick Watton
hi not a direct answer to your question, but fixes the issue. full details of a work-around at this link: http://www.sephiroth.it/phpBB/showthread.php?t=9244 cheers Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread George Sakkis
On Dec 4, 10:08 am, [EMAIL PROTECTED] wrote: This is *not* an attempt to start yet another Python-versus- AnyOtherProgrammingLanguage flame war, but I thought people might be interested in this: http://www.tiobe.com/tpci.htm Marc Cool (assuming these numbers actually mean something), but

Re: read lines

2007-12-04 Thread Peter Otten
Bruno Desthuilliers wrote: # You don't need to read the whole file in memory lines1, lines2 = tee(infile) print min(extract_numbers(lines1)), max(extract_numbers(lines2)) tee() internally maintains a list of items that were seen by one but not all of the iterators returned. Therefore after

Re: Die, thread! Die! (Was Re: Python is not a good name)

2007-12-04 Thread bryan rasmussen
Could we name Stackless Die, microthread! Die! then? Cheers, Bryan Rasmussen On Dec 4, 2007 4:04 PM, Shane Geiger [EMAIL PROTECTED] wrote: Die, thread! Die! grflanagan wrote: On Dec 4, 11:53 am, [EMAIL PROTECTED] wrote: On Dec 4, 11:36 am, MarkE [EMAIL PROTECTED] wrote: Ithon

Re: newbie:this program stops responding after pressing quit button

2007-12-04 Thread Michael Speer
On Dec 4, 2007 8:32 AM, Boris [EMAIL PROTECTED] wrote: I am using windows vista and python 2.5 .This program stops responding after pressing quit button. I am not able to figure the problem out. please help. from Tkinter import * def greeting( ): print 'Hello stdout world!...' win =

Re: Escaping the semicolon?

2007-12-04 Thread Sergio Correia
On Dec 4, 2007 10:40 AM, Nick [EMAIL PROTECTED] wrote: Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' Everything is Ok. It's still a single backslash. Try: print s.replace(';', '\;') Or x = s.replace(';', '\;') print x Best, Sergio --

Re: Escaping the semicolon?

2007-12-04 Thread Bruno Desthuilliers
Nick a écrit : Hi all, Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' print s.replace(';', '\;') 123\;abc I just wanted a single backslash. You got it - even if it's not obvious !-) I can see why this probably happens but i wondered if it is definitely

Re: os.access() under windows

2007-12-04 Thread Martin v. Löwis
Martin. Could you confirm that the outline below correctly describes the behaviour of the os.access function under Windows, please? It's correct for Python 2.5.2 and 2.6; for 2.5.1 (as discussed) the test if directory:return True was not implemented. Notice that the first sentence: If the

Re: Escaping the semicolon?

2007-12-04 Thread Diez B. Roggisch
Nick wrote: Hi all, Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' I just wanted a single backslash. I can see why this probably happens but i wondered if it is definitely intentional. There is only a single backslash. But the interactive prompt will use

Re: read lines

2007-12-04 Thread Bruno Desthuilliers
Peter Otten a écrit : Bruno Desthuilliers wrote: # You don't need to read the whole file in memory lines1, lines2 = tee(infile) print min(extract_numbers(lines1)), max(extract_numbers(lines2)) tee() internally maintains a list of items that were seen by one but not all of the iterators

Escaping the semicolon?

2007-12-04 Thread Nick
Hi all, Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' I just wanted a single backslash. I can see why this probably happens but i wondered if it is definitely intentional. Thanks Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Duncan Booth
George Sakkis [EMAIL PROTECTED] wrote: Even more amazing is the rate C++ is losing ground: http://www.tiobe.com/tiobe_index/C__.html Given that the ratings are relative it may simply indicate that C++ is standing still while the others run ahead. --

Re: Escaping the semicolon?

2007-12-04 Thread Tim Chase
Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' You're asking the interpreter to print a representation of your string, so it does so. Representations wrap the results in quotes and escape characters within that need escaping. s.replace(';', '\;') '123\\;abc'

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Paul Rudin
George Sakkis [EMAIL PROTECTED] writes: Even more amazing is the rate C++ is losing ground: http://www.tiobe.com/tiobe_index/C__.html I don't really find surprising that low level languages lose ground at the expense of higher level ones. The developer-time/run-time trade-off tends to move in

Re: newbie:this program stops responding after pressing quit button

2007-12-04 Thread Eric Brunel
On Tue, 04 Dec 2007 14:32:34 +0100, Boris [EMAIL PROTECTED] wrote: I am using windows vista and python 2.5 .This program stops responding after pressing quit button. I am not able to figure the problem out. please help. from Tkinter import * def greeting( ): print 'Hello stdout

Re: Escaping the semicolon?

2007-12-04 Thread Mel
Nick wrote: Is this expected behavior? s = '123;abc' s.replace(';', '\;') '123\\;abc' I just wanted a single backslash. I can see why this probably happens but i wondered if it is definitely intentional. What you're seeing on the screen is a literalization of the string value for the

Re: os.access() under windows

2007-12-04 Thread Tim Golden
Martin v. Löwis wrote: Martin. Could you confirm that the outline below correctly describes the behaviour of the os.access function under Windows, please? It's correct for Python 2.5.2 and 2.6; for 2.5.1 (as discussed) the test if directory:return True was not implemented. Thanks. Version

Re: Different kinds of Import Errors

2007-12-04 Thread Thomas Guettler
Graham Dumpleton schrieb: What example did you use to test it? What version of Python are you using? Yes, this changed. Python 2.3 includes the half imported module. Python 2.4 does not. But the traceback of the exception contains the needed information: Here are the two example files: #

Re: Escaping the semicolon?

2007-12-04 Thread Nick
Thanks guys, you answered that interactive prompt question really clearly however, whats going on here. This works now - working_string = '123;abc' search_string = ';' print working_string.replace(search_string, '\\' + search_string) 123\;abc But this doesn't - --- import sys import string

Re: os.access() under windows

2007-12-04 Thread Martin v. Löwis
Now, ironically, I'm confused by your recap :) What I meant to say was that the os.access function as implemented under Windows returns False if the path in question (say, x:\someones-private-docs\diary.doc) was inaccessible to the process invoking os.access by virtue of file system

Re: Escaping the semicolon?

2007-12-04 Thread Jerry Hill
On Dec 4, 2007 11:33 AM, Nick [EMAIL PROTECTED] wrote: Try 123 *?/ abc d;o /$' as the argument... and you get - 123 \*\?\/ abc d\\;o \/\$ That's because of the order you're doing the replacement. Put a print statement inside your for loop and you'll see something like this: input starts as

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread George Sakkis
On Dec 4, 11:07 am, Paul Rudin [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] writes: Even more amazing is the rate C++ is losing ground: http://www.tiobe.com/tiobe_index/C__.html I don't really find surprising that low level languages lose ground at the expense of higher level

Re: Escaping the semicolon?

2007-12-04 Thread Nick
If you move '\\' to the front of your list of replacement characters, things will probably work as you expect. -- Jerry I knew it would be something like that! Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access() under windows

2007-12-04 Thread Tim Golden
Martin v. Löwis wrote: Now, ironically, I'm confused by your recap :) What I meant to say was that the os.access function as implemented under Windows returns False if the path in question (say, x:\someones-private-docs\diary.doc) was inaccessible to the process invoking os.access by virtue of

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Paul Rudin
George Sakkis [EMAIL PROTECTED] writes: On Dec 4, 11:07 am, Paul Rudin [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] writes: Even more amazing is the rate C++ is losing ground: http://www.tiobe.com/tiobe_index/C__.html I don't really find surprising that low level languages lose

Re: Why use Slot? from Peter Norvig's AI code

2007-12-04 Thread Terry Reedy
Davy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Hi all, | | When reading Python source code of Peter Norvig's AI book, I found it | hard for me to understand the idea of slot (function nested in | function). Please see program() nested in make_agent_program(), | why not use

Re: os.access() under windows

2007-12-04 Thread Martin v. Löwis
Up to a point: this meets the case where we fail to access the file at all (for read or write or whatever). But what about where we can read the directory entry, and the read-only attribute isn't set? At present, we'll return True to a W_OK access check in these circs, but this user might in

Tool for translating Matlab to Python?

2007-12-04 Thread Rolf Wester
Hi, is there a tool to automatically translate Matlab source to Python/numpy code? Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Tool for translating Matlab to Python?

2007-12-04 Thread Shane Geiger
I would like such a tool, too. Could someone with an interest in MatLab help me figure out how to express this in Python? :-) http://caprolibra.com/B10g/images/OptI_column_effect1/index.html Rolf, you may not have seen this recently on this list:

Re: Different kinds of Import Errors

2007-12-04 Thread Gabriel Genellina
On 1 dic, 02:41, Graham Dumpleton [EMAIL PROTECTED] wrote: On Dec 1, 12:24 am, Thomas Guettler [EMAIL PROTECTED] wrote: Sorry, but this does not work. If there is an ImportError during importing the existing module, it won't get inserted into sys.modules. I just tried it with a small

PyObjC and Webkits

2007-12-04 Thread Tommy Grav
I am trying to install PyObjC 1.4 on my Mac OS X 10.4.11. I run: [EMAIL PROTECTED] Temporary/pyobjc-1.4 -- python setup.py bdist_mpkg -- open ** using pyobjc source-deps py2app for building running bdist_mpkg installing to build/bdist.macosx-10.3-fat/mpkg running build running build_py running

Undefined Symbols while importing modules

2007-12-04 Thread [EMAIL PROTECTED]
Hi all, I have been learning to write Python extension modules, and am quite at a loss over a small glitch thats taking place. When I import my module I get the following exception import pygsmd Traceback (most recent call last): File stdin, line 1, in module File

Re: writing results to array

2007-12-04 Thread Bevan Jenkins
Thank you all very much. Firstly for providing an answer that does exactly what I require. But also for the hints on the naming conventions and the explanations of how I was going wrong. Thanks again, b -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Lou Pecora
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: http://www.tiobe.com/tpci.htm But dreaded Ruby is coming up fast. Run Away! Run Away! HAHAHAHAHAHA. -- -- Lou Pecora -- http://mail.python.org/mailman/listinfo/python-list

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Lou Pecora
In article [EMAIL PROTECTED], George Sakkis [EMAIL PROTECTED] wrote: On Dec 4, 10:08 am, [EMAIL PROTECTED] wrote: This is *not* an attempt to start yet another Python-versus- AnyOtherProgrammingLanguage flame war, but I thought people might be interested in this:

Re: using pdb and catching exception

2007-12-04 Thread Diez B. Roggisch
Amit Gupta schrieb: On Dec 3, 11:10 am, Amit Gupta [EMAIL PROTECTED] wrote: Thanks Frank. But again, this results into stack-track when the exception is caught. On the other hand, I would like the debug-trace just before throwing the exception. As a case, I might be debugging code, where the

Re: python 2.5 - f=open('a_file.txt','w') gives [Errno 2]

2007-12-04 Thread Bruno Desthuilliers
dirkheld a écrit : How exactly are you starting the Python interpreter? No such file or directory on file creation can happen when you try to create a file in a directory that has ceased to exist: Damn...now it's time to be ashamed. Because of my new installation of leopard I used another

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Kristina ivana
On 4 Dec 2007 13:40:47 GMT, Marc 'BlackJack' Rintsch declaimed the following in comp.lang.python: On Tue, 04 Dec 2007 08:31:55 +0100, Zara wrote: He meant quetzatcoatl. We could rename the language. That name is already taken in the programming

Re: Python is not a good name, should rename to Athon

2007-12-04 Thread Gabriel Genellina
En Tue, 04 Dec 2007 14:49:36 -0300, Dennis Lee Bieber [EMAIL PROTECTED] escribió: How about the cognate: Kulkukan? You meant Kukulkan. If you got it wrong from Apocalypto (Mel Gibson), well, it's just one of many errors in the film... -- Gabriel Genellina --

Re: Screen Shots?

2007-12-04 Thread Mike C. Fletcher
katie smith wrote: UGH so frustrating. In my game there is a minimap. On top of the minimap is a window showing the part of the map your viewing. The minimap is composed of other little pictures piled of top of eachother. I want to know how to basically take a picture from ex.((50,50),to

Re: Delete a instance passed by reference into a method

2007-12-04 Thread hdante
On Dec 4, 11:47 am, Carsten Haese [EMAIL PROTECTED] wrote: On Mon, 2007-12-03 at 18:27 -0800, hdante wrote: (note, you don't want to do this, it's a proof of concept) import sys class A(object): def __init__(self): pass def m1(self, x = None): if x ==

Python Class Best Practice

2007-12-04 Thread Rod Person
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been doing python programming for about 2 years as a hobby and now I'm finally able to use it at work in an enterprise environment. Since I will be creating the base classes and libraries I wondering which why is consider best when creating

Re: Python Class Best Practice

2007-12-04 Thread Gary Herron
Rod Person wrote: I've been doing python programming for about 2 years as a hobby and now I'm finally able to use it at work in an enterprise environment. Since I will be creating the base classes and libraries I wondering which why is consider best when creating python classes: 1: class

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread greg
George Sakkis wrote: Well we Python folks are spoiled but for most people C++ counts as a high level language Well, some parts are high-level, but it's full of very deep elevator shafts for you to accidentally fall into... A truly high-level language also *doesn't* have low level parts (or at

Re: Any idea how to open Matlab and run M-files by using Python?

2007-12-04 Thread [EMAIL PROTECTED]
On Dec 3, 6:12 pm, sturlamolden [EMAIL PROTECTED] wrote: On 3 Des, 05:02, itcecsa [EMAIL PROTECTED] wrote: I am implementing a small Python project, what I am going to do is to open Matlab and run some M-files, and get some output from Matlab command prompt. I have no idea how to open

project - trivia game

2007-12-04 Thread Shawn Minisall
For my final project, I'm trying to do a GUI based game similar to are you smarter then a 5th grader. I've been working on it and am stuck with some code someone helped me with to randomize the A,B,C,D letters that the correct answer is assigned too. The code that does this is highlighted in

RE project - trivia game

2007-12-04 Thread Shawn Minisall
Sorry, 4got to send it in html for the bold parts. thx def drawMainMenu(win): #define and draw the buttons mainMenuList = [] mainMenuList.append (CreateRect(4,6,7,8,grey,win)) mainMenuList.append (CreateRect(3.5,6.5,5,6,grey,win)) mainMenuList.append

Re: Python Class Best Practice

2007-12-04 Thread Rod Person
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 04 Dec 2007 15:51:18 -0800 Gary Herron [EMAIL PROTECTED] wrote: Rod Person wrote: 1: class Foo(object): member1='' member2=0 def __init__(self,member1='',member2=0): self.member1 = member1 self.member2 =

Getting wxPython to work on a Mac

2007-12-04 Thread Timothy Smith
Not sure exactly what I need to do to get wxPython to work on either of my Macs. (One's a notebook running Tiger (OS X 10.4.11), the other a Mac Pro running Leopard (10.5.1.)) I downloaded what should be the latest binary, and it installed without error. So Python comes up as $ python -V

Why Python 3?

2007-12-04 Thread Chris Gonnerman
I spent some time today reading about Python 3, and specifically the differences between Python 3 and Python 2, and I was left with a question... why? Why bother to change to Python 3, when the CPython implementation is slower, and probably will be for a while? When I learned Python, 1.5 was

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Daniel Fetchinson
Well we Python folks are spoiled but for most people C++ counts as a high level language Well, some parts are high-level, but it's full of very deep elevator shafts for you to accidentally fall into... A truly high-level language also *doesn't* have low level parts (or at least doesn't

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Daniel Fetchinson
On 12/4/07, Daniel Fetchinson [EMAIL PROTECTED] wrote: Well we Python folks are spoiled but for most people C++ counts as a high level language Well, some parts are high-level, but it's full of very deep elevator shafts for you to accidentally fall into... A truly high-level

Re: Python Class Best Practice

2007-12-04 Thread Pavan Mishra
On Dec 5, 4:18 am, Rod Person [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've been doing python programming for about 2 years as a hobby and now I'm finally able to use it at work in an enterprise environment. Since I will be creating the base classes and

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Roy Smith
In article [EMAIL PROTECTED], Daniel Fetchinson [EMAIL PROTECTED] wrote: Anyone has an idea what the huge peak around the middle of 2004 can be attributed to? There's a Q/A section at the bottom of http://www.tiobe.com/index.htm?tiobe_index which covers this: Q: What happened to Java in

Re: Why Python 3?

2007-12-04 Thread Carl Banks
On Dec 4, 11:39 pm, Chris Gonnerman I don't think I can surely be the only one. Certainly, I'm nobody important; it's not as if my opinion has any real bearing on the situation. I suspect that many Python coders will stay with 2.x; after all, this is Open Source... there is no Micro$oft

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Carl Banks
On Dec 4, 10:24 am, George Sakkis [EMAIL PROTECTED] wrote: Cool (assuming these numbers actually mean something), but this has more to do with Perl's fall than Python's increase:http://www.tiobe.com/tiobe_index/Perl.html. I'd say that's even better news. Even more amazing is the rate C++ is

Re: YOU MUST KNOW THIS MAN

2007-12-04 Thread Deltantor
aassime abdellatif wrote: In The Name Of Allaah, Most Gracious, Most Merciful YOU MUST KNOW THIS MAN MUHAMMAD (May peace and blessings of God Almighty be upon him) You may be an atheist or an agnostic; or you may belong to anyone of

Re: Python surpasses Perl in TIOBE index

2007-12-04 Thread Deltantor
[EMAIL PROTECTED] wrote: This is *not* an attempt to start yet another Python-versus- AnyOtherProgrammingLanguage flame war, but I thought people might be interested in this: http://www.tiobe.com/tpci.htm Marc Real programmers use brainfuck. Kidding of course, I believe someone should

Re: project - trivia game

2007-12-04 Thread Ramsey Nasser
Shawn, First of all, next time try and isolate the problem yourself and send a short snippet of code demonstrating the behavior you're having trouble with. This makes it easier for other people to understand what is going on and help you in a more focused way. On Dec 5, 2007 2:43 AM, Shawn

  1   2   >