1

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 :)

asked Jul 9, 2016 at 21:36
2
  • You might want to have a look at this question Commented 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 solution Commented Jul 10, 2016 at 21:46

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.