On 01/11/2015 02:13 PM, Jenacee Owens wrote:
I'm new to python and every time i type a command into the MS-DOS Commands it
looks like this.
strings
Traceback<most recent call last:
file "<stdin>";line 1 in <module>
name error:name strings'is not defined
how can i fix this?
What where you trying to accomplish, and what did you expect that to
do? It's not a valid Python statement, so an error message that says as
much is to be expected.
You really should start with a Python tutorial.
More comments:
* You did not type that "into the MS-DOS Commands", but rather to
Python (or more accurately, to the Python interpreter).
* Python does not have "commands", but rather "statements".
* There is a module named strings, and you could import it (to use
Python's terminology) with the "import strings" statement, but
there's probably not much need to do so. But then the "strings"
statement you typed would not produce an error message, but would
just print out a line informing you that strings is a module -- not
very useful.
* Rather than using Python in an MS-DOS window, you should consider
trying statements and programs in Idle -- A reasonable GUI
environment to experiment with Python. It came with your
installation of Python.
* In the future, questions should be accompanied with information
about your version of Python (Python2 or Python3) and the platform
you are running it on. (Apparently Windows in your case.)
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list