Re: where are the program that are written in python?

2010-05-23 Thread alex23
Gregory Ewing wrote: > I came across a game on Big Fish Games recently (it was > "The Moonstone" IIRC) that appeared to have been built using > Python and py2app. Python tends to be used more for scripting internal game logic than for every aspect of a game (which is, IMO, the right way to go abo

Re: MySQL, Python, NumPy and formatted read

2010-05-23 Thread Ian Hoffman
On May 23, 6:54 pm, Matteo Landi wrote: > I know anything about mysqldb and fetchone method, but it's easy to > create a numpy array, given a tuple of data: > > > > >>> import numpy > > >>> t = ('1', '2', '3') > >>> numpy.array(t, int) > array([1, 2, 3]) > > I made the assumption that mysqldb.fetc

Extended deadline (15 July 2010): CACS Singapore [EI Compendex,ISTP,IEEE Xplore]

2010-05-23 Thread Andrew
[ Please forward to those who may be interested. Thanks. ] == 2010 International Congress on Computer Applications and Computational Science CACS 2010 http://irast.org/conferences/CACS/2010 4-6 December 2010, Singapore

python urllib mechanize post problem

2010-05-23 Thread ken
hello ALL im making some simple python post script but it not working well. there is 2 part to have to login. first login is using 'http://mybuddy.buddybuddy.co.kr/userinfo/ UserInfo.asp' this one. and second login is using 'http://user.buddybuddy.co.kr/usercheck/ UserCheckPWExec.asp' i can lo

Re: MySQL, Python, NumPy and formatted read

2010-05-23 Thread Matteo Landi
I know anything about mysqldb and fetchone method, but it's easy to create a numpy array, given a tuple of data: >>> import numpy >>> >>> t = ('1', '2', '3') >>> numpy.array(t, int) array([1, 2, 3]) >>> I made the assumption that mysqldb.fetchone return a tuple of strings, so we need to create an

MySQL, Python, NumPy and formatted read

2010-05-23 Thread Ian Hoffman
Hello, I'm having significant Python difficulties (and I'm new to Python). I'm trying to read BLOB ASCII (numerical) data from a MySQL database using MySQLdb in a formatted fashion. The BLOB data is a sequence of numbers separated by newlines (\n), like this: 5 6 10 45 etc. When I read the data

Re: How to show the current line number with pdb.set_trace()

2010-05-23 Thread Miki
Hello, > After starting pdb.set_trace(), python doens't show line number. Could > you let me know how to print the number by default so that I know > where the current line is? When you get the PDB prompt, just type "l". It'll show some code with an error on the current line. You can also type "?

Re: |help| python 3.12

2010-05-23 Thread Gary Herron
On 05/23/2010 08:13 AM, Filipe wrote: I'm with a problem I'm doing a program in python, it sends the following error message: File "C:/Documents and Settings/Filipe Vinicius/Desktop/Filipe/Cefet/ LP/Python/trab.sistema.academico/sistemaacademico.2010.5.23.c.py", line 40, in administrador lp

