Re: [Tutor] (no subject)

2010-10-30 Thread Dave Angel
On 2:59 PM, Alan Gauld wrote: "Steven D'Aprano" wrote is actually being executed. There are very few programming tasks harder than trying to debug code that doesn't actually contain any bugs, or contains bugs different from the ones you are seeing, because the code you are actually executin

[Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread Tim Johnson
FYI: I am working in a linux environment with python 2.6.5 am an experienced web developer with 8 years in python, but :) I have never tried this trick before: I note that with the right .htaccess file, I can run a php file, from a non-cgi location. Example: On my machine, my wwwroot is at /home/h

Re: [Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread Evert Rol
> FYI: I am working in a linux environment with python 2.6.5 > am an experienced web developer with 8 years in python, but > :) I have never tried this trick before: > > I note that with the right .htaccess file, I can run a php file, > from a non-cgi location. > Example: On my machine, my wwwroot

Re: [Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread शंतनू
Hi Tim, Reply inline. On 31-Oct-2010, at 1:02 AM, Tim Johnson wrote: > FYI: I am working in a linux environment with python 2.6.5 > am an experienced web developer with 8 years in python, but > :) I have never tried this trick before: > > I note that with the right .htaccess file, I can run a ph

Re: [Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread Tim Johnson
* Evert Rol [101030 13:23]: > > FYI: I am working in a linux environment with python 2.6.5 > > am an experienced web developer with 8 years in python, but > > :) I have never tried this trick before: > > > > I note that with the right .htaccess file, I can run a php file, > > from a non-cgi locat

[Tutor] (no subject)

2010-10-30 Thread Jacob Bender
Dear Tutors, I was wondering how I could make an AI for creatures that run around, and try to survive. Like polyworld. The real problem is making the code connection to make them learn. Can you please help? Thanks ___ Tutor maillist - Tutor@pytho

Re: [Tutor] (no subject)

2010-10-30 Thread Tino Dai
On Sat, Oct 30, 2010 at 6:44 PM, Jacob Bender wrote: > Dear Tutors, > > I was wondering how I could make an AI for creatures that run > around, and try to survive. Like polyworld. The real problem is making > the code connection to make them learn. Can you please help? > > Thanks > Hi Jacob,

Re: [Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread Tim Johnson
* शंतनू [101030 14:08]: > Hi Tim, Reply inline. Sorry, I don't understand the preceding line. > On 31-Oct-2010, at 1:02 AM, Tim Johnson wrote: > > > FYI: I am working in a linux environment with python 2.6.5 am an > > experienced web developer with 8 years in python, but :) I have > > never tri

Re: [Tutor] possible to run a python script from non-cgi?

2010-10-30 Thread Tim Johnson
* Tim Johnson [101030 15:24]: I've taken this one step further: .htaccess => RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ./index.py/$1 [L,QSA] now I get the response from http://localhost/reg/ cheers -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebso

[Tutor] (no subject)

2010-10-30 Thread leo kirotawa
Jacob, Look about steering behaviours [1], I believe this what you find. [1] http://www.red3d.com/cwr/steer/ -- Leônidas S. Barbosa (Kirotawa) [DesenvolvedorWeb/CEFET/RN] [Ciências da Computação/UFRN] [pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN [Estudante de japonês

[Tutor] Stumped Again

2010-10-30 Thread Terry Green
Am running this Script and cannot figure out how to close my files, Keep getting msg: Attribute Error: '_csv.writer' object has no attribute 'close' Why? import csv testOutput = csv.writer(open('c:/users/terry/downloads/tup1012k/tup1012.csv', 'w'), delimiter=',', qu

Re: [Tutor] Stumped Again

2010-10-30 Thread Brian Jones
On Sat, Oct 30, 2010 at 7:12 PM, Terry Green wrote: > *Am running this Script and cannot figure out how to close my files,* > > *Keep getting msg: Attribute Error: ‘_csv.writer’ object has no attribute > ‘close’* > > *Why?* > Because csv.writer objects don't have a close() method. Files do :)

[Tutor] File transfer

2010-10-30 Thread Chris King
Dear Tutors, How would I send a file from one computer to another. I have modules which can send simple objects, such as dictionaries with simple objects in it. They can't send files thou. Please help. Sincerely, Me import SocketServer, cPickle def echo(self): #the default handling f

Re: [Tutor] Stumped Again

2010-10-30 Thread Steven D'Aprano
Terry Green wrote: Am running this Script and cannot figure out how to close my files, Keep getting msg: Attribute Error: '_csv.writer' object has no attribute 'close' Why? Lesson one: we're not mind readers. To be able to give you useful advise, we need to see the ACTUAL error and not a sum

Re: [Tutor] File transfer

2010-10-30 Thread Corey Richardson
If you can send a list, have the list [name, data] where name is the file name and data is the raw binary of the file, contained in a string. On 10/30/2010 9:11 PM, Chris King wrote: Dear Tutors, How would I send a file from one computer to another. I have modules which can send simple ob