


{"id":161276,"date":"2021-08-13T03:25:01","date_gmt":"2021-08-13T03:25:01","guid":{"rendered":"\/forum\/forums\/topic\/call-python-method-in-lumerical-script\/"},"modified":"2021-08-27T21:13:44","modified_gmt":"2021-08-27T21:13:44","slug":"call-python-method-in-lumerical-script","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/call-python-method-in-lumerical-script\/","title":{"rendered":"Call python method in lumerical script"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Hi, I was wondering that if it&#039;s possible to call the python method (or def) within the lumerical script, say fom script of optimization?<\/p>\n<p>Although the syntax &#039;system(&quot;&lt;python.exe pyName.py&gt;&quot;);&#039; works for just running the python file, it can&#039;t return values back to lumerical for fom. It seems that the python API could solve the problem, but I don&#039;t know what method of lumapi should be used here. <\/p>\n<p>Could you help me with this?<\/p>\n","protected":false},"template":"","class_list":["post-161276","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["387"],"_bbp_likes_count":["0"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["161276"],"_bbp_forum_id":["27833"],"_bbp_engagement":["14496","186380"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["188954"],"_bbp_last_active_id":["188954"],"_bbp_last_active_time":["2021-08-27 21:13:44"]},"test":"ryanchung"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/161276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/161276\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=161276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}