Re: [Tutor] [python-win32] Python as scripting glue, WAS Python for sysadmin

2006-12-13 Thread Peter Jessop
with TCP/IP libraries. The only drawback to using Python for Windows System administration is the lack of uptodate books dedicated to it. A good book dedicated to this topic will sell well. Peter Jessop MSCE ___ Tutor maillist - Tutor@python.org http

[Tutor] Organizing 15500 records, how?

2006-12-13 Thread Peter Jessop
ok at SQLObject <http://www.sqlobject.org/>. Personally I would recommend that you start with MySQL<http://www.mysql.com>. It is open source, easy to install and use, stable and fast. But with SQL motors you have lots of good choices. Peter Jessop On 12/13/06, Thomas <[EMAIL PRO

Re: [Tutor] How to make the loop work?

2006-06-22 Thread Peter Jessop
It's basically correct but you need to convert the raw_input to integer. c=0 d=int(raw_input("input number limit: ")) while 1: c = c + 1 if c == d: break print c ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tu

Re: [Tutor] Question about network server in python

2006-06-15 Thread Peter Jessop
import socket host = '' port = 57000 s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) s.bind((host,port)) s.listen(5) while 1: client,addr=s.accept() client.send("Connected to the server\n") #if someCondition: # cliente.clo

Re: [Tutor] Question about network server in python

2006-06-15 Thread Peter Jessop
I think the problem here is the 'break' statement. Does it not put you outside the while loop whereas in order to keep the server socket open you need it to loop forever. I also think that the s.accept should be inside the while loop. ___ Tutor maillist

Re: [Tutor] Mod-python

2006-06-12 Thread Peter Jessop
der/exampl1.cgi"; dict = {} dict["field1"] = "value1" dict["field2"] = "value2" ... dict["fieldn"] = "valuen" urldata = urllib.urlencode(dict) req = urllib2.Request(url) req.add_header('User-agent','Mozilla/4.0 (compatibl

Re: [Tutor] (OT) Monitorising WEB POSTs

2006-06-07 Thread Peter Jessop
Matthew Fantastic! Exactly what I needed ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Truly generic database API

2006-06-07 Thread Peter Jessop
It depends on your system constraints. If you are only developing on Windows then you can use ODBC. ODBC supports writing to text files. It is an old fashioned technology and is not very fast. However it is well supported and mature. ___ Tutor maillist

Re: [Tutor] python application on a web page

2006-06-07 Thread Peter Jessop
Tkinter is a multiplatform toolkit for producing programs with graphical interface. But multiplatform refers to BSD, Linux, Mackintosh, Windows etc. If you want to produce the output on the WEB you need to produce the output in HTML or in some way that most users can see it in their Browsers. (Jav

[Tutor] (OT) Monitorising WEB POSTs

2006-06-07 Thread Peter Jessop
n WEB server Is there a program or add in that will give me this information without resorting to the solutions above. Peter Jessop ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-06 Thread Peter Jessop
Kent Thanks for your reply. The structure is for sending form variables and values to a web server with POST. I am using urllib.urlencode which accepts a list or dictionary as argument. The idea is to look for airline tickets. The airline I buy from only lets me search by data but I want to autom

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-05 Thread Peter Jessop
André Thanks a lot for clearing this up for me. Regards Peter Jessop ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-05 Thread Peter Jessop
Thanks Andre I realise now I did not make it too clear. Basically the variable names are predictable but the values aren't. Maybe I should have expressed it like this f0_n = "arbitrayValue" f0_v ="another valule" f1_n="something else" f1_v="etc.." ... f100_n = "another value" f100_v = "nexvalue

[Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-05 Thread Peter Jessop
I create concatenating "f" + str(i)+"_n" and "f"+str(i)+"_v" Thanks Peter Jessop ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Generating static WEB sites

2006-04-25 Thread Peter Jessop
I am looking at generating static web pages.What I wish to do is periodically regenerate a WEB site form HTML, text and MySQL data.I have been experimenting with HTMLgen and this seems to be adequate for what I need. However HTMLgen does not seem to have been updated for a while and I was wondering

[Tutor] Problem installing MySQLdb under windows

2006-04-25 Thread Peter Jessop
Thanks Liam and Kent.Problem is now sorted.Which brings me on to my next question... ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Problem installing MySQLdb under windows

2006-04-25 Thread Peter Jessop
I am running Python 2.4.3, MySQL 5.0.On trying to install MySQLdb 1.2.1 I ran into the following problem."D:\Python24\Lib\site-packages\MySQLdb>setup.py buildrunning buildrunning build_pycopying MySQLdb\release.py -> build\lib.win32- 2.4\MySQLdbrunning build_exterror: The .NET Framework SDK needs t

[Tutor] Generalising system processes

2005-09-29 Thread Peter Jessop
. Thanks Peter Jessop ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor