Re: [Tutor] subprocess module seems to be failing...

2016-06-03 Thread dirkjso...@gmail.com

Add sound of me beating my head with a bat! :)

Thanks Peter!
-I was a bit too precise in my naming conventions for later review!




On 06/03/2016 02:30 PM, Peter Otten wrote:

dirkjso...@gmail.com wrote:


Running Linux Mint 17.3
Python3.4.3

I'm following a Tutor concerning the subprocess module which said to
open a Terminal SHELL and type:

$ python3
  >>> import subprocess
  >>> subprocess.call('ls', shell=True)

Last night the subprocess.call portion was erroring saying their was no
'call' attribute. I tried asking
dir(subprocess) and call wasn't listed there. I figured I would try
again this morning, however, this
is what I was greeted with shortly after booting up and launching my
Terminal:

[justme@ispy] ~$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
  >>>
  >>> import subprocess
Traceback (most recent call last):
File "", line 1, in 
File "/home/justme/python_work/subprocess.py", line 39

Look carefully at the line above. You wrote a script and called it
subprocess.py. Bad idea ;)

Delete or rename your subprocess.py, and the one in the standard library
will become visible again and work as smoothly as ever.


  ^
SyntaxError: EOF while scanning triple-quoted string literal
  >>>

Seems like the module is deteriorating or something, as yesterday it
accepted the import command
to include it!  :)

I found a subprocess.py in /usr/lib/python3.4 and grabbed it with gedit
and looked at it line by line. It has tripple double quotes but also
single double quotes throughout it in places, but they all seemed to
have a companion quote to offset them...and the entire text area is one
solid color which would seem to indicate
it is being ignored by python...

What should I do now?

Thanks!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Desperately need help to uninstall python from my mac

2016-06-03 Thread Ries Rommens

Hello Christian,

You don't have to uninstall python before upgrading Tcl/Tk.

Steps to follow:

Close Idle, if activated.

Browse to

http://www.activestate.com/activetcl/downloads

and find your Mac Disk Image (DMG), it's about halfway the webpage.
I have used version 8.5.18.0.
Download and install the DMG in the Apple way. (Right click on the icon, 
and click [Open], instead of doubleclick).

Activate Idle after installing Tcl/Tk, and the warning has gone.

Hope it helps,

Ries


Op 3-6-2016 om 18:18 schreef Christian Carbone via Tutor:

Hello,
As the subject line indicates, I really need help uninstalling python on my 
mac..
Uninstalling python from a mac seems to be an absurdly overlooked topic. The 
one resource i have found addressing the issue, a stack overflow thread, 
doesn't give me the amount of direction i need to successfully uninstall.

The reason i (think i) need to uninstall python is that when i open IDLE i get this 
warning: "WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.Visit 
http://www.python.org/download/mac/tcltk/ for current information.".

I've heard i need to install a system appropriate tcl/tk (which i believe i 
have done) before reinstalling python, but seeing as i cannot uninstall python 
I do not see any way to resolve this issue. Python.org doesn't seem to have any 
information that addresses this problem, so I have come here in hopes of some 
guidance.

Thanks,-Christian
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] subprocess module seems to be failing...

2016-06-03 Thread Peter Otten
dirkjso...@gmail.com wrote:

> Running Linux Mint 17.3
> Python3.4.3
> 
> I'm following a Tutor concerning the subprocess module which said to
> open a Terminal SHELL and type:
> 
> $ python3
>  >>> import subprocess
>  >>> subprocess.call('ls', shell=True)
> 
> Last night the subprocess.call portion was erroring saying their was no
> 'call' attribute. I tried asking
> dir(subprocess) and call wasn't listed there. I figured I would try
> again this morning, however, this
> is what I was greeted with shortly after booting up and launching my
> Terminal:
> 
> [justme@ispy] ~$ python3
> Python 3.4.3 (default, Oct 14 2015, 20:28:29)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>  >>>
>  >>> import subprocess
> Traceback (most recent call last):
>File "", line 1, in 
>File "/home/justme/python_work/subprocess.py", line 39

Look carefully at the line above. You wrote a script and called it 
subprocess.py. Bad idea ;)

Delete or rename your subprocess.py, and the one in the standard library 
will become visible again and work as smoothly as ever.

> 
>  ^
> SyntaxError: EOF while scanning triple-quoted string literal
>  >>>
> 
> Seems like the module is deteriorating or something, as yesterday it
> accepted the import command
> to include it!  :)
> 
> I found a subprocess.py in /usr/lib/python3.4 and grabbed it with gedit
> and looked at it line by line. It has tripple double quotes but also
> single double quotes throughout it in places, but they all seemed to
> have a companion quote to offset them...and the entire text area is one
> solid color which would seem to indicate
> it is being ignored by python...
> 
> What should I do now?
> 
> Thanks!
> 
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] subprocess module seems to be failing...

2016-06-03 Thread dirkjso...@gmail.com

Running Linux Mint 17.3
Python3.4.3

I'm following a Tutor concerning the subprocess module which said to 
open a Terminal SHELL and type:


$ python3
>>> import subprocess
>>> subprocess.call('ls', shell=True)

Last night the subprocess.call portion was erroring saying their was no 
'call' attribute. I tried asking
dir(subprocess) and call wasn't listed there. I figured I would try 
again this morning, however, this
is what I was greeted with shortly after booting up and launching my 
Terminal:


[justme@ispy] ~$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import subprocess
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/justme/python_work/subprocess.py", line 39

^
SyntaxError: EOF while scanning triple-quoted string literal
>>>

Seems like the module is deteriorating or something, as yesterday it 
accepted the import command

to include it!  :)

