[pydev - Users] Set environment variable in PyDev Console?

View: New views
2 Messages — Rating Filter:   Alert me  

[pydev - Users] Set environment variable in PyDev Console?

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=5066086
By: amallavarapu

Hi - I'm trying to get the PyDev Console (accessible via the Ppen Console drop-down
button) to start with default environment variables.  Specifically, I need
DJANGO_SETTINGS_MODULE to be set to myproject.settings.  I was able to set up
a Run configuration for python.exe with Arguments = "-i",
DJANGO_SETTINGS_MODULE=myproject.settings (via the Environment tab), but this
console doesn't have code-completion like the built-in PyDev console.

I can manually set os.environ['DJANGO_SETTINGS_MODULE']='myproject.settings'
each time I start a PyDev console, but I figured there must be an easier way.
Any suggestions?

Alternatively - is there a way to get a run-configuration with python.exe to
support code completion?



______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: Set environment variable in PyDev Console?

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=5072356
By: fabioz

Humm...

There are currently no default settings for that... I think that one solution
would be configuring the initial interpreter commands in the interactive console
preferences (window > preferences > pydev > interactive console) to add the
os.environ['DJANGO_SETTINGS_MODULE']='myproject.settings'.

Cheers,

Fabio

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users
LightInTheBox - Buy quality products at wholesale price