Change UserPreferencesFilePaths using Python Does anyone know how to change the script directory in the user preferences using Python from command line?

I believe it has something to do with bpy.types.UserPreferencesFilePaths, but I'm not sure how to use it.

Please help, thanks!
import bpy
from bpy import context
path = "/somepath"
context.user_preferences.filepaths.script_directory = path