예제 #1
0
def get_xnote_version():
    try:
        return xutils.readfile("version.txt")
    except:
        return ""
예제 #2
0
 def test_save_file(self):
     tmpfile = os.path.join(xconfig.DATA_DIR, "tmp.txt")
     xutils.savetofile(tmpfile, "test")
     content = xutils.readfile(tmpfile)
     self.assertEqual("test", content)
     xutils.remove(tmpfile, True)