import sys
sys.path.append("M:\mayascripts")
import HelloWorldWhereas the MEL source command allows for absolute paths:
source "C:/users/paul/desktop/something.mel"Or set the environment variables MAYA_SCRIPT_PATH for MEL and the PYTHONPATH for Python to the scripts directory. Also note Maya will automatically source all your MEL files, but Python scripts must always be manually imported.
If you are going to be editing the env variables you will need to restart Maya for changes to take affect.
