[Tutor] File reading-(encoding problems)

2015-12-23 Thread Ratheesh kumar
Here is my code..try: data=open('info.txt') for each_line in data: try: (role,line_spoken)=each_line.split(':',1) print(role,end='') print(' said: ',end='') print(line_spoken,end='') except ValueError:

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Nnamdi Anyanwu
If you're installing modules with pip, install pip3 and install the appropriate modules using pip3 instead of using regular pip. On Dec 24, 2015 12:12 AM, "Alex Kleider" wrote: > On 2015-12-23 14:58, Jim Byrnes wrote: > >> I am in the process of moving from unbutu 12.04 to

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Alan Gauld
On 24/12/15 00:00, Mark Lawrence wrote: > Find a replacement for anything that relies on PythonCard as it hasn't > been supported for years. "Years" might be a bit much, there was an update for most distros 10 months ago, so its not quite dead. But since it relies on wxPython and that doesn't

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Mark Lawrence
On 23/12/2015 22:58, Jim Byrnes wrote: I am in the process of moving from unbutu 12.04 to 14.04. I was doing some testing and got this: jfb@Jims-1404:~$ cd MyProgs jfb@Jims-1404:~/MyProgs$ cd passwords jfb@Jims-1404:~/MyProgs/passwords$ python3 passwords.py Traceback (most recent call last):

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Alan Gauld
On 23/12/15 23:15, Nnamdi Anyanwu wrote: > If you're installing modules with pip, install pip3 and install the > appropriate modules using pip3 instead of using regular pip. Most v3 modules are also available via the Ubuntu package system so you can install via synaptic which I tend to find more

[Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Jim Byrnes
I am in the process of moving from unbutu 12.04 to 14.04. I was doing some testing and got this: jfb@Jims-1404:~$ cd MyProgs jfb@Jims-1404:~/MyProgs$ cd passwords jfb@Jims-1404:~/MyProgs/passwords$ python3 passwords.py Traceback (most recent call last): File "passwords.py", line 8, in

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Ben Finney
Jim Byrnes writes: > If I simply start it with python passwords.py it runs fine. If you type ‘python --version’ and ‘python3 --version’ you will see two different version numbers. Different versions of Python have their own separate run-time environments. Any modules

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Alex Kleider
On 2015-12-23 14:58, Jim Byrnes wrote: I am in the process of moving from unbutu 12.04 to 14.04. I was doing some testing and got this: jfb@Jims-1404:~$ cd MyProgs jfb@Jims-1404:~/MyProgs$ cd passwords jfb@Jims-1404:~/MyProgs/passwords$ python3 passwords.py Traceback (most recent call last):

Re: [Tutor] File reading-(encoding problems)

2015-12-23 Thread Ben Finney
Ratheesh kumar writes: > Here is my code..try: > data=open('info.txt') […] Please be sure to present the code as distinct lines. You have posted it as plain text (good), the indentation is preserved (good). The problem here is that your commentary is mingled with the