[Beginner] - Hanging in the code, can't figure out what's wrong

BartC bc at freeuk.com
Sun Apr 3 16:21:30 EDT 2016


On 03/04/2016 20:36, Loop.IO wrote:
> On Sunday, April 3, 2016 at 8:32:06 PM UTC+1, Loop.IO wrote:

>> The issue is that it hangs, there is no error. its like it pauses until i press enter, ill try what you've posted one momen


> Ok the Bartc code gives me an error.

This is confusing! I know you said you fixed the problem now, but if it 
was waiting for the user to press enter, then you still had a raw_input 
or input() call in your code.

You need to get rid of that raw_input(). That was explained early on in 
the thread but perhaps you didn't grasp that you had to use:

   name = '....'

in place of:

   name = raw_input(....)

and not as well as!

(And the 'r' in name = r'....' isn't a different version of raw_input(), 
it's just a way of entering strings without having to type \\ when you 
need \.)

-- 
Bartc



More information about the Python-list mailing list