Re: [Tutor] cxfreeze

2010-01-11 Thread Григор
2010/1/12 Eike Welk > > Hello Григор! > > On Monday January 11 2010 16:55:49 Григор wrote: > > Hi. Can I make exe file from python script. With cxfreeze on Windows no > >  have problem. But how make exe on ubuntu. > > > > On Linux programs are distributed as so called packages. A program called th

Re: [Tutor] cxfreeze

2010-01-11 Thread Eike Welk
Hello Григор! On Monday January 11 2010 16:55:49 Григор wrote: > Hi. Can I make exe file from python script. With cxfreeze on Windows no > have problem. But how make exe on ubuntu. > On Linux programs are distributed as so called packages. A program called the package manager opens these packa

Re: [Tutor] Numpy unexpected result: subtraction of cell values

2010-01-11 Thread Kent Johnson
On Mon, Jan 11, 2010 at 2:02 PM, Carnell, James E wrote: >> I want to subtract the Red Value in an array cell from a neighboring >> Red Value cell. >> >> >>> pictArray[39][4]    #pixel at 39 4 >> array([150, 140, 120], dtype=unint8) >> >> >>> pictArray[39][5]    #p

Re: [Tutor] Array slices in python with negative step

2010-01-11 Thread vishwajeet singh
On Tue, Jan 12, 2010 at 1:16 AM, Alan Gauld wrote: > > "vishwajeet singh" wrote > > Thanks for your response but I am still not clear; can you show me the >> equivalent of [::-1] in terms actually specifying start-index, end-index >> which gives me reverse of the given arrary. >> > > I don't th

Re: [Tutor] Numpy unexpected result: subtraction of cell values

2010-01-11 Thread Marc Tompkins
On Mon, Jan 11, 2010 at 11:02 AM, Carnell, James E < jecarn...@saintfrancis.com> wrote: > > > > > I'm sure this is easy, but I am having a difficult time finding the > > right search terms to find it on the Internet. Any help much > > appreciated. > > > > 3 dimensional array(x,y,rgb) which is a PI

Re: [Tutor] Array slices in python with negative step

2010-01-11 Thread Alan Gauld
"vishwajeet singh" wrote Thanks for your response but I am still not clear; can you show me the equivalent of [::-1] in terms actually specifying start-index, end-index which gives me reverse of the given arrary. I don't think you can, you must use the empty value. In theory you could use

Re: [Tutor] Array slices in python with negative step

2010-01-11 Thread Michael Sprayberry
> > Hello All, > > > > I am bit confuse how the slice works in case a negative step is supplied > > a = 'abcde' > > a[::-1] gives me edcba > > > > but [4:0:-1] gives me edcb > > > > while searching net I came accross something which said the following: > > > > If a negative stride is specified and

Re: [Tutor] Numpy unexpected result: subtraction of cell values

2010-01-11 Thread Carnell, James E
> > I'm sure this is easy, but I am having a difficult time finding the > right search terms to find it on the Internet. Any help much > appreciated. > > 3 dimensional array(x,y,rgb) which is a PIL image into a numpy array > using 'asarray' function. > > I want to subtract the Red Value in an a

Re: [Tutor] Newbie Just Joining

2010-01-11 Thread Luke Paireepinart
Hey, welcome to the list! No probemas so far? On 1/11/10, Kamron Bennett wrote: > I'd like to say hi and I'm a new member of this mailing list. > > -- > "You'll never know if you don't go, you'll never shine if you don't glow" > -Smash Mouth "All Star" > -- Sent from my mobile device __

Re: [Tutor] Numpy unexpected result: subtraction of cell values

2010-01-11 Thread Marc Tompkins
On Mon, Jan 11, 2010 at 10:20 AM, Carnell, James E < jecarn...@saintfrancis.com> wrote: > > I'm sure this is easy, but I am having a difficult time finding the right > search terms to find it on the Internet. Any help much appreciated. > > 3 dimensional array(x,y,rgb) which is a PIL image into a n

[Tutor] Numpy unexpected result: subtraction of cell values

2010-01-11 Thread Carnell, James E
I'm sure this is easy, but I am having a difficult time finding the right search terms to find it on the Internet. Any help much appreciated. 3 dimensional array(x,y,rgb) which is a PIL image into a numpy array using 'asarray' function. I want to subtract the Red Value in an array cell from a ne

Re: [Tutor] Array slices in python with negative step

2010-01-11 Thread vishwajeet singh
On Mon, Jan 11, 2010 at 10:32 PM, spir wrote: > On Mon, 11 Jan 2010 21:50:10 +0530 > vishwajeet singh wrote: > > > Hello All, > > > > I am bit confuse how the slice works in case a negative step is supplied > > a = 'abcde' > > a[::-1] gives me edcba > > > > but [4:0:-1] gives me edcb > > > > whi

Re: [Tutor] Array slices in python with negative step

2010-01-11 Thread spir
On Mon, 11 Jan 2010 21:50:10 +0530 vishwajeet singh wrote: > Hello All, > > I am bit confuse how the slice works in case a negative step is supplied > a = 'abcde' > a[::-1] gives me edcba > > but [4:0:-1] gives me edcb > > while searching net I came accross something which said the following:

[Tutor] Newbie Just Joining

2010-01-11 Thread Kamron Bennett
I'd like to say hi and I'm a new member of this mailing list. -- "You'll never know if you don't go, you'll never shine if you don't glow" -Smash Mouth "All Star" ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: htt

[Tutor] Array slices in python with negative step

