Skip to content

Imported Mode outside of Jupyter? #19

Closed Answered by hx2A
tabreturn asked this question in Q&A
Discussion options

You must be logged in to vote

Yes! There is a command line utility called run_sketch:

$ run_sketch -h
usage: run_sketch [-h] [-c CLASSPATH] sketch_path

Execute py5 sketch

positional arguments:
  sketch_path           path to py5 sketch

optional arguments:
  -h, --help            show this help message and exit
  -c CLASSPATH, --classpath CLASSPATH
                        extra directories to add to classpath

I've been focusing most of my "imported mode" efforts into Jupyter so I haven't put as much effort into this command line tool lately. But it should work. Save the below code to a file and pass the file to that utility:

def settings():
    size(500, 500)

def setup():
    fill(255, 0, 0)
    no_stroke()

def d…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@hx2A
Comment options

hx2A Jun 21, 2021
Maintainer

@hx2A
Comment options

hx2A Jun 21, 2021
Maintainer

@tabreturn
Comment options

@hx2A
Comment options

hx2A Jun 21, 2021
Maintainer

@hx2A
Comment options

hx2A Jun 21, 2021
Maintainer

Answer selected by tabreturn
Comment options

You must be logged in to vote
2 replies
@tabreturn
Comment options

@hx2A
Comment options

hx2A Jun 23, 2021
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants