[Tutor] Python And reading the Web - Javascript

2010-09-25 Thread Sayth Renshaw
Was hoping some could push me in the right direction about reading data from web pages and what modules to use. Is there support for reading if the page uses javascript? If you know any good links to tutorials for this it would be great. I was planning to use python 2.6 currently. I want to read

[Tutor] input and raw input

2010-09-25 Thread Ahmed AL-Masri
Hi, any one have an idea about how we can input many number in the one time and change it to list. for example: a=input("Enter the number of your class in the school:") # the number can be enter as: 12,13,14 or 12 13 14 with a space in between. now how I can put these numbers into list like

Re: [Tutor] Plotting a Linear Equation

2010-09-25 Thread Chris Fuller
It sounds to me like you need to set a nonzero linewidth. The default is to not fill in the space between points. Check out the documentation at http://matplotlib.sourceforge.net/contents.html. It's a lot to wade through, but worth it when you learn how to unlock the power of the software.

Re: [Tutor] plotting pixels

2010-09-25 Thread pierre dagenais
On 10-09-18 07:39 PM, ALAN GAULD wrote: > It appears that the Tk canvas widget does not support simply plotting a pixel. Correct, and I agree it seems odd, but in practice drawing either lines or ovals of one-pixel do the equivalent job - albeit a little more slowly. > The primitive obviousl

Re: [Tutor] Python And reading the Web - Javascript

2010-09-25 Thread Knacktus
Any ideas in general in how to do this appreciated. i don't mind reading so if you have some good links they are appreciated. I have no experience myself with this task, but I would look at those resource: 1) For reading html pages in addition to the standard-lib modules: http://www.crummy

Re: [Tutor] input and raw input

2010-09-25 Thread Evert Rol
> any one have an idea about how we can input many number in the one time and > change it to list. > for example: > > a=input("Enter the number of your class in the school:") # the number can > be enter as: 12,13,14 or 12 13 14 with a space in between. > > now how I can put these numbers

Re: [Tutor] Tutor Digest, Vol 79, Issue 134

2010-09-25 Thread Sayth Renshaw
I started seting up django. the only issue I am having is that all instructions seem to assume that I am on linux.Don't suppose there are any good instructions for those on a windows based system. On Sat, Sep 25, 2010 at 8:00 PM, wrote: > Send Tutor mailing list submissions to >tutor@pyt

Re: [Tutor] Tutor Digest, Vol 79, Issue 134

2010-09-25 Thread Evert Rol
> I started seting up django. the only issue I am having is that all > instructions seem to assume that I am on linux.Don't suppose there are any > good instructions for those on a windows based system. Firstly: please don't reply to an unrelated message, but start a new one (with a proper subj

Re: [Tutor] input and raw input

2010-09-25 Thread Brian Jones
On Sat, Sep 25, 2010 at 9:40 AM, Evert Rol wrote: > > any one have an idea about how we can input many number in the one time > and change it to list. > > for example: > > > > a=input("Enter the number of your class in the school:") # the number > can be enter as: 12,13,14 or 12 13 14 with a

Re: [Tutor] input and raw input

2010-09-25 Thread Evert Rol
> > any one have an idea about how we can input many number in the one time and > > change it to list. > > for example: > > > > a=input("Enter the number of your class in the school:") # the number > > can be enter as: 12,13,14 or 12 13 14 with a space in between. > > > > now how I can put th

Re: [Tutor] input and raw input

2010-09-25 Thread Peter Otten
Brian Jones wrote: > No need for the 're' module. Even in the case where both can be used > together, you can still just use string methods: > s > '12, 13 14' s.replace(',', '').split(' ') > ['12', '13', '14'] I think to replace "," with " " and then split() without explicit separator

[Tutor] class method problem

2010-09-25 Thread Roelof Wobben
Hello, I have this code: class zoeken() : pass def __len__(self): return 0 def __str__(self): return test2 def find(self, strng, ch, start, stop): index = start while index < len(strng) and index < stop: if strng[index] == ch:

[Tutor] class method problem

2010-09-25 Thread Roelof Wobben
Hello, Still the same errors Roelof > >> Date: Sat, 25 Sep 2010 19:33:52 +0100 >> Subject: Re: [Tutor] class method problem >> From: andre...@gmail.com >> To: rwob...@hotmail.com >> >> Your method receives 4 arguments and you didn't define one default.

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
This returns a if "a" in, or -1 if using "z": class zoeken() : pass def __len__(self): return 0 def __str__(self): return test2 def find(self, strng, ch, start, stop): index = start while index < len(st

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
This is a little better, it returns a if "a" in, or None if using "z": class zoeken() : pass def __len__(self): return 0 def __str__(self): return test2 def find(self, strng, ch, start, stop): index = start

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
Since I had nothing else to do, but practice, this looks much better: def find(word, search): if search in word: print True else: print False word = raw_input('Enter string of letters to search: ' ) search = raw_input('Enter character to find: ')

Re: [Tutor] class method problem

2010-09-25 Thread Steven D'Aprano
On Sun, 26 Sep 2010 04:15:03 am Roelof Wobben wrote: > Hello, > > I have this code: > > class zoeken() : It is traditional to name classes with an initial capital letter, so Zoeken would be better. > pass What is the point of the "pass" statement there? That does nothing. Why did you put t

Re: [Tutor] class method problem

2010-09-25 Thread Steven D'Aprano
On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote: > Since I had nothing else to do, but practice, this looks much better: > > def find(word, search): > if search in word: > print True > else: > print False For some definition of "better". If I called a fu

[Tutor] How to start IPython in Windows

2010-09-25 Thread Richard D. Moores
(I posted this to the ipython-user list 11 hours ago, with no response -- too dumb a question?) 64-bit Vista. I've downloaded "A binary Windows installer (an executable setup file)" from http://ipython.scipy.org/moin/Download , and run it. IPython is now installed in my Python26/Lib/site-packages

Re: [Tutor] How to start IPython in Windows

2010-09-25 Thread David Hutto
IIRC, it's like idle, just run: python C:\\Python\\Scripts\\ipython.py ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] class method problem

2010-09-25 Thread David Hutto
On Sat, Sep 25, 2010 at 9:16 PM, Steven D'Aprano wrote: > On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote: >> Since I had nothing else to do, but practice, this looks much better: >> >> def find(word, search): >>       if search in word: >>               print True >>       else: >>            

Re: [Tutor] How to start IPython in Windows

2010-09-25 Thread Richard D. Moores
On Sat, Sep 25, 2010 at 21:12, David Hutto wrote: > IIRC, it's like idle, just run: > python C:\\Python\\Scripts\\ipython.py Yes! Thank you! Here what that got me: = C:\Python26\Scripts>ipython **