Re: [Tutor] Newbie question: programs not printing

2016-03-10 Thread Alan Gauld
On 10/03/16 13:33, Patrick Craine wrote: > I downloaded Python 2.7.11 but for some reason it seems that it's not > responding the way it¹s supposed to. I haven¹t been able to figure out the > problem. I¹m on Mac OSX 10.11.3. You probably didn't need to download Python because it is installed by

Re: [Tutor] Newbie question: programs not printing

2016-03-10 Thread Marc Tompkins
On Thu, Mar 10, 2016 at 5:33 AM, Patrick Craine wrote: > >>> x = int(raw_input('Enter an integer: ')) > if x%2 == 0: > print 'Even' > else: > print 'Odd' > if x%3 != 0: > print 'And not divisible by 3' > Enter an integer: 3 > >>> > > It could be your email program

[Tutor] Newbie question: programs not printing

2016-03-10 Thread Patrick Craine
Hey guys, I¹m at the very beginning of learning programming. I started using Khan Academy and now am watching the intro course on MIT OpenCourseWare. I downloaded Python 2.7.11 but for some reason it seems that it's not responding the way it¹s supposed to. I haven¹t been able to figure out the

[Tutor] Newbie Question

2015-11-11 Thread George Henry
How do I find a site to download Python for Windows that includes a Toolbar? I'm using Windows 8.1 Have tried installing Python 3.4.2 but notice that the Python shell does not include a tool bar (i.e. File, Edit, Shell, Debug, etc.). Help please. Thanks!

Re: [Tutor] Newbie Question

2015-11-11 Thread Mark Lawrence
On 11/11/2015 19:38, George Henry wrote: How do I find a site to download Python for Windows that includes a Toolbar? I'm using Windows 8.1 Have tried installing Python 3.4.2 but notice that the Python shell does not include a tool bar (i.e. File, Edit, Shell, Debug, etc.). Help please.

Re: [Tutor] Newbie Question

2015-11-11 Thread Albert-Jan Roskam
d, 11 Nov 2015 11:38:47 -0800 > Subject: [Tutor] Newbie Question > > How do I find a site to download Python for Windows that includes a Toolbar? > > I'm using Windows 8.1 Have tried installing Python 3.4.2 but notice that > the Python shell does not include a tool bar (i.e. File

[Tutor] Newbie question. Is it possible to run/call a python2.7 program and reference results from/in python3.3?

2013-09-13 Thread Paul Smith
Attempting a simple web crawler in python3, browse a url - collect/clean/produce valid url list from a url; random choice from valid url list; visit new url repeat process - collect/clean/produce valid url list from new url... So there are many tools out there but mechanize and scrapy 3rd party

Re: [Tutor] Newbie question. Is it possible to run/call a python2.7 program and reference results from/in python3.3?

2013-09-13 Thread Alan Gauld
On 13/09/13 15:59, Paul Smith wrote: So there are many tools out there but mechanize and scrapy 3rd party modules seem to produce the best results; however nothing like these exist for Python3. I get close but cannot produce the clean simple url results in python3 Yes that's the biggest

Re: [Tutor] Newbie question - syntax - BeautifulSoup

2010-07-30 Thread Tommy Kaas
Thanks for the explanation. It's clearer now. Tommy Tommy Kaas tommy.k...@kaasogmulvad.dk wrote for row in soup('table', {'class' : 'spad'})[0].tbody('tr'): Do you understand the syntax from a Python point of view? No. That's the problem. OK, I'll assume you understand the basic for

[Tutor] Newbie question - syntax - BeautifulSoup

2010-07-28 Thread Tommy Kaas
I have just begun a struggle learning Python. I have read most of Beginning Python - from Novice to Professional - and some of it I even understood J This is my first question to the list. And I'm sure not the last. I'm especially interested in learning web scraping techniques and here:

Re: [Tutor] Newbie question - syntax - BeautifulSoup

2010-07-28 Thread Alan Gauld
Tommy Kaas tommy.k...@kaasogmulvad.dk wrote for row in soup('table', {'class' : 'spad'})[0].tbody('tr'): The example works fine, and I can change it a bit and it still works. But I simply don't understand how I am supposed to the fourth line - after for row in soup. I can clearly see it

Re: [Tutor] Newbie question - syntax - BeautifulSoup

