Re: [Tutor] Looking for suggestions - update

2005-11-15 Thread Kent Johnson
-Terry- wrote: Thanks for the reply Kent and others. I've made some changes and the game is quite playable now. I've put the new version online at the same links if anyone wants to take a look. A few more ideas: - I think you missed my earlier suggestion about simplifying get_button(). -

Re: [Tutor] question about serial coms

2005-11-15 Thread Python
The device at the far end of the serial connection is echoing what you write back to you. This is a convenience for someone typing at a terminal, but a nuisance when you are programming. The easier way out is to turn echoing off at the far device. Failing that, you will want to provide a copy

Re: [Tutor] Favourite modules - Wiki Was Re: TurboGears - and some issues

2005-11-15 Thread Ron Phillips
Ismael Garrido [EMAIL PROTECTED] 11/14/2005 11:55 PM Kent Johnson wrote: Maybe we should start a thread of favorite addons. For me, Jason Orendorff's path module is definitely #1 on the list, probably followed by Fredrik Lundh's ElementTree. http://www.jorendorff.com/articles/python/path/

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-15 Thread Alberto Troiano
Hey Nathan I think this is what you are looking for Code Below from Tkinter import * import tkMessageBox tkMessageBox._show(Windows Title,This is the description,icon=tkMessageBox.INFO,type=tkMessageBox.OK) ###End of Code Regards Alberto -Mensaje original- De: [EMAIL

Re: [Tutor] tkFileDialog.Directory

2005-11-15 Thread K . Weinert
Hello! Michael Lange [EMAIL PROTECTED] wrote: I guess the tkFileDialog.Directory class isn't intended to be used directly. Try tkFileDialog.askdirectory() instead. If there are problems with the grab state, try passing parent=self.top to askdirectory(). That did it! Thanks a lot! I would

[Tutor] [Fwd: Re: question about serial coms]

2005-11-15 Thread Python
(Forwarding to the list.) -- Lloyd Kvam Venix Corp ---BeginMessage--- Ya know, you're right!... Wow, I feel good about myself now..:) What I'll do is have the fist command be ECHO OFF and see what happens... Sorry about the waisted bandwidth, but thank you for bringing me back to reality...

Re: [Tutor] Favourite modules - Wiki Was Re: TurboGears - and some issues

2005-11-15 Thread Ismael Garrido
Ron Phillips wrote: That is a good idea, and a nice page. Another would be to implement some social tagging as on del.icio.us. It's kind of a popularity contest, but that's really what's wanted here, I think. I believe the guys at PyPI were trying to do something similar. They're trying to

Re: [Tutor] Looking for suggestions - update

2005-11-15 Thread -Terry-
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 reply embedded Today (Nov 15, 2005) at 6:08am, Kent Johnson spoke these wise words: - --Terry- wrote: - - Thanks for the reply Kent and others. I've made some - - changes and the game is quite playable now. I've put - - the new version online at

Re: [Tutor] tkFileDialog.Directory

2005-11-15 Thread Michael Lange
On Tue, 15 Nov 2005 17:03:24 +0100 (MET) [EMAIL PROTECTED] wrote: I would like to ask another question. I don't understand the exception mechanism of Python when running a Tkinter app. If an exception happens (it does happen quite often at the moment..), a traceback is written to the

[Tutor] Overloading comparisons

2005-11-15 Thread Hugo González Monteverde
Hi all, I defined an object wich describes a video clip, like this class VideoSegment: def __init__(self, filename): # Attributes that have to be present self.filename = filename The thing is, I will define an array of these objects for a cache, and would like to keep

[Tutor] Help me

2005-11-15 Thread sivapriya pasupathi
Hi There, I am planning to start my career in computer programming.But i don't have specific resource(websire/book) to improve my basic computer programming skills.If you know any helpful resources,please let me know. Thanks in advance. Priya. Yahoo! FareChase - Search multiple travel sites

Re: [Tutor] saving project

2005-11-15 Thread alan . gauld
If you do File... Save Then select the location for your file and just give it a name, a '.py' extension will be added to the file. But don't do this from the interactive shell! You need to create a new file (File-New) first and type your code in there. HTH, Alan G

[Tutor] Favourite Modules - wiki

2005-11-15 Thread Matt Williams
I think the Wiki's a great idea. del.icio.us already has a Python tagged page: http://del.icio.us/tag/python Other pages I use are: http://mechanicalcat.net/pyblagg.html http://www.planetpython.org/ I've added a couple of things to the Wiki - SQLObject and RSPython Matt

Re: [Tutor] Overloading comparisons

2005-11-15 Thread Hugo González Monteverde
I know it is rude to reply to myself. But I found the answer and wanted to share it. I did the following test: class Lala: ... def __eq__(self, other): ... if self.name == other.name: ... return True ... ... def __cmp__(self, other): ... if self.time

Re: [Tutor] Overloading comparisons

2005-11-15 Thread Danny Yoo
I defined an object wich describes a video clip, like this class VideoSegment: def __init__(self, filename): # Attributes that have to be present self.filename = filename [some text cut] I can define the following for sorting the array: [some code cut] But then

Re: [Tutor] Overloading comparisons

