First of all, I'm using Python 2.7.3, QGIS 1.8 (Lisboa) on Windows 7 pro 64 bits. Now let's go to the actual question:
I have written some code (Python) that works well within the QGIS built in Python console, but now I need to run it from outside QGIS (it is too much to ask for the final user to open QGIS, then the python console and to copy and paste the code).
I have been trying to access the QGIS API, but it is missing from my PYTHONPATH. I've tried whatever is on the instructions, plus a bunch of paths like: C:\Program Files(x86)\QGIS\apps\qgis\python\qgis and C:\Program Files(x86)\QGIS\apps\qgis\python. My result so far is always the same:
import qgis.core ImportError: No module named qgis.core