Backwards Conversion from Spyder to Full Python File #80
Replies: 2 comments 1 reply
-
If you want to keep updating the Python script as you develop the model in Spyder with the spyder-modelx plugin, here's how:
You can use the MxConsole and modelx widgets to explore the model. @mx.defcells(FiboSpace)
def another():
return 0 Then select the added lines, right-click and select 'Run selection or current line'. Now, suppose you wan to change the definition of @mx.defcells(FiboSpace)
def result():
return 2 * fibo(proj_len()) Change the definition in the editor, right-click and 'Run selection or current line'. There is another way. Spyder has a cool feature of separating a script into pieces ('cells') as Jupyter notebook does. |
Beta Was this translation helpful? Give feedback.
-
Hi, a silly question - if I want to read the model as it is and just run it using IPython, what should I write? Say, I want the function "result_pv" to be run from the model "BasicTerm_M" and results to be extracted out into a dataframe. What would be the code please? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Sorry if I am posting a silly question. I have just been following the tutorial on Fibonacci Sequence, and have replicated the Python Code as following:
Question
By running the above coding, I am able to further develop in Spyder. In case, if I decided to continue the development in Python after changes in the Spyder Version, is there any method for me to convert the edited version in Spyder back to the Code in Python as above?
Thanks,
Charlie
Beta Was this translation helpful? Give feedback.
All reactions