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


Groups > comp.lang.python > #94919

Re: I'm a newbie and I'm still stumped...

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <SRS0=X1uRRq=IK=goldwinde.com=Dwight@eigbox.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'python3': 0.05; 'sys': 0.05; 'editor.': 0.09; 'inserted': 0.09; 'nameerror:': 0.09; 'persists.': 0.09; 'subject:still': 0.09; 'python': 0.10; '"test': 0.16; "'))": 0.16; '12:30': 0.16; '6.0': 0.16; '>on': 0.16; 'received:yourhostingaccount.com': 0.16; 'skip:> 20': 0.16; 'wrote:': 0.16; 'python?': 0.18; '>>>': 0.20; '"",': 0.22; '(all': 0.22; 'sep': 0.22; 'am,': 0.23; 'defined': 0.23; 'import': 0.24; '(most': 0.24; 'downloaded': 0.24; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'linux': 0.26; 'van': 0.26; 'compatible': 0.27; 'figure': 0.27; 'error': 0.27; 'skip:# 10': 0.27; "skip:' 10": 0.28; '(it': 0.29; 'always,': 0.29; 'code:': 0.29; 'print': 0.30; 'books': 0.30; 'url:mailman': 0.30; 'code': 0.30; 'folder': 0.30; 'error.': 0.31; 'maybe': 0.33; 'url:python': 0.33; '8bit%:25': 0.33; 'traceback': 0.33; 'url:listinfo': 0.34; 'file': 0.34; 'running': 0.34; 'gives': 0.35; 'python.org': 0.35; 'could': 0.35; 'but': 0.36; 'url:org': 0.36; 'apple': 0.36; 'received:10.20': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'mac': 0.37; 'received:66': 0.38; 'version': 0.38; 'thank': 0.38; 'mean': 0.38; 'why': 0.39; 'test': 0.39; 'sure': 0.39; 'does': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'your': 0.60; 'more': 0.63; 'mar': 0.65; 'here': 0.66; 'results': 0.66; "'test'": 0.84; '3.4': 0.84; '4.2.1': 0.84; 'mac.': 0.84; 'skip:\xc5 10': 0.84; '2014,': 0.91; 'joel': 0.91; 'received:112': 0.93
X-Authority-Analysis v=2.1 cv=Q9Rc4uGa c=1 sm=1 tr=0 a=eBvjjtMVdWwtQGedh7GyLg==:117 a=udqrBR1D2HMiW0oUly8BNg==:17 a=pq4jwCggAAAA:8 a=QPcu4mC3AAAA:8 a=8_iErv3XAAAA:8 a=1E9jo8_qk6kA:10 a=wpL1jeqTJocA:10 a=IkcTkHD0fZMA:10 a=uRRa74qj2VoA:10 a=8AHkEIZyAAAA:8 a=IHpK4gAxAAAA:8 a=ZrXuoSZqAAAA:8 a=gtA3M2siIJLY0rst6-UA:9 a=QEXdDO2ut3YA:10
User-Agent Microsoft-MacOutlook/14.4.7.141117
Date Mon, 03 Aug 2015 14:57:05 +0800
Subject Re: I'm a newbie and I'm still stumped...
From Dwight GoldWinde <Dwight@GoldWinde.com>
To Python Python <python-list@python.org>
Thread-Topic I'm a newbie and I'm still stumped...
References <D1E0EED9.10BBA2%Dwight@GoldWinde.com>
In-Reply-To <mpis6l$b9f$1@ger.gmane.org>
Mime-version 1.0
Content-type text/plain; charset="UTF-8"
Content-transfer-encoding quoted-printable
X-EN-UserInfo 6c5a25a10f5591a3de9585e9195aba16:931c98230c6409dcc37fa7e93b490c27
X-EN-AuthUser dwight@goldwinde.com
Sender Dwight GoldWinde <Dwight@GoldWinde.com>
X-EN-OrigIP 112.112.46.139
X-EN-OrigHost unknown
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.1171.1438585158.3674.python-list@python.org> (permalink)
Lines 121
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1438585158 news.xs4all.nl 2959 [2001:888:2000:d::a6]:41322
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94919