2010-07-28 Thread Tommy Kaas
-Oprindelig meddelelse- Fra: tutor-bounces+tommy.kaas=kaasogmulvad...@python.org [mailto:tutor-bounces+tommy.kaas=kaasogmulvad...@python.org] På vegne af Alan Gauld Sendt: 28. juli 2010 20:00 Til: tutor@python.org Emne: Re: [Tutor] Newbie question - syntax - BeautifulSoup Tommy Kaas

Re: [Tutor] Newbie question - syntax - BeautifulSoup

2010-07-28 Thread Alan Gauld
Tommy Kaas tommy.k...@kaasogmulvad.dk wrote for row in soup('table', {'class' : 'spad'})[0].tbody('tr'): Do you understand the syntax from a Python point of view? No. That's the problem. OK, I'll assume you understand the basic for loop structure and focus on the function call:

Re: [Tutor] newbie question about list element manipulation after split()

2008-10-16 Thread Kent Johnson
2008/10/16 Emad Nawfal (عماد نوفل) [EMAIL PROTECTED]: It works fine. It seems that in the file you have there are lines whose length is less than you should expect Yes, my guess is there is a blank line in the file. Kent ___ Tutor maillist -

Re: [Tutor] newbie question about list element manipulation after split()

2008-10-16 Thread Emad Nawfal (عماد نوفل)
On Thu, Oct 16, 2008 at 4:25 AM, Visvaldas K. [EMAIL PROTECTED]wrote: Hi, I feel very stupid, but I am stuck. I could try some workaround, but I want to understand what I am doing wrong. The line: for line in open(parameterfile).readlines( ): print line.split()#

Re: [Tutor] newbie question about list element manipulation after split()

2008-10-16 Thread Emad Nawfal (عماد نوفل)
Here is a solution: for line in open('DBAN1001.txt').readlines(): ... line = line.split() ... if len(line) 1: # This is what makes it work for me. ... print line[1] ... it's have the way that is is prison we It works fine. It seems that in the file you have there are lines

[Tutor] Newbie question

2008-07-01 Thread Nkem Onyemachi
Hi, I am studying thinking like a computer scientist using Python. chapter 4 importing turtleworld is kind of a hitch 4 me .I downloaded the swampy module and when importing, the interpreter gives am error saying this module does not exist what do i do? i saved the swampy folder in the Python

Re: [Tutor] Newbie question

2008-07-01 Thread asdg asdg
. -Mishu --- On Tue, 7/1/08, Nkem Onyemachi [EMAIL PROTECTED] wrote: From: Nkem Onyemachi [EMAIL PROTECTED] Subject: [Tutor] Newbie question To: tutor@python.org Date: Tuesday, July 1, 2008, 1:19 PM Hi, I am studying thinking like a computer scientist using Python. chapter 4 importing turtleworld

Re: [Tutor] Newbie question

2008-07-01 Thread Alan Gauld
asdg asdg [EMAIL PROTECTED] wrote You need to add the folder containing this module to your PYTHONPATH. Being picky you want to add it to your sys.path value Python loads sys.path from the values in PYTHONPATH which is an OS environment variable. Modifying PYTHONPATH after you start Python

Re: [Tutor] newbie question

2007-10-18 Thread jon vspython
From http://diveintopython.org/getting_to_know_python/index.html, we can get this solution which works no matter the size of the dictionaries: print ' '.join([%s % (v,) for k,v in menu_specials.items()]) It generates a formatted string for value in the dictionary and then joins them using white

Re: [Tutor] newbie question

