import Myro import os import System data = {"name": "Test", "system_name": "test", "mime_type": "text/x-test", "extension": "test", "comment": "##"} data = Myro.ask(data, "New Language Details") if data is None: raise Exception("Language Creation Aborted") def mkdirs(path): # missing in IronPython os? parts = os.path.split(path) root = "" for part in parts: root = os.path.join(root, part) if not os.path.exists(root): os.mkdir(root) data_dir = os.path.join(calico.path, "..", "data") if (Myro.askQuestion("Where do you want to put your language?", ["Calico Global Languages", "My Local Languages"]) == "Calico Global Languages"): dest_dir = os.path.join(calico.path, "..", "languages") else: dest_dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData) dest_dir = os.path.join(dest_dir, "calico", "languages")
def readit(self, what): # FIXME: can't call from the clib? # Same problem when trying to exit and ask to save? import Myro return Myro.ask(what)