[Tutor] i know this should be easy

2005-08-17 Thread nephish
Hey there, i have a simple question. if something returns a true or false, how do i test for it with an if statement? i am using pygtk with a toggle button that returns TRUE if checked and FALSE if not. do i need quotes around the TRUE / FALSE or should i use 1 and 0? Auto_Tog =

Re: [Tutor] i know this should be easy

2005-08-17 Thread Jeremy Jones
nephish wrote: Hey there, i have a simple question. if something returns a true or false, how do i test for it with an if statement? i am using pygtk with a toggle button that returns TRUE if checked and FALSE if not. do i need quotes around the TRUE / FALSE or should i use 1 and 0? Auto_Tog =

Re: [Tutor] i know this should be easy

2005-08-17 Thread nephish
Jeremy Jones wrote: nephish wrote: Hey there, i have a simple question. if something returns a true or false, how do i test for it with an if statement? i am using pygtk with a toggle button that returns TRUE if checked and FALSE if not. do i need quotes around the TRUE / FALSE or

Re: [Tutor] i know this should be easy

2005-08-17 Thread Kent Johnson
nephish wrote: Hey there, i have a simple question. if something returns a true or false, how do i test for it with an if statement? i am using pygtk with a toggle button that returns TRUE if checked and FALSE if not. do i need quotes around the TRUE / FALSE or should i use 1 and 0?

Re: [Tutor] i know this should be easy

2005-08-17 Thread nephish
Kent Johnson wrote: nephish wrote: Hey there, i have a simple question. if something returns a true or false, how do i test for it with an if statement? i am using pygtk with a toggle button that returns TRUE if checked and FALSE if not. do i need quotes around the TRUE / FALSE or should i

[Tutor] i18n on Entry widgets

2005-08-17 Thread Jorge Louis de Castro
Hi, How do I set the encoding of a string? I'm reading a string on a Entry widget and it may use accents and other special characters from languages other than English. When I send the string read through a socket the socket is automatically closed. Is there a way to encode any special

Re: [Tutor] Very simple question

2005-08-17 Thread Alan G
Hi Jack, Welcome to tutor... i am just starting out with python and have already hit a problem! howdo you create a new line! i have tryed tab etc and enter runs the command. Please help The prompt executes commands as you type them. It is only meant for experimenting and finding out how

Re: [Tutor] IOError with fcntl.ioctl

2005-08-17 Thread Alan G
Crave pardon if that question of mine was too basic to merit a reply, More likely it was too complex! :-) That post would have been appropriate on comp.lang.python, this list is usually more concerned with basic questions like how does a while loop work?! But we do usually try to answer the

Re: [Tutor] i18n on Entry widgets

2005-08-17 Thread Kent Johnson
Jorge Louis de Castro wrote: Hi, How do I set the encoding of a string? I'm reading a string on a Entry widget and it may use accents and other special characters from languages other than English. When I send the string read through a socket the socket is automatically closed. Is there

Re: [Tutor] i18n on Entry widgets

2005-08-17 Thread Jorge Louis de Castro
Hi, thanks for the reply. However, I get strange behavior when I try to feed text that must be unicode to altavista for translation. Just before sending, I've got the following on the log using print RECV DATA: , repr(data) and after entering então (so in Portuguese) RECV DATA: 'right:

Re: [Tutor] i18n on Entry widgets

2005-08-17 Thread Kent Johnson
Jorge Louis de Castro wrote: Hi, thanks for the reply. However, I get strange behavior when I try to feed text that must be unicode to altavista for translation. Just before sending, I've got the following on the log using print RECV DATA: , repr(data) and after entering então (so

Re: [Tutor] a little help

2005-08-17 Thread Alan G
Hello again, I'm sending this on to the tutor list because you'll get a much wider set of responses and ideas there. i want to make a program that is actualy going to be used maybe a ftp program or something. but i want to make a window come up before the program that ask you for a

[Tutor] Creating a subclass of NumArray

2005-08-17 Thread ligon
I'd like to be able to instantiate and work with objects which possess the properties of matrices, but which also carry some additional information. Numarray provides a NumArray object which can be treated as a matrix. One way to instantiate these objects is by a call to a function array,

[Tutor] Linux app question

2005-08-17 Thread Alberto Troiano
Hey tutorslong time don't see...*grin* I have a question, I've made a web page in PHP and its going to run under Linux Red Hat 9.0 The page has scripts that has to be on a certain path off the system...I have to make a CD to give the web page to my client and I made a script using Python

[Tutor] ANN: Python training, 2005 Aug 29-31, San Francisco

2005-08-17 Thread Wesley Chun
hi all, just a reminder that our next Python training course is less than 2 weeks away! details can be found at http://cyberwebconsulting.com (click Python training). if you're interested in joining us near San Francisco, sign up soon as there's only room for 9 more people!! contact us at

Re: [Tutor] i18n on Entry widgets

2005-08-17 Thread Kent Johnson
OK this is actually starting to make sense :-) Here is what I think is happening: You get different results in the IDE and the console because they are using different encodings. The IDE is using utf-8 so the params are encoded in utf-8. The console is using latin-1 and you get encoded latin-1