So, I made a Python file (.py) and I want to convert it into a PowerShell file (.ps1)
I tried this tool: https://github.com/x-j/ps1scriptify but every time I give it a .py file, it says:
Python script provided is not callable (does not contain a main block)
So I changed this: print("Hello, World") to this:
def main():
print("Hello, world")
main()
It still gives me the same error mentioned above.
Any help please?
python my_module.pywould execute your script and you can even store it in a variable to access outputs.