tonybaloney / instaviz

Instant visualization of Python AST and Code Objects
Apache License 2.0
129 stars 18 forks source link

static and templates folders are not found (path issues) #8

Closed catchthemonster closed 4 years ago

catchthemonster commented 5 years ago

Nice product, like it a lot. When used in app structure instaviz when calling show method assumes jinja path target to be under that particular module or directory, thus will not display anything because there is no static and template directory under it... example: main (package) Main.py import instaviz

def example():
  a = 1
  b = a + 1
  return b

instaviz.show(example)

Error: 500 No home.html

if user adds two directories under main/instaviz, e.g.

main instaviz static templates

everything works fine...

i hope this helps some other soul, mainly as product is cool and helpful in understanding cPython and AST.

Regards,

schnell18 commented 5 years ago

I just created a pull request to run instaviz out-of-box. It also support run instaviz inside the Python REPL. See #9

tonybaloney commented 4 years ago

fixed in 0.6.0, sorry for the delay!