Re: converting from shell script to python

2006-01-05 Thread Stewart Midwinter
Greg Ewing (using news.cis.dfn.de) wrote: > Alternatively, you can substitute things from a > dictionary instead of a tuple: > >vars = {'ROOTDIR': '/usr/lib'} >CLASSPATH = \ > "%{ROOTDIR}s/a/a.jar:%{ROOTDIR}s/b/b.jar:%{ROOTDIR}s/c/c.jar" % vars Arriving late at the party (found this w

Pmw problem in cygwin with Tkinter

2006-01-05 Thread Stewart Midwinter
nt 'got to 1' self.myshowinfo("Directory Listing for %s" % curdir, msg) print 'got to 2' self.drawMenu() except OSError,e: print >>sys.stderr, "Execution failed:", e def mymessage(self, title, msg, msgType='info'): '''a workalike for the tkMessageBox showinfo since the former results in invisible text in cygwin''' top = Toplevel() top.title(title) t = Label(top, text='\n%s\n' % msgType.upper()) t.pack() l = Label(top, text=msg) l.pack() b = Button(top,text="Ok", command=top.destroy) b.pack() def myshowinfo(self, title='', msg=''): '''a workalike for the tkMessageBox showinfo since the former results in invisible text in cygwin''' self.mymessage(title, msg,'info') root.focus_set() root.update() root = Tk() app = AppUI(root) app.drawGui() app.pack() root.mainloop() thanks, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] Skype, GoogleTalk, iChatAV, MSN, Yahoo: midtoad AIM:midtoad1 -- http://mail.python.org/mailman/listinfo/python-list

subprocess problem in cygwin with Tkinter

2006-01-04 Thread Stewart Midwinter
List.append(dir) msg = '\n'.join(msgList) return msg root = Tkinter.Tk() l = Tkinter.Label(text=dir_list()) l.pack() b = Tkinter.Button(text='ok',command=root.destroy) b.pack() root.mainloop() BTW, the test_subprocess.py test script that ships with Cygwin python runs fine. any ideas? thanks, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] Skype, GoogleTalk, iChatAV, MSN, Yahoo: midtoad AIM:midtoad1 -- http://mail.python.org/mailman/listinfo/python-list

Popularity of blogging tools used by python programmers

2005-10-20 Thread Stewart Midwinter
I've made a comparison of the relative popularity of blogging tools used by python programmers. I was surprised by the number of python developers not using python for their blogs; isn't that like GM employees driving Toyota cars? See my post at: http://midtoad.homelinux.org/wp/?p=117 S -- htt

suggestion for Python graphing package, please

2005-08-29 Thread Stewart Midwinter
27;ve looked at a) either don't output to a file, or b) are very old (3-5 years), or c) don't run on Windows. I don't actually care if the library itself is written in Python or c++ or something else. Any suggestions? thanks,-- Stewart Midwinter[EMAIL PROTECTED][EMAIL PRO

Re: how to calc the difference between two datetimes?

2005-05-08 Thread Stewart Midwinter
thanks Robert, those 4 lines of code sure beat the 58 of my home-rolled time-date function! cheers S -- http://mail.python.org/mailman/listinfo/python-list

how to calc the difference between two datetimes?

2005-05-08 Thread Stewart Midwinter
thing like this: time0 = "2005-05-06 23:03:44" time1 = "2005-05-07 03:03:44" timedelta = someFunction(time0,time1) print 'time difference is %s seconds' % timedelta. Which function should I use? confusedly yours, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECT

App suggestion please: blog / forum software in Python

2005-04-26 Thread Stewart Midwinter
m, but maybe someone's already done that? I currently use mySQL with CherryPy, but I'll add another db if necessary. cheers, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] Skype: midtoad -- http://mail.python.org/mailman/listinfo/python-list

Python modules for image / map manipulation?

2005-04-04 Thread Stewart Midwinter
mercial hobby application. thanks, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] Skype: midtoad -- http://mail.python.org/mailman/listinfo/python-list

Web application toolkit recommendation?

2005-04-04 Thread Stewart Midwinter
Which is likely to be the least painful route? I'm already using Snakelets for a private internet blog, and would use this if there were a database access module available. I don't want to hear anything about Zope - it's way too complex for my needs or desires. Other than tha

Re: Little Q: how to print a variable's name, not its value?

2005-03-30 Thread Stewart Midwinter
o see its value at that time. I believe your method would be useful in that situation as well, no? cheers, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] Skype: midtoad -- http://mail.python.org/mailman/listinfo/python-list

How to turn a variable name into a string?

2005-03-11 Thread Stewart Midwinter
: >>> You have a problem with c How do I convert a variable name into a string? thanks! -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Can a method in one class change an object in another class?

2005-03-05 Thread Stewart Midwinter
elf.a class second: def __init__(self, a): pass def __call__(self, a): a = 'aa' return a if __name__ == '__main__': app = first() app.update() thanks, -- Stewart Midwinter [EMAIL PROTECTED] [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list