Remove unicode path fixes for now to better test original problems

This commit is contained in:
blitzman
2017-02-19 00:59:10 -05:00
parent c3144088ca
commit b583589849
6 changed files with 31 additions and 24 deletions

View File

@@ -20,7 +20,6 @@
import cStringIO
import os.path
import zipfile
from config import parsePath
# noinspection PyPackageRequirements
import wx
@@ -35,7 +34,7 @@ except ImportError:
class BitmapLoader(object):
try:
archive = zipfile.ZipFile(config.getPyfaPath('imgs.zip'), 'r')
archive = zipfile.ZipFile(os.path.join(config.pyfaPath, 'imgs.zip', 'r'))
except IOError:
archive = None
@@ -78,7 +77,7 @@ class BitmapLoader(object):
filename = "{0}.png".format(name)
if cls.archive:
path = parsePath(location, filename)
path = os.path.join(location, filename)
if os.sep != "/" and os.sep in path:
path = path.replace(os.sep, "/")
@@ -89,7 +88,7 @@ class BitmapLoader(object):
except KeyError:
print("Missing icon file from zip: {0}".format(path))
else:
path = config.getPyfaPath('imgs' + os.sep + location + os.sep + filename)
path = os.path.join(config.pyfaPath, 'imgs' + os.sep + location + os.sep + filename)
if os.path.exists(path):
return wx.Image(path)

View File

@@ -29,7 +29,6 @@ import gui.mainFrame
import gui.globalEvents as GE
from gui.graph import Graph
from gui.bitmapLoader import BitmapLoader
from config import parsePath
try:
import matplotlib as mpl
@@ -74,7 +73,7 @@ class GraphFrame(wx.Frame):
except:
cache_dir = os.path.expanduser(os.path.join("~", ".matplotlib"))
cache_file = parsePath(cache_dir, 'fontList.cache')
cache_file = path = os.path.join(cache_dir, 'fontList.cache')
if os.access(cache_dir, os.W_OK | os.X_OK) and os.path.isfile(cache_file):
# remove matplotlib font cache, see #234

View File

@@ -849,7 +849,7 @@ class ItemEffects(wx.Panel):
If effect file does not exist, create it
"""
file_ = config.getPyfaPath(os.path.join("eos", "effects", "%s.py" % event.GetText().lower()))
file_ = os.path.join(config.pyfaPath, "eos", "effects", "%s.py" % event.GetText().lower())
if not os.path.isfile(file_):
open(file_, 'a').close()