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...

  1. use raw strings:

    sys.path.append(r"functions\guess_language")

  2. escape backslash backslash:

    sys.path.append("functions\\guess_language")

  3. use forward slashes:

    sys.path.append("functions/guess_language")

  4. use os.path.join:

    sys.path.append(os.path.join("functions", "guess_language"))

  5. string formatting os.sep:

    sys.path.append('functions%sguess_language' % os.sep)


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -