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

DirkJSoren@gmail.com dirkjsoren at gmail.com
Fri Jun 3 16:01:04 EDT 2016


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 at 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 "<stdin>", line 1, in <module>
   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!




More information about the Tutor mailing list