LabVIEW call .py file instead of .pyc file

Updated Nov 25, 2021

Reported In

Software

  • LabVIEW

Programming Language

  • Python

Issue Details

I have one .pyc file and one .py file in the same folder, and both of them are having same name but different file extension. When they are in the same location and the .pyc file is called in LabVIEW, the program will return .py file instead of the .pyc file. How can I ensure that the program will return .pyc file correctly?

Solution

This is an expected behavior, as Python is looking for the .py file because it always checks that first. You are recommended to name them differently or place them into different folder so that you program will be return the .py file or .pyc file correctly.