android - Sys.path.append("") Dosen't work on Debian.. :/ "no module named guess_language" -
just transferred python project ftp linux server , project can't import files what.. :/
sys.path.append("functions\guess_language") import check_language sys.path.append("functions\sl4a") import android
it's doesn't let me import module, in windows, work.. why? i'm using python 2.7 btw.
thanks.
backslashes escape characters in strings.
so have few choices deal in example...
use raw strings:
sys.path.append(r"functions\guess_language")
escape backslash backslash:
sys.path.append("functions\\guess_language")
use forward slashes:
sys.path.append("functions/guess_language")
use os.path.join:
sys.path.append(os.path.join("functions", "guess_language"))
string formatting os.sep:
sys.path.append('functions%sguess_language' % os.sep)
Comments
Post a Comment