Why Hypermesh completely built using TCL? why not Python

Altair Forum User
Altair Forum User
Altair Employee
edited February 2022 in Community Q&A

Hi, admins & staff !

 

Why Hypermesh completely built using TCL? If they built using python,  people will get lot of help for CAE automation. why they choose TCL?

Can we expect Hypermesh based on Python in future? :rolleyes:/emoticons/default_rolleyes.gif' title=':rolleyes:' />

 

have a nice day!

thank you 

Tagged:

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited March 2019

    TCL & Python are both good programming languages. So why not TCL?

    If you like Python, go for Simulia Abaqus :P/emoticons/default_tongue.png' srcset='/emoticons/tongue@2x.png 2x' title=':P' width='20' />

  • tinh
    tinh Altair Community Member
    edited March 2019

    Because it needs many GUI objects (browsers, menus, dialogs,...) . Can python provide them? I think yes, via tkinter - an instance of Tk! So they use Tk directly, it is easier, isn't it?

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited March 2019

    I don't like this 'Programming-Language-War' subject :P/emoticons/default_tongue.png' srcset='/emoticons/tongue@2x.png 2x' title=':P' width='20' />

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited April 2019

    TCL was there when Hypermesh initial development started, Python was released later.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2019

    Why Python over TCL? Because people know Python and not TCL.

     

    Googling 'programming languages by popularity' gives you the following

     

    https://www.ubuntupit.com/top-20-most-popular-programming-languages-to-learn-for-your-open-source-project/

    Python: #2

    TCL: Didn't make it to top 20

     

    https://www.tiobe.com/tiobe-index/

    Python: #3

    TCL: Didn't make it to top 20

     

    http://pypl.github.io/PYPL.html

    Python: #1

    TCL: Didn't make it to top 23

     

    https://www.businessinsider.com/the-10-most-popular-programming-languages-according-to-github-2018-10?r=US&IR=T#2-java-9

    Python: #3

    TCL: Didn't make it to top 10

     

    https://raygun.com/blog/programming-languages/

    Python: #3

    TCL: Didn't make it to top 43

     

    https://www.devsaran.com/blog/10-best-programming-languages-2019-you-should-know

    Python: #1

    TCL: #18

     

     

    Even if TCL has a slight advantage over Python (I am not claiming it has), is it really worth using as language people don't know?

    <?xml version="1.0" encoding="UTF-8"?>pl_list.PNG

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2019

    Viva TCL!

    Viva Hypermesh!

     

  • tinh
    tinh Altair Community Member
    edited June 2019

    :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> more people will want to know Tcl because they know hypermesh now!

     

    Tcl is small, so write everything by python, and call py.exe from tcl simply.

  • FabioAltair
    FabioAltair New Altair Community Member
    edited March 2020

    :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> more people will want to know Tcl because they know hypermesh now!

     

    Tcl is small, so write everything by python, and call py.exe from tcl simply.

    could you post an example of this procedure, please? or any relevant material on the subject

  • tinh
    tinh Altair Community Member
    edited March 2020

    This package will embed a python interp into tcl

    https://wiki.tcl-lang.org/page/tclpython

  • alpha_21885
    alpha_21885 Altair Community Member
    edited March 2020

    I use both Python(for Simlab customization) and TCL(for HyperMesh).

    In my opinion, Python is helpful for data management with OOP (of course it will be faster) and the syntax is easier than TCL.

     

    However, HyperMesh have supported many TCL API to interact with HM. We can use a lot of those API functions easily, no need to create our code again. This helps create script very quickly.

     

    Integrate Python in HyperMesh is easy but write a huge API functions need a lot of effort.

    I use Simlab Python but found many limitation because there are not so much API functions.

    I use Abaqus/Ansys Python but also found many limitation.

     

    So, Python or TCL does not matter. The important is supported API functions under CAE software.

    HW will support Python because they serve some trend.

    For me, I do not need. I need API more than Python.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    The new release Hyperworks 2020 is shipped with Python 3.5 for new GUI Hyperworks-X.

    But for macro programming, I think we still work with Tcl/Tk

     

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited June 2020

    as described above, all the APIs for HM and HV are written in TCL.

    Although Python is the most popular language nowadays, it is very hard to change from one language to another, as you would need to rewrite everything in a new language. It will probably occur only in a completely new HyperWorks environment.

    And it is correct: HWx new interfaces will be coming built on Python, but the core is still TCL.

     

  • Sanaa Mouzahir
    Sanaa Mouzahir Altair Community Member
    edited February 2022
    tinh said:

    :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> more people will want to know Tcl because they know hypermesh now!

     

    Tcl is small, so write everything by python, and call py.exe from tcl simply.

    Could you provide more detail to this please? I am actually trying to call Hyperworks from Python (Running the TCL macros from python), this seems like what I need! Do you have some documentation regarding this ? Thank you!

  • Sanaa Mouzahir
    Sanaa Mouzahir Altair Community Member
    edited February 2022
    tinh said:

    :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> more people will want to know Tcl because they know hypermesh now!

     

    Tcl is small, so write everything by python, and call py.exe from tcl simply.

    Dear Tinh. 

    Could you please give more details about this py.exe? I want to run the tcl macro in HyperMesh directly from python. I tried using the tk call function but it did not work.

    Let me know, 

    Cheers

    Sanaa