@@ -15,7 +15,7 @@ def NormalizePaths():
1515 #replace '/' to '\\'
1616 for i in range (len (sys .path )):
1717 currentPath = sys .path [i ]
18- sys .path [i ] = currentPath .replace ('/ ' ,'\\ ' )
18+ sys .path [i ] = currentPath .replace ('\\ ' ,'/ ' )
1919
2020 #find additional problem paths such as engine bin
2121 currentPath = sys .path [i ]
@@ -30,32 +30,32 @@ def NormalizePaths():
3030#define some convenience paths
3131def PythonHomePath ():
3232 for path in sys .path :
33- normalizedPath = path . replace ( '/' , ' \\ ' )
33+ normalizedPath = AsAbsPath ( path )
3434 if ('UnrealEnginePython' in normalizedPath and
35- normalizedPath .endswith ('Binaries\\ Win64' )):
35+ normalizedPath .endswith ('Binaries/ Win64' )):
3636 return path
3737
3838 #return sys.path[1]
3939 return "not found"
4040
4141def PythonHomeScriptsPath ():
42- return PythonHomePath () + "/Scripts"
42+ return AsAbsPath ( PythonHomePath () + "/Scripts" )
4343
4444def PythonPluginScriptPath ():
4545 for path in sys .path :
46- normalizedPath = path . replace ( '/' , ' \\ ' )
46+ normalizedPath = AsAbsPath ( path )
4747 if ('UnrealEnginePython' in normalizedPath and
48- normalizedPath .endswith ('Content\\ Scripts' )):
48+ normalizedPath .endswith ('Content/ Scripts' )):
4949 return path
5050
5151 return "not found"
5252
5353def PythonProjectScriptPath ():
5454 relativePath = PythonPluginScriptPath () + "/../../../../Content/Scripts" ;
55- return os . path . abspath (relativePath );
55+ return AsAbsPath (relativePath );
5656
5757def AsAbsPath (path ):
58- return os .path .abspath (path )
58+ return os .path .abspath (path ). replace ( ' \\ ' , '/' )
5959
6060_PythonHomePath = PythonHomePath ()
6161
0 commit comments