–my_option is something I define in my macro using the OptionParser, so why would from ROOT import * have any behavior that depends on which command line options I use?
the application should not hang, but the file (if it exists) does get handed to TApplication, so it will have an effect.
Beyond telling ROOT to ignore the command line options, an alternative is to separate the argument list with a standalone ‘-’ or ‘–’ argument. Have the python and ROOT options before this and the arguments for the script after.