from pygame import display from albow import request_new_filename, request_old_filename from albow.translate import _ from pymclevel import minecraftSaveFileDir, getMinecraftProfileDirectory, getSelectedProfile try: import gtk if gtk.pygtk_version < (2,3,90): raise ImportError hasGtk = True except ImportError: hasGtk = False #Using old method as fallback texturePacksDir = os.path.join(getMinecraftProfileDirectory(getSelectedProfile()), "texturepacks") #Compatibility layer for filters: filtersDir = directories.filtersDir schematicsDir = directories.schematicsDir def getTexturePacks(): try: return os.listdir(texturePacksDir) except: return [] # for k,v in os.environ.iteritems(): # try: # os.environ[k] = v.decode(sys.getfilesystemencoding()) # except:
from pymclevel import minecraftSaveFileDir, getMinecraftProfileDirectory, getSelectedProfile from datetime import datetime import re import subprocess try: import gtk if gtk.pygtk_version < (2, 3, 90): raise ImportError hasGtk = True except ImportError: hasGtk = False #Using old method as fallback texturePacksDir = os.path.join( getMinecraftProfileDirectory(getSelectedProfile()), "texturepacks") #Compatibility layer for filters: filtersDir = directories.filtersDir schematicsDir = directories.schematicsDir #!# Disabling platform specific file chooser: #!# Please, don't touch these two lines and the 'platChooser' stuff. -- D.C.-G. # platChooser = sys.platform in ('linux2', 'darwin') platChooser = sys.platform == 'darwin' def getTexturePacks(): try: return os.listdir(texturePacksDir) except: return []
from albow import request_new_filename, request_old_filename from albow.translate import _ from pymclevel import minecraftSaveFileDir, getMinecraftProfileDirectory, getSelectedProfile from datetime import datetime try: import gtk if gtk.pygtk_version < (2,3,90): raise ImportError hasGtk = True except ImportError: hasGtk = False #Using old method as fallback texturePacksDir = os.path.join(getMinecraftProfileDirectory(getSelectedProfile()), "texturepacks") #Compatibility layer for filters: filtersDir = directories.filtersDir schematicsDir = directories.schematicsDir #!# Disabling platform specific file chooser: #!# Please, don't touch these two lines and the 'platChooser' stuff. -- D.C.-G. #platChooser = sys.platform in ('linux2', 'darwin') platChooser = sys.platform == 'darwin' def getTexturePacks(): try: return os.listdir(texturePacksDir) except: return []