Skip to content

Commit

Permalink
APPDATA environment variable may not be defined; if it's not, then do…
Browse files Browse the repository at this point in the history
…n't die when importing nltk on windows.

svn/trunk@8480
  • Loading branch information
Edward Loper committed Jan 13, 2010
1 parent 90caf32 commit 1097c17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nltk/data.py
Expand Up @@ -77,7 +77,7 @@
r'C:\nltk_data', r'D:\nltk_data', r'E:\nltk_data',
os.path.join(sys.prefix, 'nltk_data'),
os.path.join(sys.prefix, 'lib', 'nltk_data'),
os.path.join(os.environ['APPDATA'], 'nltk_data')]
os.path.join(os.environ.get('APPDATA', 'C:\\'), 'nltk_data')]

# Common locations on UNIX & OS X:
else: path += [
Expand Down

0 comments on commit 1097c17

Please sign in to comment.