__pyclasspath__ - os.path.dirname() strange results

589 views
Skip to first unread message

Aljosa Mohorovic

unread,
Jan 7, 2010, 7:56:36 AM1/7/10
to django-jython-dev
i use this in settings.py:
---
import os

PROJECT_ROOT = os.path.dirname(__file__)
print "PROJECT_ROOT: ", PROJECT_ROOT

DEBUG = True
---

shell output:
---
(env)aljosa@aljosa-linux:~/Projects/dojtest$ jython portal/manage.py
runserver
PROJECT_ROOT: /home/aljosa/Projects/dojtest/portal
PROJECT_ROOT: __pyclasspath__/portal
Validating models...
0 errors found

Django version 1.1.1, using settings 'portal.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
---

is there something i'm doing wrong? what is __pyclasspath__?

Aljosa Mohorovic

Leo Soto

unread,
Jan 17, 2010, 11:52:31 AM1/17/10
to django-jython-dev
On Jan 7, 9:56 am, Aljosa Mohorovic <aljosa.mohoro...@gmail.com>
wrote:

> i use this in settings.py:
> ---
> import os
>
> PROJECT_ROOT = os.path.dirname(__file__)
> print "PROJECT_ROOT: ", PROJECT_ROOT
>
> DEBUG = True
> ---
>
> shell output:
> ---
> (env)aljosa@aljosa-linux:~/Projects/dojtest$ jython portal/manage.py
> runserver
> PROJECT_ROOT:  /home/aljosa/Projects/dojtest/portal
> PROJECT_ROOT:  __pyclasspath__/portal
> Validating models...
> 0 errors found
>
> Django version 1.1.1, using settings 'portal.settings'
> Development server is running athttp://127.0.0.1:8000/

> Quit the server with CONTROL-C.
> ---
>
> is there something i'm doing wrong? what is __pyclasspath__?

__pyclasspath__ is an special entry on sys.path which allows Jython to
load python code from locations pointed by CLASSPATH. Can you also
print what os.environ['CLASSPATH'] contains?


> Aljosa Mohorovic

Aljosa Mohorovic

unread,
Jan 17, 2010, 6:10:05 PM1/17/10
to django-jython-dev
On Jan 17, 5:52 pm, Leo Soto <leo.s...@gmail.com> wrote:
> __pyclasspath__ is an special entry on sys.path which allows Jython to
> load python code from locations pointed by CLASSPATH. Can you also
> print what os.environ['CLASSPATH'] contains?

i can't reproduce this situation anymore.

Aljosa

Reply all
Reply to author
Forward
0 new messages