[pypy-svn] r34477 - pypy/dist/pypy/translator/tool/pygame

cfbolz at codespeak.net cfbolz at codespeak.net
Fri Nov 10 23:39:03 CET 2006


Author: cfbolz
Date: Fri Nov 10 23:39:01 2006
New Revision: 34477

Modified:
   pypy/dist/pypy/translator/tool/pygame/graphclient.py
Log:
try to check whether the graph is an undirected graph and use neato in that
case.


Modified: pypy/dist/pypy/translator/tool/pygame/graphclient.py
==============================================================================
--- pypy/dist/pypy/translator/tool/pygame/graphclient.py	(original)
+++ pypy/dist/pypy/translator/tool/pygame/graphclient.py	Fri Nov 10 23:39:01 2006
@@ -23,8 +23,12 @@
         plainfile = py.path.local(plainfile) 
         plainfile.write(py.path.local(dotfile).read())
     elif not use_codespeak:
-        py.process.cmdexec('dot -Tplain %s>%s' % (dotfile, plainfile))
-    elif 0: 
+        # try to see whether it is a directed graph or not:
+        if "digraph" in py.path.local(dotfile).read():
+            py.process.cmdexec('dot -Tplain %s>%s' % (dotfile, plainfile))
+        else:
+            py.process.cmdexec('neato -Tplain %s>%s' % (dotfile, plainfile))
+    elif 0:
         gw = py.execnet.SshGateway('codespeak.net')
         channel = gw.remote_exec("""
             import py



More information about the Pypy-commit mailing list