core.setObserverLocation() can also accept a single string argument for a location in Stellarium's default list (the one in the Location window). So for example, you can use this:
Code:
// Save the current location, if it's from the default list
location = core.getObserverLocation();
// Set the location to Sydney
core.setObserverLocation("Sydney, Australia");
And when you finish:
Code:
core.setObserverLocation(location); //Restore the original location