New submission from Dmitriy Gorbachev <dgorbac...@yahoo.com>:

I am learning Python by running exercises from "Programming Python", Mark Lutz 
on both Windows and Mac. While exercises run flawlessly on Windows, sometimes 
they do not run on Mac.
In particular, in Chapter 1, Step 2: Storing Records Persistently there is a 
script called make_db_file.py. The following function loadDbase (called by 
dump_db_file_test.py-see attached) is not working at all on Mac, but working 
fine of Windows. 
The code breaks on the line: key = input(). 
The Traceback message is as follows:
Traceback (most recent call last):
  File "dump_db_file_test.py", line 2, in <module>
    db = loadDbase()
  File "/Users/DMITRY/PythonScripts/make_db_file_test.py", line 22, in loadDbase
    key = input()
  File "<string>", line 1, in <module>
NameError: name 'bob' is not defined

Where 'bob' is the first line of the text file "people-file" that 
make_db_file_test.py refers.
All related files attached in BugReport.zip

Best regards

Dmitry

----------
assignee: ronaldoussoren
components: Macintosh
files: BugReport.zip
messages: 139697
nosy: dgorbachev, ronaldoussoren
priority: normal
severity: normal
status: open
title: input() not working correctly on Mac OS X
versions: Python 2.7
Added file: http://bugs.python.org/file22554/BugReport.zip

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12482>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to