Re: [Tutor] a little help

2005-08-17 Thread Alan G
Forwarding to tutor. > ok. yes i do use windows. how do i write my own encription?? > and yes i am going to use Tkinter You might like to take a look at this: http://docs.python.org/lib/crypto.html Alan G. ___ Tutor maillist - Tutor@python.org http:

[Tutor] Float Addition

2005-08-17 Thread DaSmith
Hi, I am a relatively new Python Programmer who is a bit puzzled at some of the behavior I am observing. . I have implemented the following loop, to create a running total of distances between 3D co-oordinate tuples, in a group of nodes from a Finite Element Node mesh: for N in range( 2, len(

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

[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 cybe

Re: [Tutor] i18n on Entry widgets

2005-08-17 Thread Kent Johnson
Jorge Louis de Castro wrote: > Thanks again, > Ok, it seems unpacking list items returns different types of string > representations. Playing around on the interpreter this is what I found: > > lst = ['r', 'ent\xc3\xa3o?'] > print lst[1] > > então? > s = lst[1] print lst > > [

[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 2

[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, li

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 us

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

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: 'righ

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

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

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 ou

[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 characte

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 / FA

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
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

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? > >Au

[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 = self.AutoCheckRa

Re: [Tutor] unittest: looking for examples

2005-08-17 Thread Kent Johnson
Christian Meesters wrote: > - unittests for methods of classes getting all data from a file as a > classmethod Not sure what you mean by this, can you give a simple example? > - unittests for reading and saving files in a specific way (= sanity > tests for file handling) When I want to test a

[Tutor] unittest: looking for examples

2005-08-17 Thread Christian Meesters
Hi Does anybody know examples using the unittest module for the following cases (or some parts of it)? - unittests for methods of classes getting all data from a file as a classmethod - unittests for reading and saving files in a specific way (= sanity tests for file handling) Point is that I