Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » U++ and Python
U++ and Python [message #60586] Wed, 22 May 2024 18:57 Go to next message
forlano is currently offline  forlano
Messages: 1194
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

part of my program is unfortunately a script in Python that I want to hyde.
Now I must choose between:

a) convert the python script to exe and include it to my package as a plugin that I call from my U++ program. I think to be able to do it.

b) use some import method to link it to U++ in a way I am not aware of.

The question regards the possibility (b). Is there some way to achieve it and combine the two worlds? Has somebody tried to put together U++ and Python?

Thanks,
Luigi
Re: U++ and Python [message #60587 is a reply to message #60586] Thu, 23 May 2024 08:31 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3376
Registered: August 2008
Senior Veteran
Hello Luigi

From U++ to Python is easier, but from Python to U++...

So far I haven't had the need, but at some point I have thought about what you say, if the application supports it, U++ generates some files and calls a Python binary. This opens the files, does the jobs, and generates other files that U++ uses later. I know this is not very brilliant, but in some situations it can save the day.

Of course, if the script is not relatively large, you can convert it relying on ChatGPT. It's not perfect, you'll have to check everything, the code won't be brilliant, but it will take a lot of work off your hands. ChatGPT knows a lot about U++. If you use matrix algebra, you can also tell it to use Eigen as well.


Best regards
IƱaki

[Updated on: Thu, 23 May 2024 08:33]

Report message to a moderator

Re: U++ and Python [message #60591 is a reply to message #60587] Fri, 24 May 2024 17:58 Go to previous message
forlano is currently offline  forlano
Messages: 1194
Registered: March 2006
Location: Italy
Senior Contributor
koldo wrote on Thu, 23 May 2024 08:31
Hello Luigi
So far I haven't had the need, but at some point I have thought about what you say, if the application supports it, U++ generates some files and calls a Python binary. This opens the files, does the jobs, and generates other files that U++ uses later. I know this is not very brilliant, but in some situations it can save the day.


Hi Koldo,

this is the solution (a). I am moving in this direction as the easiest.
Luckily Pyinstaller produces exe from script.

Best regars,
Luigi
Previous Topic: I'm having a problem including a library
Next Topic: Layout Designer and Menus
Goto Forum:
  


Current Time: Sun Jul 14 13:35:24 CEST 2024

Total time taken to generate the page: 0.01249 seconds