I am creating an API using the python fastapi library. The API is running pick programs off the back of the various endpoints using the u2py library. There is an alias setup to ensure the universe python is being run rather than any other version. We change dir at os level before running u2py commands. This all works fine when the universe account has no menu in the login paragraph, otherwise it's getting stuck in the menu. An example code snippet below works if I run from python prompt at universe level but not if i run python from linux level. I think it's the @TTY I need to somehow set to 'phantom' stop it ending up in the menu, any thoughts how to achieve this?
import u2py
import os
os.chdir('/opt/universe')
f_UV_ACCOUNT = u2py.File('UV.ACCOUNT')
------------------------------
Neil Sherwood
Analyst Programmer
HSBC Global Services (UK) Limited
London GB
------------------------------




