Last active
August 29, 2015 13:58
-
-
Save scott-coates/10144393 to your computer and use it in GitHub Desktop.
Pycharm 3 & IntelliJ 13 don't honor the `working directory` option for remote python consoles. See here: http://youtrack.jetbrains.com/issue/PY-12239
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to Settings -> Console -> Python Console (Do not use Django Console - even if you plan to use this with a Django project) | |
# Ad this gist to the "starting script" option. | |
import os | |
# Chdir to "working directory" | |
os.chdir('/vagrant') | |
import sys | |
sys.path.extend([ '/home/vagrant/.pycharm_helpers/pycharm', '/home/vagrant/.pycharm_helpers/pydev']) | |
import django_manage_shell; django_manage_shell.run("/vagrant") | |
# Django 1.7 app loading | |
import django | |
django.setup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment