{"id":164289,"date":"2023-02-06T14:42:20","date_gmt":"2023-02-06T14:42:20","guid":{"rendered":"\/knowledge\/forums\/topic\/how-to-use-external-python-packages-or-modules-into-ansys-electronics-desktop\/"},"modified":"2023-07-31T12:36:40","modified_gmt":"2023-07-31T12:36:40","slug":"how-to-use-external-python-packages-or-modules-into-ansys-electronics-desktop","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-use-external-python-packages-or-modules-into-ansys-electronics-desktop\/","title":{"rendered":"How to use external Python packages or modules into ANSYS Electronics Desktop?"},"content":{"rendered":"<p>To use external Python packages or modules in your scripts, you need to add the path to the folder where your package\/module is to the system variable.  Note: only modules for IronPython are accepted. You cannot use such modules as NumPy, etc  To do so, you just need to add these following line codes:  import sys sys.path.append(r&#8221;path to package\/module folder&#8221;) import package\/module  Now you are able to use this package\/module in your script.  Example:  >>> import sys >>> sys.path.append(r&#8221;E:ScriptsXlsxWriter-master&#8221;) >>> import xlsxwriter >>> dir(xlsxwriter) [&#8216;Workbook&#8217;, &#8216;__VERSION__&#8217;, &#8216;__builtins__&#8217;, &#8216;__doc__&#8217;, &#8216;__file__&#8217;, &#8216;__name__&#8217;, &#8216;__package__&#8217;, &#8216;__path__&#8217;, &#8216;__version__&#8217;, &#8216;app&#8217;, &#8216;chart&#8217;, &#8216;chart_area&#8217;, &#8216;chart_bar&#8217;, &#8216;chart_column&#8217;, &#8216;chart_doughnut&#8217;, &#8216;chart_line&#8217;, &#8216;chart_pie&#8217;, &#8216;chart_radar&#8217;, &#8216;chart_scatter&#8217;, &#8216;chart_stock&#8217;, &#8216;chartsheet&#8217;, &#8216;comments&#8217;, &#8216;compatibility&#8217;, &#8216;contenttypes&#8217;, &#8216;core&#8217;, &#8216;drawing&#8217;, &#8216;format&#8217;, &#8216;packager&#8217;, &#8216;relationships&#8217;, &#8216;shape&#8217;, &#8216;sharedstrings&#8217;, &#8216;styles&#8217;, &#8216;table&#8217;, &#8216;theme&#8217;, &#8216;utility&#8217;, &#8216;vml&#8217;, &#8216;workbook&#8217;, &#8216;worksheet&#8217;, &#8216;xmlwriter&#8217;]<\/p>\n","protected":false},"template":"","class_list":["post-164289","topic","type-topic","status-publish","hentry","topic-tag-19-2","topic-tag-electromagnetics-electronics","topic-tag-hfss"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["1-24-2023  20:20:14"],"_bbp_forum_id":["27819"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["7081"],"siebel_km_number":["2039255"],"product_version":["19.2"],"km_published_date":["2015-04-30T21:18:57.000Z"],"family":["Electromagnetics & Electronics"],"application_name":["HFSS"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164289\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=164289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}