Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread John Smith
On 11/29/2010 9:41 PM, Rance Hall wrote: On Mon, Nov 29, 2010 at 8:21 PM, John Smith wrote: On 11/29/2010 5:56 PM, Emile van Sebille wrote: (snip) Hmmm... any chance you don't have administrative rights on the account performing this? I never got to Win7 (having stopped at XP) but I know it'

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread Rance Hall
On Mon, Nov 29, 2010 at 8:21 PM, John Smith wrote: > > On 11/29/2010 5:56 PM, Emile van Sebille wrote: > (snip) >> >> Hmmm... any chance you don't have administrative rights on the account >> performing this? I never got to Win7 (having stopped at XP) but I know >> it's got a reputation for excess

Re: [Tutor] REport Card Question

2010-11-29 Thread Wayne Werner
On Mon, Nov 29, 2010 at 8:28 PM, Robert Sjöblom wrote: > > > On a related note, do all functions implicitly contain "return None" > in them? Trying out this function (correctly) would get "None" added, > such as: > Enter grade:76 > B, Try Harder > None > > Is there a way to avoid "return None" wi

Re: [Tutor] REport Card Question

2010-11-29 Thread Robert Sjöblom
>>  Write a code that will take an input from a user (numerical grade) and >> convert their numerical grade into a letter grade that is accompanied by a >> ?smart? statement. >> >>  def grade_score(grade): >> >>     if grade >=95 and grade <= 100: >> >>         print 'A+, Excellent' >> >>     elif

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread John Smith
On 11/29/2010 5:56 PM, Emile van Sebille wrote: (snip) Hmmm... any chance you don't have administrative rights on the account performing this? I never got to Win7 (having stopped at XP) but I know it's got a reputation for excessive permission asking. You're right about that. It's like Win7 is

Re: [Tutor] Package loading

