Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gvanim/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from argparse import ArgumentParser, FileType
from sys import stdin

import animation, render
from . import animation, render

def main():

Expand Down
3 changes: 1 addition & 2 deletions gvanim/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
# You should have received a copy of the GNU General Public License along with
# "GraphvizAnim". If not, see <http://www.gnu.org/licenses/>.

import animation

class NextStep( object ):
def __init__( self, clean = False ):
self.clean = clean
def __call__( self, steps ):
from . import animation
steps.append( animation.Step( None if self.clean else steps[ -1 ] ) )

class AddNode( object ):
Expand Down
4 changes: 2 additions & 2 deletions gvanim/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from email.utils import quote
import shlex

import action
from . import action

class ParseException( Exception ):
pass
Expand Down Expand Up @@ -113,7 +113,7 @@ def parse( self, lines ):
except KeyError:
raise ParseException( 'unrecognized command: {}'.format( action ) )
except TypeError:
raise ParseException( 'wrong number of parameters: {}'.format( line.strip() ) )
raise ParseException( 'wrong number of parameters: {}'.format( line.strip() ) )
return

def steps( self ):
Expand Down
2 changes: 1 addition & 1 deletion gvanim/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from IPython.display import Image
import ipywidgets as widgets

from render import render
from .render import render

def interactive( animation, size = 320 ):
basedir = mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion gvanim/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _render( params ):
path, fmt, size, graph = params
with open( path , 'w' ) as out:
pipe = Popen( [ 'dot', '-Gsize=1,1!', '-Gdpi={}'.format( size ), '-T', fmt ], stdout = out, stdin = PIPE, stderr = None )
pipe.communicate( input = graph )
pipe.communicate( input = graph.encode() )
return path

def render( graphs, basename, fmt = 'png', size = 320 ):
Expand Down