ipynb-py-convert
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: ipynb-py-convert | ||
| Version: 0.4.5 | ||
| Version: 0.4.6 | ||
| Summary: Convert .py files runnable in VSCode/Python or Atom/Hydrogen to jupyter .ipynb notebooks and vice versa | ||
@@ -31,2 +31,14 @@ Home-page: https://github.com/kiwi0fruit/ipynb-py-convert | ||
| ## Troubleshooting | ||
| * If encoding problems on Windows try using `python>=3.7`, setting `set PYTHONUTF8=1` in Windows console and use `ipynb-py-convert` for UTF-8 files only. If using [Git-Bash on Windows](https://git-scm.com/download/win) setting: | ||
| ```bash | ||
| export LANG=C.UTF-8 | ||
| export PYTHONIOENCODING=utf-8 | ||
| export PYTHONUTF8=1 | ||
| ``` | ||
| should be enough. Also try setting default Bash settings to UTF-8: [Options] - [Text] - [Locale / Character set] - [C / UTF-8]. It might affect all Bash runs so there would be no need to setting encoding every time. | ||
| ## Example | ||
@@ -33,0 +45,0 @@ |
@@ -70,3 +70,3 @@ import json | ||
| 'nbformat': 4, | ||
| 'nbformat_minor': 1 | ||
| 'nbformat_minor': 4 | ||
| } | ||
@@ -82,13 +82,13 @@ | ||
| if in_ext == '.ipynb' and out_ext == '.py': | ||
| with open(in_file, 'r') as f: | ||
| with open(in_file, 'r', encoding='utf-8') as f: | ||
| notebook = json.load(f) | ||
| py_str = nb2py(notebook) | ||
| with open(out_file, 'w') as f: | ||
| with open(out_file, 'w', encoding='utf-8') as f: | ||
| f.write(py_str) | ||
| elif in_ext == '.py' and out_ext == '.ipynb': | ||
| with open(in_file, 'r') as f: | ||
| with open(in_file, 'r', encoding='utf-8') as f: | ||
| py_str = f.read() | ||
| notebook = py2nb(py_str) | ||
| with open(out_file, 'w') as f: | ||
| with open(out_file, 'w', encoding='utf-8') as f: | ||
| json.dump(notebook, f, indent=2) | ||
@@ -95,0 +95,0 @@ |
+13
-1
| Metadata-Version: 2.1 | ||
| Name: ipynb-py-convert | ||
| Version: 0.4.5 | ||
| Version: 0.4.6 | ||
| Summary: Convert .py files runnable in VSCode/Python or Atom/Hydrogen to jupyter .ipynb notebooks and vice versa | ||
@@ -31,2 +31,14 @@ Home-page: https://github.com/kiwi0fruit/ipynb-py-convert | ||
| ## Troubleshooting | ||
| * If encoding problems on Windows try using `python>=3.7`, setting `set PYTHONUTF8=1` in Windows console and use `ipynb-py-convert` for UTF-8 files only. If using [Git-Bash on Windows](https://git-scm.com/download/win) setting: | ||
| ```bash | ||
| export LANG=C.UTF-8 | ||
| export PYTHONIOENCODING=utf-8 | ||
| export PYTHONUTF8=1 | ||
| ``` | ||
| should be enough. Also try setting default Bash settings to UTF-8: [Options] - [Text] - [Locale / Character set] - [C / UTF-8]. It might affect all Bash runs so there would be no need to setting encoding every time. | ||
| ## Example | ||
@@ -33,0 +45,0 @@ |
+12
-0
@@ -23,2 +23,14 @@ # ipynb-py-convert | ||
| ## Troubleshooting | ||
| * If encoding problems on Windows try using `python>=3.7`, setting `set PYTHONUTF8=1` in Windows console and use `ipynb-py-convert` for UTF-8 files only. If using [Git-Bash on Windows](https://git-scm.com/download/win) setting: | ||
| ```bash | ||
| export LANG=C.UTF-8 | ||
| export PYTHONIOENCODING=utf-8 | ||
| export PYTHONUTF8=1 | ||
| ``` | ||
| should be enough. Also try setting default Bash settings to UTF-8: [Options] - [Text] - [Locale / Character set] - [C / UTF-8]. It might affect all Bash runs so there would be no need to setting encoding every time. | ||
| ## Example | ||
@@ -25,0 +37,0 @@ |
+1
-1
@@ -12,3 +12,3 @@ from setuptools import setup | ||
| packages=['ipynb_py_convert'], | ||
| version='0.4.5', | ||
| version='0.4.6', | ||
| description='Convert .py files runnable in VSCode/Python or Atom/Hydrogen to jupyter .ipynb notebooks and vice versa', | ||
@@ -15,0 +15,0 @@ long_description=long_description, |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
13129
17.44%