# jupyter_write: crear notebooks nuevos **Componente:** `python/functions/notebook/jupyter_write.py` ## Problema `jupyter_write.py append-*` falla con error websocket 4404 si el notebook no existe todavía. El modo colaborativo no puede inicializar un documento que no existe en disco. Actualmente hay que crear el .ipynb manualmente como archivo antes de poder usar las funciones jupyter. ## Solución propuesta Añadir subcomando `create` a `jupyter_write.py`: ```bash $PYTHON jupyter_write.py create notebooks/01_foo.ipynb $PYTHON jupyter_write.py create notebooks/01_foo.ipynb --kernel python3 ``` Comportamiento: 1. Crear el archivo .ipynb con estructura mínima válida (nbformat 4, kernel metadata) 2. Opcionalmente aceptar celdas iniciales via stdin o argumentos 3. Si el notebook ya existe, no sobreescribir (error o flag `--force`) ## Contexto Encontrado al intentar crear `01_matching_engine_fifo.ipynb` en `analysis/estudio_mercados`. Tuve que escribir el archivo directamente con Write en vez de usar las funciones del registry.