I found a subprocess.py in /usr/lib/python3.4 and grabbed it with gedit 
and looked at it line by line. It has tripple double quotes but also 
single double quotes throughout it in places, but they all seemed to 
have a companion quote to offset them...and the entire text area is one 
solid color which would seem to indicate

it is being ignored by python...

What should I do now?

Thanks!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Desperately need help to uninstall python from my mac

2016-06-03 Thread Alan Gauld via Tutor
On 03/06/16 17:18, Christian Carbone via Tutor wrote:

> As the subject line indicates, I really need help uninstalling python on my 
> mac..

You almost certainly don;t want to to do that! Your Mac will stop
working properly, it uses Python. That's why its installed by
default on Macs.

> The reason i (think i) need to uninstall python is that when i open 
> IDLE i get this warning:
> "WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.

OK, So you have IDLE which is not ion a Mac by default so maybe you
installed an extra version of Python and you want to uninstall that?
Thats a very different thing that uninstalling Python entirely.

But the warning only says the version of Tcl/Tk *may* be unstable.
Does IDLE in fact work? If it doesn't can you replace the Tcl/Tk
libraries rather than Python?

> Visit http://www.python.org/download/mac/tcltk/ for current information.". 

Did you read that page?
Did you do what it suggested and install an ActiveState version
of Tcl/Tk for MAC?

Which versions of MacOS and Python are you using?

> I've heard i need to install a system appropriate tcl/tk (which i 
> believe i have done) before reinstalling python,

What makes you believe it? Which version did you install?
Where did you get it?

> but seeing as i cannot uninstall python I do not see any way 
> to resolve this issue.

Once we understand which version of Python you installed we
can start to consider whether/how you need to uninstall it.
What you should not do is try to uninstall the system version
of Python used by MacOS.

> Python.org doesn't seem to have any information that addresses 
> this problem, so I have come here in hopes of some guidance.

Did you read this page:

https://docs.python.org/3/using/mac.html

It doesn't explicitly tell you how to uninstall it, but it
does tell you what is installed, and where...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Desperately need help to uninstall python from my mac

2016-06-03 Thread Christian Carbone via Tutor
Hello,
As the subject line indicates, I really need help uninstalling python on my 
mac..
Uninstalling python from a mac seems to be an absurdly overlooked topic. The 
one resource i have found addressing the issue, a stack overflow thread, 
doesn't give me the amount of direction i need to successfully uninstall.

The reason i (think i) need to uninstall python is that when i open IDLE i get 
this warning: "WARNING: The version of Tcl/Tk (8.5.9) in use may be 
unstable.Visit http://www.python.org/download/mac/tcltk/ for current 
information.". 

I've heard i need to install a system appropriate tcl/tk (which i believe i 
have done) before reinstalling python, but seeing as i cannot uninstall python 
I do not see any way to resolve this issue. Python.org doesn't seem to have any 
information that addresses this problem, so I have come here in hopes of some 
guidance. 

Thanks,-Christian
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Practice Exercises for Beginner ?

2016-06-03 Thread Andrei Colta
hi guys,

Thanks all for input, if anything else.. please let me know.

cheers,
Andrei
> On 03 Jun 2016, at 11:14, Alan Gauld via Tutor  wrote:
> 
> On 02/06/16 21:43, Andrei Colta wrote:
>> Hi,
>> 
>> Anyone can recommend practical work on learning python.. seems reading and 
>> reading does not helping.
> 
> Other have recommended starting a project and that's always the best way.
> 
> But if you are really stuck for ideas try the Python Challenge.
> It's a game where you solve puzzles by writing Python code and
> each solution gives you the url for the next puzzle. It's a great
> way to learn about the standard library.
> 
> http://www.pythonchallenge.com/
> 
> -- 
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
> 
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Practice Exercises for Beginner ? :p:

2016-06-03 Thread Thomas C. Hicks

On Jun 2, 2016, at 16:43, Andrei Colta  wrote:

Hi,

Anyone can recommend practical work on learning python.. seems reading and 
reading does not helping.

Thanks in advance,
Andrei

I would echo those saying "make something" - for me the thing that 
really moved me forward was doing a data project, make the sqlite 
database, manipulate it, make a Flask site to access it, etc.  Lots of 
resources on the web to guide you to do such things.


Alternatively try some of the many coding challenge sites.  My daughter 
is currently loving CodeAbbey.  A trick to CodeAbbey - there are lots of 
tools in Python that make the challenges vanishingly easy (at least the 
early ones) but you will likely learn more if you force yourself to 
write those programs without Python's "batteries included" tools.


SDG,

tom
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Practice Exercises for Beginner ?

2016-06-03 Thread Alan Gauld via Tutor
On 02/06/16 21:43, Andrei Colta wrote:
> Hi,
> 
> Anyone can recommend practical work on learning python.. seems reading and 
> reading does not helping.

Other have recommended starting a project and that's always the best way.

But if you are really stuck for ideas try the Python Challenge.
It's a game where you solve puzzles by writing Python code and
each solution gives you the url for the next puzzle. It's a great
way to learn about the standard library.

http://www.pythonchallenge.com/

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Practice Exercises for Beginner ?

2016-06-03 Thread Alex Hall
Make something. :) I know it's pretty open-ended, but just think of an 
application you want to make, and try to make it in Python. Stick to command 
line at first, but then try WX or another GUI library. The more times you get 
stuck, the more you learn and the more you'll know for next time. Make 
Battleship, make a website in Flask or Django, make a unit converter, make 
chess, make an audio player... Find a functionality you know, and try to make 
Python do that function. That's really the best advice I've ever gotten for 
learning any new language.
> On Jun 2, 2016, at 16:43, Andrei Colta  wrote:
> 
> Hi,
> 
> Anyone can recommend practical work on learning python.. seems reading and 
> reading does not helping.
> 
> Thanks in advance,
> Andrei
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor