コード例 #1
0
def redirect_to_dump():
    path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
    try:
        dirname = os.path.dirname(path)
        if not os.path.exists(dirname):
            os.makedirs(dirname)

        buf = file(path, "a", 0)
    except IOError, err:
        return
コード例 #2
0
ファイル: Util.py プロジェクト: Oyatsumi/ulteo4Kode4kids
def redirect_to_dump():
	path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
	try:
		dirname = os.path.dirname(path)
		if not os.path.exists(dirname):
			os.makedirs(dirname)
		
		buf = file(path, "a", 0)
	except IOError, err:
		return
コード例 #3
0
def redirect_to_dump(purge = True):
	path = os.path.join(Platform.getUserSessionDir(), "dump.txt")
	try:
		dirname = os.path.dirname(path)
		if not os.path.exists(dirname):
			os.makedirs(dirname)
		
		if purge is True:
			mode = "w"
		else:
			mode = "a"
		
		buf = file(path, mode, 0)
	except IOError, err:
		return