I'm new to Jython and I would need to find a way to save scientific data in HDF5 file format.
Is there a library available with Jython or should I use a Java library directly?
Related
I understand the difference between a python module and package, but I cannot find a clear answer that tells me what type of artifact the pip repos truly manage in the end.
For example, if I write a big python application like QT, what artifact do I need to build inorder to upload it to a pip repository server? Is it just a zip of the folder, the raw folder (unlikely and I hope not) or a special run-able python compressed format analogous to how java uses WAR files.
I work on a Buildroot Embedded Linux System and I have to code Machine Learning Inference using the Tensorflow lite C++ static library. I have already built it following the tensorflow tutorial and I have got my libtensorflow-lite.a file ready to go.
But now, I don't really know how to add this static library to the cross compiler on buildroot. The buildroot user manual doesn't seem to talk about it.
I don't know if I have to create a ".mk" file or a "Config.in" file as a package or not.
Can someone help me ?
I've tried PyInstaller, but it doesn't support Python 3.7. I'm using Python 3.7 features, so I don't want to downgrade to 3.6. How can I make my program a single-file, cross-platform executable?
Have you tried to use cx_Freeze? For Python 3.7, you need to apply the bugfix described in this answer by hand to your local cx_Freeze installation until a corrected version has been released.
cx_Freeze itself does not support building a single-file executable, but you can use further tools for this purpose as described here.
This depends on what you mean by "EXE file".
If you can jam all your source code into a single.py file then that would likely be the closest to a cross platform executable. It would just require having a python interpreter pre-installed on each OS.
If you are referring to a literal .exe executable file that works cross platform; for python programs this is impossible. Python compiles down to machine code in the same way that C and C++ do, which is platform specific. Unlike Java, which runs on a VM, if you wish to compile your python program into a single executable file, then the file will only work on whatever platform it was compiled on.
I would like to add a plugin to import and export .ctm files to blender (version 2.78). Is it possible? If yes, then how can do it?
Blender provides a python API to access it's data, which is used to create addons. Most of the included import/export functionality in blender is provided by addons written in python.
If you can read a .ctm file using python, then you should be able to re-create it in blender.
To get started, there is an addon tutorial here, you can also look through the existing import/export Addons included with blender and you can find some more in the Addons Contrib repo, the import/export addons have names starting with io_.
You can get blender specific help with python coding at blender.stackexchange.com
I'm trying to load a dll into my lua script and call the function. When I create the dll using GCC (under cygwin) and lua (5.2.4) I'm able to load the library & execute it without a problem.
However, when I create run the same script from SciTE, using Lua 5.1, the dll loads successfully. However, it does not execute. In the dll I'm trying to simply write two integers into a file.
t = package.loadlib("mylibrary.dll","myfunc")
t(23,45)
There are two questions here:
1. What format should the 'mylibrary.dll' be, for lua to understand and execute without problems - ELF or COFF.
2. Can I run dll (built under windows, obviously) under lua running on linux?
The question in your title seems to be very different from the cause of the problem you describe.
On the one hand, the format for dynamic libraries loaded by Lua is the format for the platform that the Lua code is running on. Just as you can't take a compiled Win32 executable and expect it to run on Linux, you can't take a compiled Win32 dll and expect it to load it on Linux. Obviously emulation tools like Wine exist, but those work by emulating Windows. You could run them within the emulator, but not outside of it.
But on the other hand, that is not the source of your problem. Your problem is that you're using a dynamic library that was built for one version of Lua with an application that was built for another version of Lua. That doesn't work; Lua does not retain compatibility between "minor" versions, only between revisions (Lua 5.1.3 vs. 5.1.4).
ELF or COFF, that isn't going to work.