rhoskal / crispy-fortnight

Custom Python 2.7 RAT
MIT License
11 stars 9 forks source link

Path Issues (Can't find modules) #3

Closed IIDreII closed 8 years ago

IIDreII commented 8 years ago

I'll put the fix later, but if you try running it from the command line from Windows (haven't test it in another OS), you'll get an error saying can't find module.

It's dependent on how the env variable for python are set for the machine. Easy fix is appending the absolute file path to the folder above your current script to the the env variables with the following.

sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)),'..'))

This is a none issue if they have an env path for python that covers the entire drive that file is on. But I don't know why someone would do that or if it's common practice.

Hopefully, someone with more python experience can explain it better.

IIDreII commented 8 years ago

Fixed it.