%%writefile in Julia

In Python, I always used

%%writefile myfile.py

in Jupyter notebooks when I wanted to export the code coming after it. How do I do that in Julia?

Nevermind! This does the trick:

write("filename", In[IJulia.n])
2 Likes