(argv=None)
September 18, 2014: if an arg is passed, we visualize it
	Otherwise a simple shell gets opened.
September 18, 2014: if an arg is passed, we visualize it
	Otherwise a simple shell gets opened.
September 18 2014 : if an arg is passed we visualize it Otherwise a simple shell gets opened .
def main(argv=None):
	"""
	September 18, 2014: if an arg is passed, we visualize it
	Otherwise a simple shell gets opened.

	"""

	print("Ontospy " + ontospy.VERSION)
	ontospy.get_or_create_home_repo()

	if argv:
		print("Argument passing not implemented yet")
		if False:
			onto = Model(argv[0])
			for x in onto.get_classes():
				print(x)
			onto.buildPythonClasses()
			s = Sketch()

	else:

		intro = """Good morning. Ready to Turtle away. Type docs() for help."""
		# idea: every time provide a different ontology maxim!

		def docs():
			print("\n".join([x.strip() for x in Sketch.__doc__.splitlines()]))

		default_sketch = Sketch()

		def add(text=""):
			default_sketch.add(text)
		def show(aformat=None):
			if aformat:
				default_sketch.show(aformat)
			else:
				default_sketch.show()
		def bind(prefixTuple):
			default_sketch.bind(prefixTuple)
		def clear():
			default_sketch.clear()
		def omnigraffle():
			default_sketch.omnigraffle()


		try:
			# note: this requires IPython 0.11 or above
			import IPython
			IPython.embed(banner1=intro)
		except:
			import code
			code.interact(banner=intro, local=dict(globals(), **locals()))
	# finally
	sys.exit(0)
def main ( argv = None ) : print ( "Ontospy " + ontospy . VERSION ) ontospy . get_or_create_home_repo ( ) if argv : print ( "Argument passing not implemented yet" ) if False : onto = Model ( argv [ 0 ] ) for x in onto . get_classes ( ) : print ( x ) onto . buildPythonClasses ( ) s = Sketch ( ) else : intro = """Good morning. Ready to Turtle away. Type docs() for help.""" # idea: every time provide a different ontology maxim! def docs ( ) : print ( "\n" . join ( [ x . strip ( ) for x in Sketch . __doc__ . splitlines ( ) ] ) ) default_sketch = Sketch ( ) def add ( text = "" ) : default_sketch . add ( text ) def show ( aformat = None ) : if aformat : default_sketch . show ( aformat ) else : default_sketch . show ( ) def bind ( prefixTuple ) : default_sketch . bind ( prefixTuple ) def clear ( ) : default_sketch . clear ( ) def omnigraffle ( ) : default_sketch . omnigraffle ( ) try : # note: this requires IPython 0.11 or above import IPython IPython . embed ( banner1 = intro ) except : import code code . interact ( banner = intro , local = dict ( globals ( ) , * * locals ( ) ) ) # finally sys . exit ( 0 )