timtadh / dot_tools Goto Github PK
View Code? Open in Web Editor NEWA library to parse and generate the graphviz dot langauge.
License: Other
A library to parse and generate the graphviz dot langauge.
License: Other
Hello,
The module works fine if I try it out on python-2.7 using pip install dot_tools
. I run ubuntu 18.4.
However it doesn't work with python3. Is there a fix for this?
I also tried out installing dot_tools using pip3, but running an example script still has import errors :
Traceback (most recent call last):
File "test.py", line 1, in
from dot_tools import parse
ImportError: cannot import name 'parse'
Any suggestions? Both pip list
and pip3 list
show that dot_tools installed.
I'd like to try out dot_tools. Unfortunately, I'm not able to get it working.
I installed it with the following command:
python setup.py install
pip list
shows that dot-tools 0.1 is installed.
When actually trying to import it as described in the README, I'm getting the following error:
Traceback (most recent call last):
File "dotplay.py", line 1, in <module>
from dot_tools import parser
ImportError: cannot import name 'parser'
Am I missing something?
BTW, Pip actually reports "dot-tools" instead of "dot_tools"...
Python version: 3.6.7
pip version: 18.1
setup tools version: 40.4.2
OS: macos 10.11.6
Thank you in advance!
Max
Hi,
I am trying to generate an AST of a Control Flow Graph of a simple Hello World program in C. I generated the DOT file using GCC's -fdump-tree-cfg-graph. When I tried to use the parse function, I got an error SyntaxError: LexToken(LCURLY,'{',11,355). I am assuming the problem is most likely the regex/lexer for strings(ID) in the DOT file does not include '{' or '}'.
The command to generate the DOT file
gcc HelloWorld.c -fdump-tree-cfg-graph
I am also attaching the source code and the generated DOT file
I just switched centos VMs and my new one fails with
pip install dot_tools
Collecting dot_tools
Could not find a version that satisfies the requirement dot_tools (from versions: )
No matching distribution found for dot_tools
I checked on pypi and didn't see dot_tools.
python -V
Python 2.7.5
uname -a
Linux bpm 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
What else can I look at?
Thx,
Joe
I'm getting
SyntaxError: LexToken(COLON,':',4,57)
when processing this DOT file.
The issue is probably caused by the fact that the label attribute inside of [] is spread over two lines. Putting these attributes into a single line, i.e.
"0" [label="0: BBlock(#9) idom: None"]
solves the issue.
Graphviz' dot 2.40.1 does process the unmodified file just fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.