2010-11-29 Thread Karim
On 11/29/2010 09:15 PM, Karim wrote: Hello every one, I created a package with the following structure: * ops/ o __init__.py o tcl/ + __init__.py + pythontcl.py > *python -c "import sys; print sys.path; import ops.tcl.pythontcl"* ['',

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread Emile van Sebille
On 11/29/2010 3:25 PM John Smith said... On 11/29/2010 4:20 PM, Emile van Sebille wrote: On 11/29/2010 1:44 PM John Smith said... But, when I tried it in Python, I got the same as before: >>> import serial >>> ser = serial.Serial(0, timeout = 1) out of curiosity, if you change the timeout

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread John Smith
On 11/29/2010 4:20 PM, Emile van Sebille wrote: On 11/29/2010 1:44 PM John Smith said... But, when I tried it in Python, I got the same as before: >>> import serial >>> ser = serial.Serial(0, timeout = 1) out of curiosity, if you change the timeout above to 5 >>> ser Serial(port='COM1

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread Emile van Sebille
On 11/29/2010 1:44 PM John Smith said... But, when I tried it in Python, I got the same as before: >>> import serial >>> ser = serial.Serial(0, timeout = 1) out of curiosity, if you change the timeout above to 5 >>> ser Serial(port='COM1', baudrate=9600, bytesize=8, parity='N', stopb

Re: [Tutor] Pyserial and invalid handle

2010-11-29 Thread John Smith
On 11/28/2010 8:06 PM, Walter Prins wrote: John, (snip stuff) Ugh, you're probably not going to like this. I've done some googling and it appears this may be a 64-bit issue with the "ctypes" module... apparently "64-bit ctypes can only import 64-bit libraries". See here: http://ur.ly/vSMQ Th

Re: [Tutor] Web Harvesting & AJAX/Javascript

2010-11-29 Thread Emile van Sebille
On 11/29/2010 11:42 AM Roy Hinkelman said... All, I am working on a project to automate the harvesting of a site that uses Javascript throughout it's navigation. So, I want to follow onclick and mouseover events that use JS functions, and capture/display the resulting info. My script is activate

[Tutor] Package loading

2010-11-29 Thread Karim
Hello every one, I created a package with the following structure: * ops/ o __init__.py o tcl/ + __init__.py + pythontcl.py > *python -c "import sys; print sys.path; import ops.tcl.pythontcl"* ['', '/usr/local/lib/python2.6/dist-packages/py

Re: [Tutor] age program

2010-11-29 Thread Alan Gauld
"Andre Jeyarajan" wrote Write a short program that will perform the following:It will ask the user for his age Since you have posted a number of what are obviously homework/assignment type questions it might help if you tell us what course you are studying, what topics you have cover

[Tutor] Web Harvesting & AJAX/Javascript

2010-11-29 Thread Roy Hinkelman
All, I am working on a project to automate the harvesting of a site that uses Javascript throughout it's navigation. So, I want to follow onclick and mouseover events that use JS functions, and capture/display the resulting info. My script is activated by an onload event. I just want to make sure

Re: [Tutor] temporarily modifying sys.path

2010-11-29 Thread Alan Gauld
"Steven D'Aprano" wrote I think its new in Python v3... Nah, it's been around forever: [st...@sylar ~]$ python1.5 Wow, I've never even noticed it before, let alone used it... Its amazing what that battery pack contains :-) Alan G ___ Tutor

Re: [Tutor] age program

2010-11-29 Thread Alex Hall
On 11/29/10, Andre Jeyarajan wrote: > Write a short program that will perform the following:It will ask the user > for his age,it will then present the user with a menu, with 4 choices:Tell > the user whether his age is an even or an odd number > Tell the user his age squared > Tell the user how m

Re: [Tutor] age program

2010-11-29 Thread Andre Engels
We will not make your homework for you. However, we may well give you hints and perhaps solve small parts that you are unable to do yourself. For that, however, we need to know *what* it is that you are having problems with. Thus: You said that you have tried everything you can. What have you trie

[Tutor] age program

2010-11-29 Thread Andre Jeyarajan
Write a short program that will perform the following:It will ask the user for his age,it will then present the user with a menu, with 4 choices:Tell the user whether his age is an even or an odd number  Tell the user his age squared  Tell the user how many years until he’s 100 years old, or tell

Re: [Tutor] temporarily modifying sys.path

2010-11-29 Thread Steven D'Aprano
Alan Gauld wrote: "Tim Johnson" wrote Just curious, but could the imp module help you? imp.find_module I'll be darned. I never even heard of that module, but I just did an import and looked at the docs. I *will* give that a try. I think its new in Python v3... Nah, it's been around f

Re: [Tutor] Python Exercise

2010-11-29 Thread Evans Anyokwu
Providing trial section alone will not make much difference. You should consider removing the need to sign in as well and focus on providing great tutorial content. Good luck On Sun, Nov 28, 2010 at 2:43 AM, Kok Cheng Tan wrote: > Hi, > > Thanks for the feedback. > I will add a trial section th

Re: [Tutor] noob

2010-11-29 Thread Andre Engels
On Mon, Nov 29, 2010 at 6:57 AM, Mary wrote: > Dear Tutors: > > Thank you for your time.I am trying to do first assignment (ps1a+b) onMIT > open study, finding the 1000th prime in part a and doing something with > import.math and logs in part b, but I'm not there yet. The little build i > did to f

Re: [Tutor] noob

2010-11-29 Thread Alan Gauld
"Mary" wrote finding the 1000th prime The little build i did to find primes does fine until, for some reason, 95 shows up, and later other multiples of 5 .Is it me? Have uninstalled and reinstalled 2.7 twice. It is always tempting when you start programming to assume there must be so

Re: [Tutor] Temperature Scales

2010-11-29 Thread Alan Gauld
"Andre Jeyarajan" wrote Write two functions that will convert temperatures back and forth from the Celsius and Fahrenheit temperature scales (using raw_input) If we ignore the raw_input bit you have done what you were asked. def C_F(x): y = (x-32)*(5.0/9) print y Although as a styl

[Tutor] noob

2010-11-29 Thread Mary
Dear Tutors: Thank you for your time.I am trying to do first assignment (ps1a+b) onMIT open study, finding the 1000th prime in part a and doing something with import.math and logs in part b, but I'm not there yet. The little build i did to find primes does fine until, for some reason, 95 shows