2005-11-15 Thread Hugo González Monteverde
Hi Danny, That's nice. I do think I'm going this way I don't want the container to grow too big in memory, not bigger than 1k elements(it is a cache), but when deleting an element I need it to be the oldest files (again, because it is a cache) Thanks for the advice, I'm going this way. My OOP

Re: [Tutor] Help me

2005-11-15 Thread Danny Yoo
On Tue, 15 Nov 2005, sivapriya pasupathi wrote: I am planning to start my career in computer programming.But i don't have specific resource(websire/book) to improve my basic computer programming skills.If you know any helpful resources,please let me know. Hi Priya, Welcome aboard! If

Re: [Tutor] Looking for suggestions - update

2005-11-15 Thread Kent Johnson
-Terry- wrote: Today (Nov 15, 2005) at 6:08am, Kent Johnson spoke these wise words: - -- I think you missed my earlier suggestion about simplifying get_button(). I tried your suggestion for changing get_button() and changed it to: def get_button(click): # What peg was

Re: [Tutor] Help me

2005-11-15 Thread Christian Wyglendowski
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Yoo On Tue, 15 Nov 2005, sivapriya pasupathi wrote: I am planning to start my career in computer programming.But i don't have specific resource(websire/book) to improve my basic computer

Re: [Tutor] question about ord

2005-11-15 Thread Kent Johnson
nephish wrote: Hey there, i am using a script to change a byte into an integer like this: a = the byte value = ord(a) but i cant find the operation that can change it back to a byte. chr() See http://docs.python.org/lib/built-in-funcs.html Kent --

Re: [Tutor] question about ord

2005-11-15 Thread Liam Clarke-Hutchinson
Hmm, Never thought of doing it that way. try - import struct a = theByte value = ord(a) theByteReloaded = struct.pack(i,value) You nmay want to check the docs for the struct module at python.org on that pattern. Liam Clarke-Hutchinson -Original Message- From: [EMAIL PROTECTED]

Re: [Tutor] question about ord

2005-11-15 Thread Python
chr(value) chr(ord('a')) == 'a' True On Tue, 2005-11-15 at 14:46 -0600, nephish wrote: Hey there, i am using a script to change a byte into an integer like this: a = the byte value = ord(a) but i cant find the operation that can change it back to a byte. i am sure its

Re: [Tutor] question about ord

2005-11-15 Thread nephish
Thanks for all your help and the link, looking at the docs right now. slaute` shawn On Wed, 2005-11-16 at 10:05 +1300, Liam Clarke-Hutchinson wrote: Hmm, Never thought of doing it that way. try - import struct a = theByte value = ord(a) theByteReloaded = struct.pack(i,value)

[Tutor] Creating Tkinter Menubars

2005-11-15 Thread Double Six
Hi, I am testing the following Tkinter code (attached at the end of this message) by Fredrik Lundh on a Mac OS X 10.4.2 with Python version 2.3. I do get a root window, but it is totally blank without the desirable menubars such as File and Edit. What am I missing? Any help will be highly

Re: [Tutor] Help me

2005-11-15 Thread Adam
On 15/11/05, sivapriya pasupathi [EMAIL PROTECTED] wrote: Hi There, I am planning to start my career in computer programming.But i don't have specific resource(websire/book) to improve my basic computer programming skills.If you know any helpful resources,please let me know. Thanks in advance.

[Tutor] RTSP

2005-11-15 Thread Ismael Garrido
Hi Does anyone know if there's any module able to download rtsp? Failing that, any command line app that could do the job? (Already tried with mplayer, it didn't work) I'm trying to download a series of streams automatically, I have already been able to open the page, parse all the links, and

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-15 Thread Nathan Pinno
Albertito and all, It worked! Thanks again! Thanks for all the help! Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 -Original Message- From:

Re: [Tutor] RTSP

2005-11-15 Thread Kent Johnson
Ismael Garrido wrote: Hi Does anyone know if there's any module able to download rtsp? Failing that, any command line app that could do the job? (Already tried with mplayer, it didn't work) I'm trying to download a series of streams automatically, I have already been able to open the

Re: [Tutor] Favourite modules - Wiki Was Re: TurboGears - and some issues

2005-11-15 Thread Christopher Arndt
Ron Phillips schrieb: A wonderful idea! I have created a wiki page in Python.org with a list of such 'favourite' modules. Please take a look: http://wiki.python.org/moin/UsefulModules Good idea! The GUI section might be problematic, though. I don't see that any of the main GUI alternatives

Re: [Tutor] new topic draft

2005-11-15 Thread Christopher Arndt
Alan Gauld schrieb: I've just added an incomplete draft copy of my latest tutorial topic on using the Operating System from Python. The material that's there discusses the role of the OS and looks at file handling usng os/os.path/shutil etc.

Re: [Tutor] Favourite modules - Wiki Was Re: TurboGears - and some issues

2005-11-15 Thread Kent Johnson
Christopher Arndt wrote: Good idea! The GUI section might be problematic, though. I don't see that any of the main GUI alternatives (GTK,Qt,wxWindows,Tk,PythonCard,...) can claim a definite prefernce among the Python crowd and they are all more or less Pythonic (except maybe Tk). Probably