I'm using QGIS 3.4 and Python 3.7.0 on Windows 7.
From the Python console of QGIS, I created a test script ("test.py") which contains the following line:
and this is saved in C:\OSGeo4W64\bin\test.py
I want to run this script from outside QGIS.
I tried opening "python-qgis.bat" which I found in C:\OSGeo4W64\bin, and typed:
but got an error saying [NameError: name 'test' is not defined].
The code itself works fine from QGIS, but because I want to run it from outside QGIS, do I need all the import... etc at the beginning of the script?
What do I need to do?