http://code.google.com/p/labyrinth/source/detail?r=352
Modified:
/trunk/ChangeLog
/trunk/src/MainWindow.py
/trunk/src/utils.py
=======================================
--- /trunk/ChangeLog Sun Mar 8 05:03:11 2009
+++ /trunk/ChangeLog Sat Apr 23 07:14:18 2011
@@ -1,3 +1,9 @@
+2009-03-08 Matthias Vogelgesang <matthias.v...@gmail.com>
+
+ * src/MainWindow.py
+ * src/utils.py
+ Replace deprecated libs
+
2009-03-08 Matthias Vogelgesang <matthias.v...@gmail.com>
* data/labyrinth.glade
@@ -5,7 +11,7 @@
2009-02-28 Martin Schaaf <mas...@ma-scha.de>
- * src/MMapArea.py
+ * src/MMapArea.py
Used wrong variable name use height instead of heigth0. Thanks to
Kunshan Wang for the pointer.
=======================================
--- /trunk/src/MainWindow.py Sun Aug 10 13:05:18 2008
+++ /trunk/src/MainWindow.py Sat Apr 23 07:14:18 2011
@@ -21,7 +21,7 @@
import gtk
import cairo, pangocairo
-import sha
+import hashlib
import os
import tarfile
import gobject
@@ -559,14 +559,14 @@
def doc_save_cb (self, widget, doc, top_element):
save_string = self.serialize_to_xml(doc, top_element)
if not self.save_file:
- sham = sha.new (save_string)
+ hsh = hashlib.sha256 (save_string)
save_loc = utils.get_save_dir ()
- self.save_file = save_loc+sham.hexdigest()+".map"
+ self.save_file = save_loc+hsh.hexdigest()+".map"
counter = 1
while os.path.exists(self.save_file):
print "Warning: Duplicate File. Saving to alternative"
- self.save_file = save_loc + "Dup"+str(counter)+sham.hexdigest()+".map"
+ self.save_file = save_loc + "Dup"+str(counter)+hsh.hexdigest()+".map"
counter += 1
self.save_map(self.save_file, save_string)
=======================================
--- /trunk/src/utils.py Mon Jul 21 10:44:44 2008
+++ /trunk/src/utils.py Sat Apr 23 07:14:18 2011
@@ -26,7 +26,7 @@
import sys
from os.path import *
import os
-from Numeric import *
+from numpy import *
import gtk
__BE_VERBOSE=os.environ.get('DEBUG_LABYRINTH',0)