Returning Date As String ?

2005-05-14 Thread Peter Moscatt
I am wanting to return the system date using the following: date.today() How would I then convert this to a string ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: Using TCL files in Python ?

2005-05-12 Thread Peter Moscatt
Many thanks to all who have helped me out on this one - much appreciated. Pete On Wed, 11 May 2005 07:22:09 -0500, Jeff Epler wrote: > While I've never used it, there *is* a Tix module in Python which > appears to wrap the widgets provided by Tix. In Fedora Core 2, Python > doesn't seem to be

Using TCL files in Python ?

2005-05-11 Thread Peter Moscatt
I am reasonably new to programming in Python. [Using LINUX] Up until now I have been using GUI widgets supplied by 'Tkinter' but starting to realise that Tkinter have limited widgets. I have been given the lead that I should look at other sources for GUI widgets - namely TCL. I have just done a

Re: Does TKinter Have A Grid ?

2005-05-10 Thread Peter Moscatt
Mardy. that's exactly what I was chasing. I have downloaded the tarball now it's just a matter of working out how I use Tcl with Python - and I guess it won't hurt if I also use Tk in there as well Pete On Tue, 10 May 2005 10:11:59 +0100, Martin Franklin wrote: > P

Does TKinter Have A Grid ?

2005-05-10 Thread Peter Moscatt
Does TKinter have a Grid widget ? If not (as I assume), what is the alternative ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a function be called within a function ?

2005-04-18 Thread Peter Moscatt
Thanks Guys, I didn't think it was calling the function so I will put some test code and print something to the screen just to ensure it's entering the function. Thanks for all ya help. Pete Peter Moscatt wrote: > > Is it possible to write code and allow a function to

Can a function be called within a function ?

2005-04-18 Thread Peter Moscatt
Is it possible to write code and allow a function to be called within another like I have shown below ? Pete def populatelist(): f=open(_globals.appath + "dxcluster.svr","r") while true: text = f.readline() if text =="": b

Re: Tk Listbox - Selected Item ?

2005-04-15 Thread Peter Moscatt
Martin Franklin wrote: > Peter Moscatt wrote: >> Martin Franklin wrote: >> >> >>>Peter Moscatt wrote: >>> >>>>I am having trouble understanding the methods for the Listbox from Tk. >>>> >>>>If I was to select at it

Re: Tk Listbox - Selected Item ?

2005-04-15 Thread Peter Moscatt
Martin Franklin wrote: > Peter Moscatt wrote: >> I am having trouble understanding the methods for the Listbox from Tk. >> >> If I was to select at item in the list using a mouse click (have already >> created the bind event) - what method returns the text of the sel

Tk Listbox - Selected Item ?

2005-04-14 Thread Peter Moscatt
I am having trouble understanding the methods for the Listbox from Tk. If I was to select at item in the list using a mouse click (have already created the bind event) - what method returns the text of the selected item ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: A command in a String ?

2005-04-13 Thread Peter Moscatt
, No, I hadn't included the '*' Ya learn something every day. Pete On Wed, 13 Apr 2005 11:07:13 +0200, Fredrik Lundh wrote: > Peter Moscatt wrote: > >>> strings = "string1", "string2", "string3" >>> fm = Optio

Re: A command in a String ?

2005-04-13 Thread Peter Moscatt
, Thanks for the help on this. Yea the 'exec' did the trick. The second example just placed all the strings in one option button. Pete On Wed, 13 Apr 2005 10:34:20 +0200, Fredrik Lundh wrote: > Peter Moscatt wrote: > >>I have a rather odd question: >> >> I

A command in a String ?

2005-04-13 Thread Peter Moscatt
I have a rather odd question: Is there a way Python can execute a command within a string ? For example if I had something like: _str = "fm=OptionMenu(root,xx,'string1','string2','string3')" And the execute _str. The reason why I am trying to do this that as I am aware the OptionMenu hasn't the

Does Tk provide ComboBox ?

2005-04-10 Thread Peter Moscatt
Does Tkinter provide a combobox or do I have to find some way of making a listbox do the job ? Pete -- http://mail.python.org/mailman/listinfo/python-list

Re: HELP:UnboundLocalError: local variable '_nntp' referenced before assignment

2005-03-19 Thread Peter Moscatt
Diez B. Roggisch wrote: > Peter Moscatt wrote: >> UnboundLocalError: local variable '_nntp' referenced before assignment > > This pretty much says what your problem is: you haven't a variable called > _nntp > >> def callconnect(): >> i

HELP:UnboundLocalError: local variable '_nntp' referenced before assignment

2005-03-18 Thread Peter Moscatt
Hi all, I am in the process of writing an app that will handle news feeds and therefore using the 'nntplib' When I issue the connect command all goes will but when I issue the 'quit()' command I get the following error message: Exception in Tkinter callback Traceback (most recent call last):

HELP: Bitmaps Using Tkinter ?

2005-03-16 Thread Peter Moscatt
When placing an image onto a button object with: b=Button(root,bitmap="@image.xbm") Do I have to use a XBM or are there other formats that I can use ? Pete -- http://mail.python.org/mailman/listinfo/python-list