[BCAB] Python in command line Roger Woolgrove 23 Oct 2016 13:16 BST
Re: [BCAB] Python in command line Sean Randall 23 Oct 2016 16:43 BST

[BCAB] Python in command line Roger Woolgrove 23 Oct 2016 13:16 BST


Apologies for any cross posting where people might see this twice. I'm
new to Python and having an issue.
I've made a java program which runs the python script and then gives me
the output as the python software I'm supposed to use for my university
module is inaccessible.
Anyway the java software was working and I think I'm messing up the
python bit of the exercises.
So I have tried to test using the command line.

the py file is saved as hello.py
it contains on line 1 the following and is written in Notepad++ with no
bolt on software.
print("hello world!")
print('hello world!')

print hello world!
print 'hello world!'
print "hello world!"

I've tried the same on line 2 leaving line 1 blank.
To run the code I have typed the following:

and separately I have tried

Each was followed after a return by
C:\Users\Roger Woolgrove\Documents\hello.py

I have received File "<stdin>", line 1
after one of these variations but cannot recall which.
Other than that I cannot get the command line to output
hello world!

So can anyone help? I have no other software open at the time other than
Windows 7 Pro, Jaws 15 Pro

Cheers much