View Single Post
  #3  
Old 06-08-2017, 04:25 AM
xptomoar xptomoar is offline
Registered User
 
Join Date: May 2017
Posts: 1
Hi!

I am having a similar problem. I have a folder with a game folders and also another folder which is imported by every game script. The situation is described below:

Main Folder
|-Game1
| |-Script1.py
|-Game2
| |-Script2.py
|-GameX
| |-Script3.py
|-CommonFolder
|-CommonFile.py

In every Script.py I write the following code to import the CommonFile:

sys.path.append("../")
from CommonFolder.CommonFile import *


When I publish as EXE, the files from the CommonFolder move to the temporary directory of the game and then it becomes impossible to perform the import as the files are in the same directory than the game and not in the CommonFolder as supposed.

Any hint how to solve this?
Reply With Quote