2010-01-11 Thread vishwajeet singh
Hello All, I am bit confuse how the slice works in case a negative step is supplied a = 'abcde' a[::-1] gives me edcba but [4:0:-1] gives me edcb while searching net I came accross something which said the following: If a negative stride is specified and the starting or stopping indices are omi

Re: [Tutor] Tk help

2010-01-11 Thread Kirk Vander Meulen
Hi Alan, thanks for the reply and my apologies for not realizing there was a Tkinter-discuss group. After even more searching, this seems to be something weird with my version of Tkinter and/or my installation. I can eliminate this effect on my machine (linux, python 2.6) by explicitly creating a

[Tutor] cxfreeze

2010-01-11 Thread Григор
Hi. Can I make exe file from python script. With cxfreeze on Windows no have problem. But how make exe on ubuntu. -- Криле имат само тия, дето дето сърцето им иска да лети ! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

Re: [Tutor] composing one test suite from two test cases

2010-01-11 Thread Kent Johnson
On Mon, Jan 11, 2010 at 8:53 AM, Tom Roche wrote: > Kent Johnson Mon, 11 Jan 2010 06:42:39 -0500 >> However I don't recommend this style of organizing tests. I prefer >> using nose for test discovery, it saves the work of creating all the >> aggregating suites. > > I've heard of Nose and am plan

Re: [Tutor] composing one test suite from two test cases

2010-01-11 Thread Tom Roche
Tom Roche Sun, Jan 10, 2010 at 10:44 PM >> How to create a single unittest test suite class that runs all >> methods from multiple TestCase classes? Kent Johnson Mon, 11 Jan 2010 06:42:39 -0500 > The supported way to do this is to create a test suite. There is an > example here: > http://docs.py

Re: [Tutor] Help with a Dictionary

2010-01-11 Thread Garry Bettle
Many thanks to Alan Gauld, Gerard Flanagan, Lie Ryan and spir for your replies. All systems are go! Cheers, Garry ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tips

2010-01-11 Thread Kent Johnson
On Mon, Jan 11, 2010 at 12:33 AM, VacStudent wrote: > I would like to get a python book, how and where to get one? Amazon.com? Or lots of free resources online. Kent ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] what is the equivalent function to strtok() in c++

2010-01-11 Thread Kent Johnson
On Mon, Jan 11, 2010 at 2:33 AM, sudhir prasad wrote: > hi, > what is the equivalent function to strtok() in c++, > what i need to do is to divide a line into different strings and store them > in different lists,and write them in to another file To split on a single character or a fixed sequence

Re: [Tutor] composing one test suite from two test cases

2010-01-11 Thread Kent Johnson
On Sun, Jan 10, 2010 at 10:44 PM, Tom Roche wrote: > > How to create a single unittest test suite class that runs all methods > from multiple TestCase classes? Why I ask: > > I'm trying to relearn TDD and learn Python by coding a simple app. > Currently the app has 2 simple functional classes, Pid

[Tutor] Tips

2010-01-11 Thread VacStudent
I would like to get a python book, how and where to get one? Jappie Monele Mechanical Engineer Student Koffiefontein Blue Diamond Mine JV Petra Diamonds Group Management Office: Elizabeth House, 9 Castle Street, St. Helier, Jersey, JE4 2QP South African Office: Block 3, Silver Point Of

Re: [Tutor] Tutor Digest, Vol 71, Issue 28

2010-01-11 Thread Alan Gauld
"Make Twilight" wrote I am confuse on the text above: "If you use the 'from import' system, changes made to attrs of the imported module /won't/ be seen by any other module that imported it. If you do just an 'import' on a module (or 'import ... as ...'), then changes made to attrs on the impor

Re: [Tutor] what is the equivalent function to strtok() in c++

2010-01-11 Thread Alan Gauld
"Stefan Behnel" wrote For more sophisticated functionality use the re module or a specialised parser. Just a quick note here, "specialised parser" might sound like something that's hard to write. It's not. Good point. I meant one of the many existing parsing packages for specific purposes

Re: [Tutor] Tutor Digest, Vol 71, Issue 28

2010-01-11 Thread Make Twilight
On Sat, Jan 9, 2010 at 9:08 PM, Lie Ryan wrote: > On 1/10/2010 11:23 AM, Eric Pavey wrote: > >> I should add (that as I understand it), when you do a 'from foo import >> blah', or 'from foo import *', this is doing a /copy/ (effectively) of >> that module's attributes into the current namespace.

Re: [Tutor] what is the equivalent function to strtok() in c++

2010-01-11 Thread Stefan Behnel
Alan Gauld, 11.01.2010 10:07: For more sophisticated functionality use the re module or a specialised parser. Just a quick note here, "specialised parser" might sound like something that's hard to write. It's not. There are quite some parser packages available for Python that are easy to use.

Re: [Tutor] what is the equivalent function to strtok() in c++

2010-01-11 Thread Alan Gauld
"Dave Angel" wrote If your tokens are separated by whitespace, you can simply use a single call to split(). It will turn a single string into a list of tokens. line = "Now is the time" print line.split() will display the list: ['Now', 'is', 'the', 'time'] And if it's not separated by

Re: [Tutor] tk help

2010-01-11 Thread Alan Gauld
"Kirk Vander Meulen" wrote I'm working on a program partly to get the hang of gui programming. I'm a bit puzzled by the behavior of simple dialogs- I wonder why, in the following code, the second call to tkMessageBox.askyesno always returns 'False' (either 'yes' or 'no' return False!). If I