What's the best way to convert py to ipynb in code? or How can I programmatically convert py to ipynb

14 Replies, 1498 Views

Subject: What's the best way to convert py to ipynb in code?

Hey everyone,

I’ve got a bunch of .py scripts and wanna convert them to .ipynb notebooks *programmatically*. Tried a few things, but nothing’s sticking.

Anyone know a reliable method to convert py to ipynb in code? Preferably something lightweight—no manual steps.

Heard about `jupytext` and `p2j`, but not sure if they’re the best fit. Any tips or scripts you’ve used?

Thanks in advance!

(Also, if you’ve got a snippet to share, that’d be awesome 👀)

Messages In This Thread
What's the best way to convert py to ipynb in code? or How can I programmatically convert py to ipynb - by - 20-02-2025, 08:11 AM



Users browsing this thread: 1 Guest(s)