aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui/utils/fileio.py
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-10-02 16:44:03 +0200
committerficus <ficus@robocracy.org>2012-10-02 16:44:03 +0200
commitfcf6a8630b7ae818e7719d6e811d01d9359388c3 (patch)
tree81610e80263e0f326f300b1bc7ea4264df9f29ab /packages/torouter-web/src/tui/utils/fileio.py
parent7dcf9aa0db8585eb3489bcf0903e67bdd9dee027 (diff)
downloadtorouter-fcf6a8630b7ae818e7719d6e811d01d9359388c3.zip
torouter-fcf6a8630b7ae818e7719d6e811d01d9359388c3.tar.gz
remove unused told TUI
Diffstat (limited to 'packages/torouter-web/src/tui/utils/fileio.py')
-rw-r--r--packages/torouter-web/src/tui/utils/fileio.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/packages/torouter-web/src/tui/utils/fileio.py b/packages/torouter-web/src/tui/utils/fileio.py
deleted file mode 100644
index c6574b7..0000000
--- a/packages/torouter-web/src/tui/utils/fileio.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import os
-
-def write(files):
- tmp_dir = "/var/tmp/tor-tui/"
- tmpfiles = []
- for file in files:
- if not os.path.exists(tmp_dir):
- os.mkdir(tmp_dir)
- tmpfile = tmp_dir + file[0].split("/")[-1:][0]
- tmpfiles.append((tmpfile,file[0]))
- # open the tmp file for write
- f = open(tmpfile, 'w')
- # write the data (file[1]) to the temp file
- f.write(file[1])
- f.close()
-
- # rename all the file. This operation is atomic
- #for file in tmpfiles:
- # os.rename(file[0], file[1])
-
-# for testing
-#files = [('/tmp/file1','blablbal'),('/tmp/file2','The content'),('/tmp/file3','The content 3')]
-#write(files)
-