I wonder if anyone would guide me with the right direction to create a code which performs these operations:
The first code imports a series of libraries, performs a some of operations and generates some data (for example a pandas data frame)
- The first code runs a second python script using as an argument this pandas dataframe array
-The second code imports a library and performs some operations independently of the objects and variables created by the first program
-The second program generates some data (a second data frame for example) and it stops
-The first program reads these data and works with it before closing
The question is then: how do you make a python script running a second script separately but transferring complex objects between then?
A bit of context :
I am using pyraf which is a python based library which works over IRAF. The latter is a very important astronomical library but with a very... Conflicting design... For example: If I run matplotlib before this a pyraf object I get crushes. Moreover, I work with eclipse and if I run a pyraf routine I also get errors. So I need to run the second script as if it were from the terminal independent of where the actual first code is actually working. I understand I can generate files which preserve the data from one code to another but I wonder if there is a cleaner approach
Thanks for your patience :)
-
You might want to have a look at this questionMichael Franzen– Michael Franzen2016年07月09日 22:25:47 +00:00Commented Jul 9, 2016 at 22:25
-
Thanks for the recommendation it I s very interesting discussion. If you post it as an answer I can set it as the solutionDelosari– Delosari2016年07月10日 21:46:09 +00:00Commented Jul 10, 2016 at 21:46