path - Sublime Text 2 and Repl - Run python -
i start using sublime text 2 , repl , got problems. when run file tells me file du not exist. script works perfect if build directly terminal.
code
def stopwords(text): open('danish', 'ru') f: line in f: text = text.replace(' '+line.strip()+' ', "") return text log
ioerror: [errno 2] no such file or directory: 'danish' i have tried things os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) reload(sys) , __file__ not work.
any ideas why __file__ don't work when running through sublime text 2 repl or file stored??
Comments
Post a Comment