Re: trouble with wxPython intro

2007-05-30 Thread Anthony Irwin
menu.Append(wx.ID_EXIT,"E&xit","Terminate the program.") And again make it the following. filemenu.Append(ID_EXIT,"E&xit","Terminate the program.") --- code snipped -- Kind Regards, Anthony Irwin http://www.irwinresources.com http://www.makehomebusiness.com email: anthony at above domains, - www. -- http://mail.python.org/mailman/listinfo/python-list

getting output from a command into a list to work with

2007-05-20 Thread Anthony Irwin
r i in var: # do stuff to file code here not sure the best way to get the output of the command so each line of output is one element in the list. -- Kind Regards, Anthony Irwin http://www.irwinresources.com http://www.makehomebusiness.com email: anthony at above domains, - www

Re: A few questions

2007-05-20 Thread Anthony Irwin
wxpython mac install and just double clicked a python file with a .pyw and it executed like a normal app. Originally I had a .py file extension but that does not execute the python script. -- Kind Regards, Anthony Irwin http://www.irwinresources.com http://www.makehomebusiness.com email: anthony at above domains, - www. -- http://mail.python.org/mailman/listinfo/python-list

Re: omissions in python docs?

2007-05-17 Thread Anthony Irwin
orrect them or > post code showing how to get around various idiosyncrasies when using > the functions. > Hi, I also like the php docs and love that you can type any function into the search at php.net and the documentation just comes up and there is example code and then user commen

Re: problem with import in python 2.2.3

2007-05-17 Thread Anthony Irwin
Hi Guys, Thanks for the replies I ended up rewriting my code to use the time.strftime() library but unfortunately the MySQLdb module I use needs python 2.3 or higher so it looks like I have to update python on the older system anyway. -- Kind Regards, Anthony Irwin http

problem with import in python 2.2.3

2007-05-16 Thread Anthony Irwin
"./backup_all_mysql_databases.py", line 5, in ? from datetime import date ImportError: No module named datetime Does anyone know why the datetime module is not being found in python 2.2.3 and how I can make the script work in the older version of python? -- Kind Regards, Anthony Irwin http://www.irwinres

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Anthony Irwin
Anthony Irwin wrote: > walterbyrd wrote: >> The strings start with whitespace, and have a '*' or an alphanumeric >> character. I need to know how many whitespace characters exist at the >> beginning of the string. >> > > Hi, > > I am new to python

Re: how do I count spaces at the beginning of a string?

2007-05-16 Thread Anthony Irwin
#!/usr/bin/env python def main(): s = " abc def ghi" count = 0 for i in s: if i == ' ': count += 1 else: break print count if __name__ == '__main__': main() -- Kind Regard

Re: Trying to choose between python and java

2007-05-15 Thread Anthony Irwin
me kind of file extension association for people running windows instead of the shebang? I saw on the python site a slide from 1999 that said that python was slower then java but faster to develop with is python still slower then java? -- Kind Regards, Anthony Irwin http://www.irwinresource

Trying to choose between python and java

2007-05-14 Thread Anthony Irwin
else have any useful comments about python vs java without starting a flame war. -- Kind Regards, Anthony Irwin http://www.irwinresources.com http://www.makehomebusiness.com email: anthony at above domains, - www. -- http://mail.python.org/mailman/listinfo/python-list

Databases with python

2007-04-12 Thread Anthony Irwin
library it seems to be the best I have seen so far. -- Kind Regards, Anthony Irwin http://www.irwinresources.com email: anthony at the above domain, - www. -- http://mail.python.org/mailman/listinfo/python-list