Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83567 > unrolled thread
| Started by | Jenacee Owens <jenaceerowens@gmail.com> |
|---|---|
| First post | 2015-01-11 14:13 -0800 |
| Last post | 2015-01-11 23:57 +0000 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
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
| From | Jenacee Owens <jenaceerowens@gmail.com> |
|---|---|
| Date | 2015-01-11 14:13 -0800 |
| Subject | MS-DOS Commands |
| Message-ID | <9c3445d2-8ce6-491a-b240-5c71f91d3fc1@googlegroups.com> |
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?
[toc] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-01-11 15:32 -0700 |
| Message-ID | <mailman.17596.1421015573.18130.python-list@python.org> |
| In reply to | #83567 |
On Sun, Jan 11, 2015 at 3:13 PM, Jenacee Owens <jenaceerowens@gmail.com> 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 That error is from the Python interpreter, not MS-DOS (by which I assume you mean the Windows command prompt; nobody seriously uses MS-DOS any more). > how can i fix this? That depends on what it is you're trying to do. If you're actually trying to run some program called 'strings' from the command prompt then you'll need to exit the Python interpreter first (or open a second command prompt window).
[toc] | [prev] | [next] | [standalone]
| From | Gary Herron <gary.herron@islandtraining.com> |
|---|---|
| Date | 2015-01-11 14:33 -0800 |
| Message-ID | <mailman.17597.1421016138.18130.python-list@python.org> |
| In reply to | #83567 |
[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
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2015-01-11 17:50 -0500 |
| Message-ID | <mailman.17598.1421016648.18130.python-list@python.org> |
| In reply to | #83567 |
On Sun, Jan 11, 2015 at 5:13 PM, Jenacee Owens <jenaceerowens@gmail.com> 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? Nothing to do with DOS, there is no strings Try this: >>>my_string = "hi there" >>>print my_string > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-01-11 23:57 +0000 |
| Message-ID | <mailman.17601.1421020637.18130.python-list@python.org> |
| In reply to | #83567 |
On 11/01/2015 22:13, 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? > Others have already commented, so I'll just ask would you be more comfortable on the tutor mailing list https://mail.python.org/mailman/listinfo/tutor ? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web