Re: Help (I can't think of a better title)

2010-05-23 Thread duncan smith
Alex Hall wrote: On 5/22/10, MRAB wrote: Lanny wrote: The answer may be right infront of me but I really can't figure this out. I'm trying to build a interactive fiction kind of game, silly I know but I am a fan of the genre. I'm trying to build up an index of all the rooms in the game from an

Re: Ugly modification of a class, can it be done better ?

2010-05-23 Thread Albert van der Horst
In article <4bf5e19e$0$27861$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >Sorry for breaking threading, but Stef's original post has not come >through to me. > >> On Thu, May 20, 2010 at 8:13 PM, Stef Mientki >> wrote: > >>> So I want to change the behavior of the class dynamically. I've

|help| python 3.12

2010-05-23 Thread Filipe
I'm with a problem I'm doing a program in python, it sends the following error message: File "C:/Documents and Settings/Filipe Vinicius/Desktop/Filipe/Cefet/ LP/Python/trab.sistema.academico/sistemaacademico.2010.5.23.c.py", line 40, in administrador lp = pickle.load(f) File "D:\Arquivos De

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Duncan Booth
Frank GOENNINGER wrote: > > When trying to execute main() I get: > > Traceback (most recent call last): > File "/.../src/pib/logging.py", line 37, in > main() > File "/.../src/pib/logging.py", line 33, in main > mylogger = PIBLogger('/tmp/pib.log') > File "/...src/pib/logging.py"

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Philip Semanchuk
On May 23, 2010, at 9:46 AM, Frank GOENNINGER wrote: Hi all: Being completely new to Python still (just about a week into it now) I tried to follow the Python 2.6.5 version documemtation aiming at setting up a logger as follows: import logging global gPIBLogger class PIBLogger(object)

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Simon Brunning
On 23 May 2010 14:46, Frank GOENNINGER wrote: > Traceback (most recent call last): >  File "/.../src/pib/logging.py", line 37, in >    main() Here's a clue - looks like your own module is called logging. That's what's getting imported by your import. Try naming your module something else, and yo

logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Frank GOENNINGER
Hi all: Being completely new to Python still (just about a week into it now) I tried to follow the Python 2.6.5 version documemtation aiming at setting up a logger as follows: import logging global gPIBLogger class PIBLogger(object): ''' TODO: classdocs ''' def __init__(self

Re: Urllib2: Only a partial page retrieved

2010-05-23 Thread Dragon Lord
Thanks, that works perfectly! (oh and I learnt something new too, because I tried using telnet to connect to the server :) ) On May 23, 11:42 am, hpsMouse wrote: > I know what the problem is. > > Server checks client's locale setting to determine how the date should > be displayed. Python don't

Re: where are the program that are written in python?

2010-05-23 Thread sturlamolden
On 23 Mai, 10:47, David Cournapeau wrote: > I would rather say that Python vs C does not matter until it does, I disagree. C matters because it is portable assembly code. Which means it is tedious and error prone to use, so avoiding it actually matters. Hence C matters. Knowing when and when not

Re: Urllib2: Only a partial page retrieved

2010-05-23 Thread hpsMouse
I know what the problem is. Server checks client's locale setting to determine how the date should be displayed. Python don't send locale information by default. So server fails at that point. If you add the following field in the HTTP request, the response will be correct: Accept-Language: en --

Re: Urllib2: Only a partial page retrieved

2010-05-23 Thread hpsMouse
On 5月22日, 下午5时43分, Dragon Lord wrote: > The cutoff is allways at the same location: just after the label > "Meeting date" and before the date itself. Could it be that something > is interpreted as and eof command or something like that? > > example of the cutoff point with a bad page: > Meeting Da

Re: First Tkinter script: requesting comments

2010-05-23 Thread Peter Otten
Francesco Bochicchio wrote: > One thing I don't understand, is why you need to 'poll' continuously > for changes, except for demo purpose. You can give the user immediate feedback on changes he makes. I'd argue that e. g. an "auto-apply" dialog with a revert button is much more usable and am su

Re: where are the program that are written in python?

2010-05-23 Thread David Cournapeau
On Sun, May 23, 2010 at 5:19 PM, Lie Ryan wrote: > But the point still hold, that in real life, often the language's raw > speed doesn't really limit the program's speed. I would rather say that Python vs C does not matter until it does, and it generally does when constants factor matter (which

Re: Help (I can't think of a better title)

2010-05-23 Thread Nobody
On Sat, 22 May 2010 17:16:40 -0700, Lanny wrote: > Ideally roomlist['start_room'].exits would equal {'aux_room' : 'west', > 'second_room' : 'north'} but it doesn't. Sorry if this is unclear or too > long, but I'm really stumped why it is giving bad output Just to condense a point which the other

Re: where are the program that are written in python?

2010-05-23 Thread Lie Ryan
On 05/23/10 04:49, Terry Reedy wrote: > On 5/21/2010 11:03 PM, Lie Ryan wrote: >> On 05/22/10 04:47, Terry Reedy wrote: >>> On 5/21/2010 6:21 AM, Deep_Feelings wrote: python is not a new programming language ,it has been there for the last 15+ years or so ? right ? however

Re: First Tkinter script: requesting comments

2010-05-23 Thread Francesco Bochicchio
On 21 Mag, 23:51, Bart Kastermans wrote: > I wrote a first script using Tkinter.  As I am new to its > use, I am only just feeling my way around.  I would very > much like comments on the design of the script (and in fact > any other comments on my code would also be very welcome). > > I have it p