Launch Labview program through Python - python-3.x

I am working on a project in which I have to launch a VI (Labview program) through my GUI written in python. I have not the administrator rights so I installed PyCharm Community with the JetBrain Toolbox and Python 3.3 with an MSI file.
I read on the internet that to do what I want, I need to install the pywin32 extension: extension -link, but when I launch it, it doesn't find my Python installation.
So, my question is: is there another way to control VI from python?
Thank you in advance for your answer. I am a beginner in both languages.

If you want to run a plain VI, you have to run the LabVIEW IDE -- a
VI is a source code file, not a built executable, so to run directly,
it has to be hosted in the editor.
If you want to run a VI built into
an executable, you obviously have to run that built EXE.
So, either way, you're going to have to be able to launch an EXE.
Can your Python invoke C-style DLLs? If so, you could build your VI into a DLL and then call the VI that way.

Related

install python using GUI pyqt

is it possible to develop a pyqt application and check if python is installed, if not can we install python from the same application?
i need to install python through a pyqt standalone application(exe).
when i double click on the exe it should download python and install.
Yes, this is possible. You will need to do the following:
Develop the code on a computer with Python and PyQt, convert the python code into a executable (.exe) file (if you would like to deploy to windows)
Send this .exe file to the user computer and then run it there

Why does pyinstaller executable change the format and resolution?

I've been surfing through the internet and have failed to find the answers I'm looking for. I am new to python and asking questions here, but anyways, I am running windows 10, and my script uses tkinter as the GUI module. Whenever I run the script through the command prompt (or IDE) I get this: Image via IDE
Whenever I run pyinstaller executable, I get this: pyinstaller executable
As you can see, the executable changes some of the geometry of the widgets and makes the image blurry. How do I fix this on my computer, and how do I account for this across various windows supported hardware?
It turns out that the issue is with windows and can be corrected by right clicking on the executable in the file window and following these steps: https://www.ghacks.net/2020/09/14/how-to-fix-blurry-text-in-programs-on-windows-10/

How run script Python GTK and Glade in windows?

Sorry about my English, i want to create an application with windows interface, through the website Setting up GTK for Windows I followed all MSYS2 steps to install GTK and Glade for windows. But now I can't find Glade, I can't run a python script.
About the second problem:
For me, it is sufficient to search for Glade with Windows' search function. If this is not the case for you, I have the direct executable path for you: glade.exe should be located in [..., folder where you installed msys2 to]\msys2\mingw64\bin\glade.exe.

How to run GTK3 Python3 script outside of MSYS2 in Windows

How can I make my GTK3+ Python script work outside of Msys2's own Python interpreter, into my own venv (virtual environment) Python3 interpreter? I want to prepare my Python 3 script for distribution to other computers, but without Msys2.
I'm using Windows 10.
I've successfully followed the instructions on GTK's website, to download GTK3+ and the Python bindings, in Windows.
I've installed GTK3+ and the Python bindings using MSYS2. My script runs successfully within MSYS2's Python3 interpreter in C:\msys64\mingw64\bin. However, I want to run my Python script outside of MSYS2, with a separate Python 3 interpreter (venv) - not the one in MSYS2.
From my research, it seems that I need to copy the GTK3 .dll files and icons from
C:\msys64\mingw64\bin
and C:\msys64\mingw64\share
to the Python3 interpreter path that I want, with my script files in there too.
But when I attempt to run my script in the virtual environment, I get:
builtins.ImportError: cannot import name '_gi' from 'gi'
Any ideas? Thanks.
I don't know if that is possible.
But if the final intent is to distribute your app, then you should install PyInstaller inside MSYS2 and generate an executable there. Then you'll be able to distribute and execute your app on any Windows machine.
It will only be possible to run your program using the MSYS2 Python interpreter and with all of the required libraries. You can't just copy files and then run them with the Windows Python interpreter that was built using MSVC.
PyInstaller is a good solution to package an app with the interpreter and all of the libraries. The issue you mentioned about getting errors about no module named '_struct' has been fixed.

Open TCL pipeline to cygwin running terminal

So i'm running a TCL program in Windows. Is there any way to write directly to my running Cygwin terminal? Assuming my TCL workspace is currently in C:\workspace and cygwin installation is C:\cygwin\ and windows cannot see private Cygwin files for example inside /dev/pty0 .
Without having a copy of Cygwin handy to check, I can't be certain, but I understood that files in C:\cygwin were visible to both Windows and the Cygwin terminal. So try writing to a directory under C:\cygwin from your TCL program. Then you should be able to read and display that file from Cygwin.
Alternatively, isn't Cygwin able to see the entire Windows file system, as per this example?

Resources