On Fri, Jan 31, 2014 at 1:03 AM, loial <jldunn2...@gmail.com> wrote:
> In this case the import fails.
>
> import sys
> import os
> from os.path import *

Not sure why you need that, since you're explicitly naming
"os.path.dirname". The base "import os" shoul cover that for you.

> scriptpath=os.path.dirname(sys.argv[0])
> otherscriptspath=printerpath.replace("scripts","otherscripts")
> sys.path.append(otherscriptspath)

Try adding here:

print(sys.argv[0])
print(otherscriptspath)

See what they tell you. Is sys.argv[0] what you think it is? Is the
resulting path what you expect?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to