Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Ed Troy
I found the problem. Originally, I was getting errors that were related to formatting, apparently. It looked fine to me, but because I had copied it from the web, there were, apparently, hidden characters. In an effort to get rid of errors, I was eliminating some lines. I finally added a line,

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Felix Dietrich
> Alan Gauld via Tutor writes: >> On 26/10/16 04:19, Ed Troy wrote: >> Would it be a help if I actually list the python program that I am >> trying to run? > > Yes. I'm assuming you just cut n paste the code from the web site but > something could have gone wrong with the

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Felix Dietrich
Ed Troy writes: > I am pretty sure I installed python3. And, also, matplotlib, scipy, > and numpy. > How do I verify which versions of python and numpy, matplotlib and > scipy I have installed? The following commandline should list the version of installed python

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Alan Gauld via Tutor
On 26/10/16 04:19, Ed Troy wrote: > I am pretty sure I installed python3. And, also, matplotlib, scipy, and > numpy. If I enter either python or python3, I get the >>> prompt, so I > may have both installed. Yes, that's normal. Ubuntu uses python 2 for some of its utilities. > How do I verify

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Ed Troy
I am pretty sure I installed python3. And, also, matplotlib, scipy, and numpy. If I enter either python or python3, I get the >>> prompt, so I may have both installed. How do I verify which versions of python and numpy, matplotlib and scipy I have installed? I am pretty sure I have

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-25 Thread Alan Gauld via Tutor
On 25/10/16 20:24, Ed Troy wrote: > my Ubuntu machine. I created the diode IV curve data as per the article, > but I can't seem to get it to run. > edward@ubuntu:~$ python LED_model_utf8.py LED_IV.txt > Traceback (most recent call last): >File "LED_model_utf8.py", line 4, in > import

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-25 Thread Marc Tompkins
On Oct 25, 2016 3:07 PM, "Ed Troy" wrote: >I get an error message: > edward@ubuntu:~$ python LED_model_utf8.py LED_IV.txt > Traceback (most recent call last): > File "LED_model_utf8.py", line 4, in > import matplotlib.pyplot as plt > ImportError: No module named

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-25 Thread Ben Finney
Ed Troy writes: > I found a very useful Python program for calculating the Spice > parameters for a LED. I have Python3 and the various modules loaded > onto my Ubuntu machine. Which libraries, specifically, have you installed? > When I type python LED_model_utf8.py

[Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-25 Thread Ed Troy
I found a very useful Python program for calculating the Spice parameters for a LED. I have Python3 and the various modules loaded onto my Ubuntu machine. I created the diode IV curve data as per the article, but I can't seem to get it to run. My python filename is LED_model_utf8.py The text

Re: [Tutor] What is wrong with my code?

2015-03-29 Thread Danny Yoo
On Fri, Jan 23, 2015 at 1:40 PM, Antonia van der Leeuw antonia.van.der.le...@hotmail.nl wrote: Hehey! I'm learning python on a website called codecademy.com, where I made a program to decode binary numbers. I guess the site uses a different compiler, because on the site my code worked fine,

Re: [Tutor] What is wrong with my code?

2015-03-29 Thread Ben Finney
Danny Yoo d...@hashcollision.org writes: Python 3 is a different language than Python 2. It looks like the codeacademy materials use Python 2, so you should probably do the same on your local system. Alternatively, learn Python 3 (which at this time means learning somewhere other than

Re: [Tutor] What is wrong with my code?

2015-03-29 Thread Dave Angel
On 01/23/2015 04:40 PM, Antonia van der Leeuw wrote: Hehey! I'm learning python on a website called codecademy.com, where I made a program to decode binary numbers. I guess the site uses a different compiler, because on the site my code worked fine, but when I copied and pasted it into the

[Tutor] What is wrong with my code?

2015-03-29 Thread Antonia van der Leeuw
Hehey! I'm learning python on a website called codecademy.com, where I made a program to decode binary numbers. I guess the site uses a different compiler, because on the site my code worked fine, but when I copied and pasted it into the Python IDLE (3.4.2) it didn't work! I'm really don't know

Re: [Tutor] What is wrong with my code?

2011-10-25 Thread apometron
I did it very much times, Anssi. Beyond of run it on Python 2.7 latest build, what do you suggest? Do install Python 3.2 along the Python 2.7 installation could give me any problems? cheers, Apometron http://about.me/apometron On 10/25/2011 6:11 AM, Anssi Saari wrote:

Re: [Tutor] What is wrong with my code?

2011-10-25 Thread Dave Angel
(Once again, please don't top-post. It makes your responses out of order) On 10/25/2011 04:24 AM, apometron wrote: I did it very much times, Anssi. Beyond of run it on Python 2.7 latest build, what do you suggest? Do install Python 3.2 along the Python 2.7 installation could give me any

Re: [Tutor] What is wrong with my code?

2011-10-25 Thread apometron
On 10/25/2011 7:34 AM, Dave Angel wrote: (Once again, please don't top-post. It makes your responses out of order) On 10/25/2011 04:24 AM, apometron wrote: I did it very much times, Anssi. Beyond of run it on Python 2.7 latest build, what do you suggest? Do install Python 3.2 along the

Re: [Tutor] What is wrong with my code?

2011-10-23 Thread apometron
Sorry to continue discussing my thread on this list, I already subbed on the Tutor list but I need to reply and if possible, some ideas of why it dont works. Now it is another thing, entirely. Rename1.py and Rename2.py works, but why Rename3.py dont works? http://pastebin.com/dExFtTkp Thanks

[Tutor] what is wrong with the syntax?

2010-07-10 Thread Dipo Elegbede
Hi all, please tell me what is wrong with the syntax as written herein: http://pastebin.com/BkLi0A4H I am actually trying to let a user input something and have the input returned in a reverse form and also see the lenght of the input. please help. -- Elegbede Muhammed Oladipupo OCA

Re: [Tutor] what is wrong with the syntax?

2010-07-10 Thread Steve Willoughby
On 10-Jul-10 10:05, Dipo Elegbede wrote: Hi all, please tell me what is wrong with the syntax as written herein: http://pastebin.com/BkLi0A4H I am actually trying to let a user input something and have the input returned in a reverse form and also see the lenght of the input. please help. Is

Re: [Tutor] what is wrong with the syntax?

2010-07-10 Thread Alan Gauld
Dipo Elegbede delegb...@dudupay.com wrote please tell me what is wrong with the syntax as written herein: http://pastebin.com/BkLi0A4H Please post full error reports as well as the code. It helps a lot! You code has numerous errrs in it but the syntax errors are in the print statements.

[Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) thank you. i am currently reading a byte of a python. thanks. -- Elegbede Muhammed Oladipupo OCA +2348077682428 +2347042171716 www.dudupay.com Mobile

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread zaldi
in the header of for loop, you don't need to use the - for i in range(10) On 5/18/10, Dipo Elegbede delegb...@dudupay.com wrote: ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) thank you. i am

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread alex gunn
its the the part print('Here are the numbers from 0 to 9') # for i in the range(10): #your version for i in range(10): #try this print(i) im still learning myself, so be gentle if im wrong but it worked for me. Alex ___ Tutor maillist -

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Vern Ceder
Dipo Elegbede wrote: ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) Remove the word the print('Here are the numbers from 0 to 9') for i in range(10): print(i) Cheers, Vern thank you. i am

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
all worked well. thanks all. On Tue, May 18, 2010 at 2:47 PM, alex gunn alex.g...@smallshinyant.comwrote: its the the part print('Here are the numbers from 0 to 9') # for i in the range(10): #your version for i in range(10): #try this print(i) im still learning myself, so be gentle

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Steven D'Aprano
On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) thank you. Others have already given you the answer, but more important is for you to learn *how* to

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
thanks Steven. I'll always be mindful of that. By the way, I need someone to briefly explain to me how the while loop works. a little on break will also do. thanks. On 5/18/10, Steven D'Aprano st...@pearwood.info wrote: On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: ples help me figure

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
A LITTLE EXPLANATIONS ON CONTINUE WOULD BE APPRECIATED TOO. in a recap, i would appreciate any brief explanation on 1. break 2. continue 3. while loop how they work and application in writing codes. thank you all. On 5/18/10, Dipo Elegbede delegb...@dudupay.com wrote: thanks Steven. I'll

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread bob gailer
On 5/18/2010 11:23 AM, Steven D'Aprano wrote: Others have already given you the answer, but more important is for you to learn *how* to get the answer. Look at the error message Python prints: for i in the range(10): File stdin, line 1 for i in the range(10):

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Alan Gauld
Dipo Elegbede delegb...@dudupay.com wrote By the way, I need someone to briefly explain to me how the while loop works. a little on break will also do. Your tutorial should do that but you can also look at the Loops section of my tutorial - use the V3 version - for a discussion of while

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread spir ☣
On Wed, 19 May 2010 01:23:55 +1000 Steven D'Aprano st...@pearwood.info wrote: On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) thank you.

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Steven D'Aprano
On Wed, 19 May 2010 03:29:46 am spir ☣ wrote: (Fortunately, python 3.2, planned for April 1, 2011, will be informed that the is an english article. This is possible since there is no ambiguity with thé (fr), thank to Python's clever diacritic-awareness. Only remains then the problematic case

[Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
hello, i have a list of tables i want to drop: user_tables = ['notification', 'userNotification', 'product_comments', 'product_donation_paypalTransaction', 'product_donation', 'productList_recommended', 'productList_user_assoc', 'profile_values'] drop_user_tables = DROP TABLE IF EXISTS db2.%s

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Serdar Tumgoren
user_tables = ['notification', 'userNotification', 'product_comments', 'product_donation_paypalTransaction', 'product_donation', 'productList_recommended', 'productList_user_assoc', 'profile_values'] drop_user_tables = DROP TABLE IF EXISTS db2.%s try: cursor.execute(drop_user_tables,

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
thanks for the reply. On Mon, Apr 26, 2010 at 7:18 PM, Serdar Tumgoren zstumgo...@gmail.com wrote: user_tables = ['notification', 'userNotification', 'product_comments', 'product_donation_paypalTransaction', 'product_donation', 'productList_recommended', 'productList_user_assoc',

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
On Mon, Apr 26, 2010 at 7:45 PM, Norman Khine nor...@khine.net wrote: thanks for the reply. On Mon, Apr 26, 2010 at 7:18 PM, Serdar Tumgoren zstumgo...@gmail.com wrote: user_tables = ['notification', 'userNotification', 'product_comments', 'product_donation_paypalTransaction',

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Steve Willoughby
On Mon, Apr 26, 2010 at 07:53:17PM +0200, Norman Khine wrote: ok this worked, cursor.execute(drop_user_tables % ,.join(user_tables)) it seems that DROP TABLE (and other DDL statements) don't technically take SQL parameters. That's correct. The point of using %s as a placeholder for an

[Tutor] What is wrong my code?

2006-03-24 Thread Hoffmann
Hello: Could anyone, please, let me know what is wrong with my code (shown below)? I am getting a runtime error. Thanks! Hoffmann ps: The code: #!/usr/bin/python import math print '''This program calculates the lenght of the hypotenuse of a right triangle given the lenghts of the two legs

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Danny Yoo
leg1 = raw_input('Enter the first leg of the triangle: ') leg2 = raw_input('Enter the second leg of the triangle: ') Hi Hoffmann, leg1 and leg2 here are strings, because raw_input() is guaranteed to return strings. You'll want to do something to turn those strings into numbers, since the

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Matthew White
Hi Hoffman, Include the definition for hypotenuse() before it is called in your script. Also, please include the full output from the error next time. It helps with figuring out the exact problem. :) -mtw On Fri, Mar 24, 2006 at 01:02:45PM -0800, Hoffmann ([EMAIL PROTECTED]) wrote: Hello:

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Alan Gauld
Could anyone, please, let me know what is wrong with my code (shown below)? I am getting a runtime error. For future reference can you post the error as well as the code. It helps a lot in figuring out the problem. Alan G. ___ Tutor maillist -

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Danny Yoo
#!/usr/bin/python import math print '''This program calculates the lenght of the hypotenuse of a right triangle given the lenghts of the two legs as parameters.\n''' leg1 = input('Enter the first leg of the triangle: ') leg2 = input('Enter the second leg of the triangle: ') Hi

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Hoffmann
--- Danny Yoo [EMAIL PROTECTED] wrote: #!/usr/bin/python import math print '''This program calculates the lenght of the hypotenuse of a right triangle given the lenghts of the two legs as parameters.\n''' leg1 = input('Enter the first leg of the triangle: ') leg2 =

Re: [Tutor] What is wrong my code?

2006-03-24 Thread Danny Yoo
I did like your comments about input and raw_input. What about if I use on my program: leg1 = int( raw_input('Enter the first leg of the triangle: ') ) leg2= int( raw_input('Enter the second leg of the triangle: ') ) What do you think? This is better/safer, right? Hi Hoffmann, Yes, this

Re: [Tutor] what is wrong with this?

2005-02-13 Thread Kent Johnson
Liam Clarke wrote: Yup, that's what I was after, the full error message. self.grid1.CreateGrid(100,6) val = gridc.wxGrid_CreateGrid(self, *_args, **_kwargs) try this self.grid1.CreateGrid(self, 100, 6) I'm pretty sure you have to explicitly pass self. No, that's not it. There is an asymmetry

Re: [Tutor] what is wrong with this?

2005-02-13 Thread Kent Johnson
You might try asking for help on the Boa users mailing list. Kent jrlen balane wrote: i'm using BOA to construct the GUI. The problem is in this MDIChildFrame. The code was sort of copy and pasted from the wxpython demo grid.py then edited so that it fits what i wanted. there seems to be no

[Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
this code is for a MDIChildFrame, It has a MDIParentFrame and when I run the MDIPrentFrame, there seems to be no problem, but when I attempt to edit the MDIChildFrame using the designer mode in BOA (i'm using BOA by the way), an error occurs that says: TypeError: wxGrid_CreateGrid() takes at

Re: [Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
how would i find the stack trace? by the way, this is what the log says: 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given)Traceback(most recent call last): 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given) File

Re: [Tutor] what is wrong with this?

2005-02-12 Thread Liam Clarke
Yup, that's what I was after, the full error message. self.grid1.CreateGrid(100,6) val = gridc.wxGrid_CreateGrid(self, *_args, **_kwargs) try this self.grid1.CreateGrid(self, 100, 6) I'm pretty sure you have to explicitly pass self. Let me know how ya go. Regards, Liam Clarke On Sun,