Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83570

Re: MS-DOS Commands

Date 2015-01-11 14:33 -0800
From Gary Herron <gary.herron@islandtraining.com>
Subject Re: MS-DOS Commands
References <9c3445d2-8ce6-491a-b240-5c71f91d3fc1@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.17597.1421016138.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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





Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

MS-DOS Commands Jenacee Owens <jenaceerowens@gmail.com> - 2015-01-11 14:13 -0800
  Re: MS-DOS Commands Ian Kelly <ian.g.kelly@gmail.com> - 2015-01-11 15:32 -0700
  Re: MS-DOS Commands Gary Herron <gary.herron@islandtraining.com> - 2015-01-11 14:33 -0800
  Re: MS-DOS Commands Joel Goldstick <joel.goldstick@gmail.com> - 2015-01-11 17:50 -0500
  Re: MS-DOS Commands Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-11 23:57 +0000

csiph-web