Move all generated files to a temporary directory
Running examples in OMPython will place all generated files in the current directory. This is not very nice and clutters up the workspace. OMPython should generate all files in some temporary directory instead.
Note that the tempfile module in the standard library can be used to create and automatically clean up temporary directories.
I disagree. I usually read the generated files such as result files for example for plotting. It would really mess up scripts if files were suddenly not generated in the same location as previously.
Could be an option when creating the object though.
Sent from BlueMail
On 16 Jun 2017, 18:10, at 18:10, Dietmar Winkler [email protected] wrote:
Running examples in OMPython will place all generated files in the current directory. This is not very nice and clutters up the workspace. OMPython should generate all files in some temporary directory instead.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenModelica/OMPython/issues/34
Being able to specify the location would probably be a good enhancement then. E.g. Instead of a system temp into a subfolder. OMedit uses a system temp as far as i know.
- jun. 2017 7.45 p.m. skrev "Martin Sjölund" [email protected]:
I disagree. I usually read the generated files such as result files for example for plotting. It would really mess up scripts if files were suddenly not generated in the same location as previously.
Could be an option when creating the object though.
Sent from BlueMail
On 16 Jun 2017, 18:10, at 18:10, Dietmar Winkler [email protected] wrote:
Running examples in OMPython will place all generated files in the current directory. This is not very nice and clutters up the workspace. OMPython should generate all files in some temporary directory instead.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/OpenModelica/OMPython/issues/34
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenModelica/OMPython/issues/34#issuecomment-309089962, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAkdJT_bvN8CGNbsd_aW7mvzLTlfIChks5sEr8ggaJpZM4N8psg .
One of the first things OMEdit does is call cd("/tmp/OpenModelica_userName/OMEdit/"). It's quite explicit in that.
@adeas31 you "recently" added some new flag for simulations to deal with this, right? So new you can set fileNamePrefix to generate files in one location (which ModelSystem could default to a temp directory) and use a different directory for output files generated by the simulation.