dlldiag/subcommands/graph.py
def writeToFile(graph, outfile):
		'''
		Writes the supplied graph to file in GraphViz DOT format
		'''
		
		# Use pydot to convert the graph to DOT format
		dot = nx.drawing.nx_pydot.to_pydot(graph).to_string()
		
		# Clean up extraneous vertices
		# (These are presumably caused by using Windows file paths as vertex names)
		dot = re.sub('^C;$', '', dot, flags = re.MULTILINE)
		while '\n\n' in dot:
			dot = dot.replace('\n\n', '\n')
		
		# Convert backslashes to forward slashes to avoid confusing GraphViz
		dot = dot.replace('\\\\', '/').replace('\\', '/')
		
		# Write the DOT to the specified output file
		FileIO.writeFile(outfile, dot)

		Writes the supplied graph to file in GraphViz DOT format
		
Writes the supplied graph to file in GraphViz DOT format
Writes the supplied graph to file in GraphViz DOT format
def writeToFile(graph, outfile):
		dot = nx.drawing.nx_pydot.to_pydot(graph).to_string()
		dot = re.sub('^C;$', '', dot, flags = re.MULTILINE)
		while '\n\n' in dot:
			dot = dot.replace('\n\n', '\n')
		dot = dot.replace('\\\\', '/').replace('\\', '/')
		FileIO.writeFile(outfile, dot)
def writeToFile ( graph , outfile ) : dot = nx . drawing . nx_pydot . to_pydot ( graph ) . to_string ( ) dot = re . sub ( '^C;$' , '' , dot , flags = re . MULTILINE ) while '\n\n' in dot : dot = dot . replace ( '\n\n' , '\n' ) dot = dot . replace ( '\\\\' , '/' ) . replace ( '\\' , '/' ) FileIO . writeFile ( outfile , dot )
Writes the supplied graph to file in GraphViz DOT format
Writes the supplied graph to file in GraphViz DOT format
'''
		Writes the supplied graph to file in GraphViz DOT format
		''' # Use pydot to convert the graph to DOT format # Clean up extraneous vertices # (These are presumably caused by using Windows file paths as vertex names) # Convert backslashes to forward slashes to avoid confusing GraphViz # Write the DOT to the specified output file
graph
outfile