Show key headers only | View raw


Thank you, Emile, Paul, Terry, and Joel for your suggestions! And the
error persists.

Maybe my error is coming from running the old version (2.7.6) of Python,
but I can’t figure out why that would be happening???

I downloaded 3.4.3 again from the Python.org website for my Mac.
I inserted the "import sys" and did “print (sys.version)” into the code.

So here what the code is:

#!/usr/bin/env python3
import sys
print (sys.version)
word = input('Enter a word ')


Here are the results I got below, showing the same error. The first line
says, 
"2.7.6 (default, Sep 9 2014, 15:04:36)”. Does that mean I am running the
old Python? How could that be since I am SURE I downloaded 3.4.3 (it even
gives the folder name as “Python 3.4” in the Applications folder on my Mac.

2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
Enter a word serendipity
Traceback (most recent call last):
  File "test short.py", line 4, in <module>
    word = input('Enter a word ')
  File "<string>", line 1, in <module>
NameError: name 'serendipity' is not defined




Please help…

BIG SMILE...

Always, Dwight


www.3forliving.key.to (video playlist on YouTube)
www.couragebooks.key.to (all my books on Amazon)






#!/usr/bin/env python3
import sys
print (sys.version)
word = input('Enter a word ')


2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
Enter a word serendipity
Traceback (most recent call last):
  File "test short.py", line 3, in <module>
    word = input('Enter a word ')
  File "<string>", line 1, in <module>
NameError: name 'serendipity' is not defined





On 8/2/15, 12:30 AM, "Emile van Sebille" <emile@fenx.com> wrote:

>On 7/30/2015 6:22 PM, Dwight GoldWinde wrote:
>> I am running Python 3.4 on my Mac mini, OS X 10.10.2, using Coderunner
>>2 as
>> my editor.
>>
>> Here¹s the code:
>> #!/usr/bin/env python3
>> word = (input('Enter a word Œ))
>>
>> When running this inside of Coderunner, I get the follow error, after
>> entering the word Œserendipity¹:
>>
>> Enter a word serendipity
>> Traceback (most recent call last):
>>    File "test short.py", line 2, in <module>
>>      word = (input('Enter a word '))
>>    File "<string>", line 1, in <module>
>> NameError: name 'serendipity' is not defined
>
>I'd look at which python is actually running (sys.version):
>
>Python 3.4.0 (default, Apr 11 2014, 13:05:11)
>[GCC 4.8.2] on linux
>Type "help", "copyright", "credits" or "license" for more information.
> >>> word = (input('enter a word '))
>enter a word test
> >>>
>emile@emile-OptiPlex-9010:~$ python
>Python 2.7.6 (default, Mar 22 2014, 22:59:56)
>[GCC 4.8.2] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
> >>> word = (input('enter a word '))
>enter a word test
>Traceback (most recent call last):
>
>
>Emile
>   File "<stdin>", line 1, in <module>
>   File "<string>", line 1, in <module>
>NameError: name 'test' is not defined
> >>>
>
>
>
>-- 
>https://mail.python.org/mailman/listinfo/python-list

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


Thread

Re: I'm a newbie and I'm still stumped... Dwight GoldWinde <Dwight@GoldWinde.com> - 2015-08-03 14:57 +0800
  Re: I'm a newbie and I'm still stumped... Paul Rubin <no.email@nospam.invalid> - 2015-08-03 00:14 -0700
    FW: I'm a newbie and I'm still stumped... Dwight Hotmail <GoldWinde@hotmail.com> - 2015-08-03 16:19 +0800
  Re: I'm a newbie and I'm still stumped... Dave Farrance <df@see.replyto.invalid> - 2015-08-03 09:27 +0100
    Re: I'm a newbie and I'm still stumped... Dwight GoldWinde <Dwight@GoldWinde.com> - 2015-08-03 16:56 +0800
      Re: I'm a newbie and I'm still stumped... Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-08-03 12:49 +0300

csiph-web