2007-10-15 Thread Evert Rol
Hi Ram, Either of the following should do it: print string.join([menu_specials[val] for val in menu_specials], ', ') or print string.join([menu_specials[val] for val in menu_specials.keys()], ', ') or print string.join([menu_specials[val] for val in [breakfast,

Re: [Tutor] newbie question

2007-10-15 Thread Trilok Khairnar
' Subject: RE: [Tutor] newbie question Either of the following should do it: print string.join([menu_specials[val] for val in menu_specials], ', ') or print string.join([menu_specials[val] for val in menu_specials.keys()], ', ') or print string.join([menu_specials[val] for val

Re: [Tutor] newbie question

2007-10-15 Thread Trilok Khairnar
With this, and if you want to use your formatted print statements instead of the join, you could use something like print Specials: %s %s %s % tuple(menu_specials.values()) which turns the output of menu_specials.values() (a list) into a tuple. Disadvantage is that you'll need to know the

Re: [Tutor] newbie question (teaching you to fish?)

2007-10-15 Thread bob gailer
Ramkumar Kashyap wrote: Hi all, I have just started learning to program and am working through the Beginning Python from Wrox. I am working through one of the examples in the books on dictionaries. Here is the example. menu_specials = {breakfast : sausage and eggs, ... lunch : split

Re: [Tutor] newbie question

2007-10-15 Thread Trilok Khairnar
that was parseably short, though not quite exactly pithy. :-) Regards, Trilok -Original Message- From: Luke Paireepinart [mailto:[EMAIL PROTECTED] Sent: Monday, October 15, 2007 10:03 PM To: Trilok Khairnar Cc: tutor@python.org Subject: Re: [Tutor] newbie question Trilok Khairnar wrote

Re: [Tutor] newbie question

2007-10-15 Thread Luke Paireepinart
Trilok Khairnar wrote: With this, and if you want to use your formatted print statements instead of the join, you could use something like print Specials: %s %s %s % tuple(menu_specials.values()) which turns the output of menu_specials.values() (a list) into a tuple.

Re: [Tutor] newbie question

2007-10-15 Thread Alan Gauld
Ramkumar Kashyap [EMAIL PROTECTED] wrote print %s %s %s % menu_specials[breakfast], menu_specials[lunch], menu_specials[dinner] Whoops, I also should have added parentheses around the values. Otherwise Python sees a tuple consisting of the string and first value followed by the two

Re: [Tutor] newbie question

2007-10-15 Thread Alan Gauld
Ramkumar Kashyap [EMAIL PROTECTED] wrote menu_specials = {breakfast : sausage and eggs, ... lunch : split pea soup and garlic bread, ... dinner: 2 hot dogs and onion rings} print %s % menu_specials[breakfast] You don't really need the %s bit it could just be print menu_specials[breakfast]

Re: [Tutor] newbie question

2007-10-15 Thread jon vspython
There's also a specially tailored solution for dictionaries: print %(breakfast)s %(lunch)s %(dinner)s % menu_specials ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] newbie question

2007-10-15 Thread Alan Gauld
jon vspython [EMAIL PROTECTED] wrote There's also a specially tailored solution for dictionaries: print %(breakfast)s %(lunch)s %(dinner)s % menu_specials Good catch! I keep forgetting about that. I really must get into the habit of using it more often when working with dictionaries.

Re: [Tutor] newbie question

2007-06-17 Thread Kent Johnson
bellzii wrote: hey everyone , can any1 tell me what does the module optparse do ? It helps parse command line arguments. See the docs at http://docs.python.org/lib/module-optparse.html Kent ___ Tutor maillist - Tutor@python.org

[Tutor] newbie question

2007-06-17 Thread bellzii
hey everyone , can any1 tell me what does the module optparse do ? thanks 4 ur time -- View this message in context: http://www.nabble.com/newbie-question-tf3935888.html#a11162803 Sent from the Python - tutor mailing list archive at Nabble.com. ___

Re: [Tutor] newbie question

2007-06-17 Thread Alan Gauld
bellzii [EMAIL PROTECTED] wrote hey everyone , can any1 tell me what does the module optparse do ? It parses options. That is it takes a command string and works out what the various bits mean, in particular the command line options or switches. For example you can call python like this: $

[Tutor] Newbie Question on Exceptions...

2007-05-08 Thread dsh0105
I'm working my way through the book beginning python and I came across an exercise that suggests using Exception trapping to see if a value is in a dictionary: fridge={apple:A shiny red apple,pear:a nice ripe pear,grapes:seadless grapes} food_sought=apple fridge_list=fridge.keys(); try:

Re: [Tutor] Newbie Question on Exceptions...

2007-05-08 Thread Bob Gailer
[EMAIL PROTECTED] wrote: I'm working my way through the book beginning python and I came across an exercise that suggests using Exception trapping to see if a value is in a dictionary: fridge={apple:A shiny red apple,pear:a nice ripe pear,grapes:seadless grapes} food_sought=apple

Re: [Tutor] Newbie Question on Exceptions...

2007-05-08 Thread Andre Engels
2007/5/8, [EMAIL PROTECTED] [EMAIL PROTECTED]: I'm working my way through the book beginning python and I came across an exercise that suggests using Exception trapping to see if a value is in a dictionary: fridge={apple:A shiny red apple,pear:a nice ripe pear,grapes:seadless grapes}

Re: [Tutor] Newbie Question on Exceptions...

2007-05-08 Thread Alan Gauld
[EMAIL PROTECTED] wrote fridge={apple:A shiny red apple,pear:a nice ripe pear,grapes:seadless grapes} food_sought=apple fridge_list=fridge.keys(); Not sure what this line is for... try: print The fridge contains %s %fridge[food_sought] except (KeyError): print The fridge does not

Re: [Tutor] Newbie Question on Exceptions...

2007-05-08 Thread John Fouhy
On 09/05/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: try: print The fridge contains %s %fridge[food_sought] except (KeyError): print The fridge does not contain %s%food_sought [...] Is the same true of Python? Or is ok to use Exception handling like the book suggests? This

Re: [Tutor] Newbie question concerning text covering multiple lines

2007-04-05 Thread Alan Gauld
Kent Johnson [EMAIL PROTECTED] wrote Several good beginners tutorials are listed here: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers But very few of them will have been updated to reflect changes in 2.5. My own tutor is accurate for 2.3. This is precisely because, as Kent said,

[Tutor] Newbie question concerning text covering multiple lines

2007-04-04 Thread Guba Castro
Hello, I recently started teaching myself Python with Michael Dawson's 'Python Programming for the Absolute Beginner'. My problem is that I am running Python 2.5 under Linux while the book is based on Python 2.2.3. Apparently this means that I cannot just follow the programming examples the

Re: [Tutor] Newbie question concerning text covering multiple lines

2007-04-04 Thread Kent Johnson
Guba Castro wrote: Hello, I recently started teaching myself Python with Michael Dawson's 'Python Programming for the Absolute Beginner'. My problem is that I am running Python 2.5 under Linux while the book is based on Python 2.2.3. Apparently this means that I cannot just follow the

[Tutor] Newbie question: random.sample illusion?

2006-12-07 Thread Moedeloos Overste
Hi everybody, I'm in the process of learning Python and working my way through O'Reilly's Learning Python. As an excercise I wrote (some copy/paste as well) a small lottery program just to learn how to work with lists and dictionarys etc. The user has to enter 6 numbers from a range(1-45). The

Re: [Tutor] Newbie question: random.sample illusion?

2006-12-07 Thread Luke Paireepinart
Moedeloos Overste wrote: Hi everybody, I'm in the process of learning Python and working my way through O'Reilly's Learning Python. As an excercise I wrote (some copy/paste as well) a small lottery program just to learn how to work with lists and dictionarys etc. The user has to enter 6

Re: [Tutor] Newbie question: random.sample illusion?

2006-12-07 Thread Luke Paireepinart
Moedeloos Overste wrote: Hi everybody, I'm in the process of learning Python and working my way through O'Reilly's Learning Python. As an excercise I wrote (some copy/paste as well) a small lottery program just to learn how to work with lists and dictionarys etc. The user has to enter 6

Re: [Tutor] Newbie question: random.sample illusion?

2006-12-07 Thread Moedeloos Overste
From: Luke Paireepinart [EMAIL PROTECTED] To: Moedeloos Overste [EMAIL PROTECTED] CC: tutor@python.org Subject: Re: [Tutor] Newbie question: random.sample illusion? Date: Thu, 07 Dec 2006 12:17:23 -0600 Moedeloos Overste wrote: Hi everybody, I'm in the process of learning Python and working my way

[Tutor] Newbie question: join() string method

2006-11-27 Thread Moedeloos Overste
Hi, I'm trying to use the join() method on a list to be able to store the contents of that list in a file. Basically I want the contents of the list stored without the []. I've tried numerous ways of using the join() method, but they all return errors. I've tried using the tutorial and

Re: [Tutor] Newbie question: join() string method

2006-11-27 Thread Andreas Kostyrka
,.join(str(x) for x in intList) Andreas _ Ursprüngliche Mitteilung _ Betreff:[Tutor] Newbie question: join() string method Autor: Moedeloos Overste [EMAIL PROTECTED] Datum: 27. November 2006 13:20:41 Hi, I'm trying to use the join() method on a list to be able

Re: [Tutor] Newbie question: join() string method

2006-11-27 Thread jhl
Hi, I am not sure what 'random' does (what package is it from?), but list=['1','2','3'] slist=','.join(list) works, while list=[1,2,3] slist=','.join(list) does not. It appears 'join' only works on lists (and maybe tuples?) of string objects and the list must be passed in as an argument.

Re: [Tutor] Newbie question: join() string method

2006-11-27 Thread Moedeloos Overste
Kostyrka [EMAIL PROTECTED] Reply-To: Andreas Kostyrka [EMAIL PROTECTED] To: Moedeloos Overste [EMAIL PROTECTED] CC: tutor@python.org Subject: Re: [Tutor] Newbie question: join() string method Date: Mon, 27 Nov 2006 13:32:59 +0100 ,.join(str(x) for x in intList) Andreas _ Ursprüngliche Mitteilung

Re: [Tutor] Newbie question: join() string method

2006-11-27 Thread Alan Gauld
Moedeloos Overste [EMAIL PROTECTED] wrote One question: When I run the program from IDLE it writes the data to file but when I run it from the command prompt(win32) it doesn't. why is this? How do you know? Have you searched for the file? Or are you looking in the same file that IDLE

Re: [Tutor] Newbie question: join() string method

2006-11-27 Thread wesley chun
strgOutput=,.join(str(i) for i in LotNumbers) #??converting list to string to store it. note that here, you are *not* converting the list to a string to store it. you are converting each list member to a string and creating a new list (actually generator [expression]) for the

[Tutor] newbie question about default arguments

2006-03-29 Thread Josh Adams
Hi all, I was going through the tutorial at http://docs.python.org/tut/node6.html when I came to the bit about default arguments with this code: def f(a, L=[]): L.append(a) return L print f(1) print f(2) print f(3) returns: [1] [1, 2] [1, 2, 3] From the postings here, I think I

Re: [Tutor] newbie question about default arguments

2006-03-29 Thread Josh Adams
Thanks for your help. That makes a lot more sense. Not to ask too many stupid questions, but why does the L2 assignment in the if-block create a new L variable? Shouldn't the scope from the function definition dominate the inner scope of the if-block? Thanks, Josh Josh, If you print the

Re: [Tutor] newbie question about default arguments

2006-03-29 Thread Kent Johnson
Josh Adams wrote: Thanks for your help. That makes a lot more sense. Not to ask too many stupid questions, but why does the L2 assignment in the if-block create a new L variable? Shouldn't the scope from the function definition dominate the inner scope of the if-block? It doesn't create

Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Ed Singleton
On 31/01/06, Jon Moore [EMAIL PROTECTED] wrote: Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1. The function looks like this: def ask_number(question, low, high): Ask for a number within the range response =

Re: [Tutor] Newbie question re. Functions

2006-02-01 Thread Jon Moore
Thats fine, but what differance does it make?I can see no way that it improves the code.I assume later on when the function is called, it should look as follows:move = ask_number(Where will you move? (0-8): , 0, NUM_SQUARES, 1) JonOn 01/02/06, Ed Singleton [EMAIL PROTECTED] wrote: On 31/01/06, Jon

[Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
Hi,I am still working my way through my 'Python for absolute beginners book' and have hit a brick wall with one of the end of chapter exercises.The challenge says:Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1. The function

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Kent Johnson
Jon Moore wrote: Hi, I am still working my way through my 'Python for absolute beginners book' and have hit a brick wall with one of the end of chapter exercises. The challenge says: Improve the function ask_number() so that the function can be called with a step value. Make the

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
Hi Jon, Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1. If its any consolation that doesn't really mean much to me either. I understand the concept of step value - range() takes one for example, check the docs. But

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
I guess I am not going mad then!I will skip this exercise and move on.ThanksJonOn 31/01/06, Alan Gauld [EMAIL PROTECTED] wrote:Hi Jon, Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1.If its any consolation that doesn't

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Bob Gailer
Jon Moore wrote: Hi, I am still working my way through my 'Python for absolute beginners book' and have hit a brick wall with one of the end of chapter exercises. The challenge says: Improve the function ask_number() so that the function can be called with a step value. Make the default

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
I know. Its hard enough for someone like me as it is without things like this complicating it!I have another one for the group, but I will save it for another day ;)I have been looking for contact details for the author to ask him what he was eluding to with the exercise, but to no avail. JonOn

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Danny Yoo
On Tue, 31 Jan 2006, Jon Moore wrote: I have been looking for contact details for the author to ask him what he was eluding to with the exercise, but to no avail. Hi Jon, I did find errata here: http://www.muskalipman.com/ptr_detail.cfm?group=Programmingall=1isbn=1-59200-073-8 (bottom of

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
So a general recommendation to authors is to have a member of the target audience test the book. You Jon have done that but at some cost to you and those of us on this list. One advantage of doing my book as a web site first was that I had plenty of testers before committing to print (over

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
DannyMany thanks for that, I notice a few erratas that I am yet to come up against. This will save my sanity (well some of it)1JonOn 31/01/06, Danny Yoo [EMAIL PROTECTED] wrote: On Tue, 31 Jan 2006, Jon Moore wrote: I have been looking for contact details for the author to ask him what he was

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Jon Moore
AlanAre you the author of Learn to Program Using Python: A Tutorial for Hobbyists, Self-starters and All Who Want to Learn the Art of Computer Programming? Is the book still available as a web site?JonOn 31/01/06, Alan Gauld [EMAIL PROTECTED] wrote: So a general recommendation to authors is to

Re: [Tutor] Newbie question re. Functions

2006-01-31 Thread Alan Gauld
Are you the author of Learn to Program Using Python: A Tutorial for Hobbyists, Self-starters and All Who Want to Learn the Art of Computer Programming? Yes. Is the book still available as a web site? Yes. It has been substantially rewritten sionce the book was done to cover more recent

Re: [Tutor] Newbie question

2005-11-22 Thread Danny Yoo
On Tue, 22 Nov 2005, Douglass, Erik wrote: I am trying to follow some online first timer tutorials, and I am writing the practice scripts in notepad (only w32 at work :-().. I save the script with a .py extension, and when I run it it opens for a brief moment in a command prompt then

Re: [Tutor] Newbie question

2005-11-22 Thread Liam Clarke-Hutchinson
ot trivial when you're starting. :-) Regards, Liam Clarke-Hutchinson -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglass, ErikSent: Wednesday, 23 November 2005 3:03 a.m.To: tutor@python.orgSubject: [Tutor] Newbie question I am trying to follow s

Re: [Tutor] Newbie question

2005-11-22 Thread Carroll, Barry
prompt window is to use the XP start menu: Start-All Programs-Accessories-Command Prompt HTH BGC == Date: Tue, 22 Nov 2005 08:03:08 -0600 From: Douglass, Erik [EMAIL PROTECTED] Subject: [Tutor] Newbie question To: tutor@python.org Message-ID: [EMAIL

Re: [Tutor] Newbie question

2005-11-22 Thread bob
3:03 a.m. To: tutor@python.org Subject: [Tutor] Newbie question I am trying to follow some online first timer tutorials, and I am writing the practice scripts in notepad (only w32 at work L).. I save the script with a .py extension, and when I run it it opens for a brief moment in a command prompt

Re: [Tutor] Newbie question

2005-11-22 Thread Hans Dushanthakumar
un the script. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bobSent: Wednesday, 23 November 2005 10:44 a.m.To: Liam Clarke-Hutchinson; 'Douglass, Erik'; 'tutor@python.org'Subject: Re: [Tutor] Newbie question At 12:20 PM 11/22/2005, Liam Clarke-Hutchinson wrote: Hi Eric, Either

Re: [Tutor] Newbie question

2005-11-22 Thread Liam Clarke-Hutchinson
.To: tutor@python.orgSubject: [Tutor] Newbie question I am trying to follow some online first timer tutorials, and I am writing the practice scripts in notepad (only w32 at work L).. I save the script with a .py extension, and when I run it it opens for a brief moment in

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-31 Thread Alan Gauld
friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a Mac. In that case you should switch to a PC because they are more prevalent. Also you should learn to program in COBOL since its the most prevalent of all computer languages. And yet most

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-31 Thread Jan Eden
Hi Scott, Scott Clausen wrote on 30.10.2005: As a newbie to Python I'd like to know if someone can tell me some strengths and weaknesses of this language. The reason I'm asking is a friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a Mac. I'd

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-31 Thread Liam Clarke
On 10/31/05, Scott Clausen [EMAIL PROTECTED] wrote: As a newbie to Python I'd like to know if someone can tell me some strengths and weaknesses of this language. The reason I'm asking is a friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-31 Thread Andrew P
If you are interested in learning another tool, please, start with Python. If you are interested in scripting UNIX, Perl is a fine choice. There prevalence matters, and quite a bit. But sys admins are usually very Perl-centric, and in my experience monolingual, and a bit of an insular community

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-31 Thread Tim Johnson
* Scott Clausen [EMAIL PROTECTED] [051030 16:30]: As a newbie to Python I'd like to know if someone can tell me some strengths and weaknesses of this language. The reason I'm asking is a friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a

[Tutor] Newbie Question - Python vs Perl

2005-10-30 Thread Scott Clausen
As a newbie to Python I'd like to know if someone can tell me some strengths and weaknesses of this language. The reason I'm asking is a friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a Mac. I'd appreciate hearing any views on this topic.

Re: [Tutor] Newbie Question - Python vs Perl

2005-10-30 Thread Kent Johnson
Scott Clausen wrote: As a newbie to Python I'd like to know if someone can tell me some strengths and weaknesses of this language. The reason I'm asking is a friend told me I should learn Perl over Python as it's more prevalent. I'm going to be using it on a Mac.

Re: [Tutor] Newbie question

2005-04-19 Thread Alan Gauld
def square(y): return y * y for x in range(1, 11): print square(x), print Well, I understood the code above. My question is: Is it really necessary I have the last print statment No, it just creates a blank line which makes it easier to separate the output of the program from

[Tutor] Newbie question

2005-04-18 Thread Hoffmann
Hi All: I am a newbie, and I am enjoying to study Python a lot. I have a question about an example I got from one of my books. The program is: def square(y): return y * y for x in range(1, 11): print square(x), print Well, I understood the code above. My question is: Is it really

Re: [Tutor] Newbie question

2005-04-18 Thread Lee Cullens
That just gives you a spacer line after your output. To see such as a separator change it to print '*'*10 On Apr 18, 2005, at 8:55 PM, Hoffmann wrote: Hi All: I am a newbie, and I am enjoying to study Python a lot. I have a question about an example I got from one of my books. The program is:

Re: [Tutor] Newbie question

2005-04-18 Thread Brian van den Broek
Lee Cullens said unto the world upon 2005-04-18 21:07: That just gives you a spacer line after your output. To see such as a separator change it to print '*'*10 On Apr 18, 2005, at 8:55 PM, Hoffmann wrote: Hi All: I am a newbie, and I am enjoying to study Python a lot. I have a question about

Re: [Tutor] Newbie question

2005-04-18 Thread Lee Cullens
Thank you Brian for making the point that I did such a poor job of conveying. My post did indeed fail to clearly and concisely answer the question. Lee C On Apr 18, 2005, at 11:34 PM, Brian van den Broek wrote: Lee Cullens said unto the world upon 2005-04-18 21:07: That just gives you a spacer

Re: [Tutor] Newbie question.

2005-03-04 Thread Gwyn Evans
On Fri, 28 Jan 2005 09:42:07 +0200, Adriaan Louw [EMAIL PROTECTED] wrote: I want to learn python as quick as possible, for web programming at first, and applications later on. Any leads? Hi, I'd start with the basic python tutorials, then have a look at something like CherryPy

Re: [Tutor] Newbie question.

2005-03-04 Thread Kent Johnson
Adriaan Louw wrote: I want to learn python as quick as possible, for web programming at first, and applications later on. Any leads? There are many tutorials available, see http://www.python.org/doc/Intros.html for one list. I have an xp windows and ms office machine. (I'm considering linux,

Re: [Tutor] NewBie Question... Variables

2005-02-15 Thread Liam Clarke
a = foo b = bar c = duck print I will say only this - %s to your %s and no %s % (a, b, c) I will say only this - foo to your bar and no duck And so forth. On Tue, 15 Feb 2005 19:07:56 +0900, [EMAIL PROTECTED] wrote: How can I do it with several variables? I = John print %s used to