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


Groups > comp.lang.python > #83570

Re: MS-DOS Commands

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <gary.herron@islandtraining.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'expected.': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'statements': 0.09; 'typed': 0.09; 'python': 0.11; 'gui': 0.12; 'windows': 0.15; 'comments:': 0.16; 'informing': 0.16; 'so.': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'module': 0.19; 'trying': 0.19; "python's": 0.19; 'command': 0.22; 'import': 0.22; 'print': 0.22; 'installation': 0.23; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'received:emailsrvr.com': 0.24; 'looks': 0.24; '(or': 0.24; 'environment': 0.24; 'received:(smtp server)': 0.26; 'defined': 0.27; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'statement': 0.30; "i'm": 0.30; '>>>>': 0.31; 'gary': 0.31; 'file': 0.32; 'this.': 0.32; 'probably': 0.32; 'says': 0.33; 'running': 0.33; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'idle': 0.36; 'should': 0.36; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'recent': 0.39; 'expect': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'commands': 0.60; 'new': 0.61; 'information': 0.63; 'name': 0.63; 'more': 0.64; 'charset:windows-1252': 0.65; 'statement,': 0.68; 'useful.': 0.68; 'future,': 0.83; '(apparently': 0.84; 'experiment': 0.84
X-Virus-Scanned OK
X-Sender-Id gary.herron@islandtraining.com
Date Sun, 11 Jan 2015 14:33:45 -0800
From Gary Herron <gary.herron@islandtraining.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version 1.0
To python-list@python.org
Subject Re: MS-DOS Commands
References <9c3445d2-8ce6-491a-b240-5c71f91d3fc1@googlegroups.com>
In-Reply-To <9c3445d2-8ce6-491a-b240-5c71f91d3fc1@googlegroups.com>
Content-Type multipart/alternative; boundary="------------010707060702080303030709"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.17597.1421016138.18130.python-list@python.org> (permalink)
Lines 120
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1421016138 news.xs4all.nl 2905 [2001:888:2000:d::a6]:37945
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:83570

Show key headers only | 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