Find the answer to your Linux question:
Results 1 to 5 of 5
I have Django installed and now I need to copy it to Python directory. Where is it? How can I find it?...
  1. #1
    Just Joined! NeoPjcpp's Avatar
    Join Date
    May 2008
    Posts
    51

    Where's the Python directory

    I have Django installed and now I need to copy it to Python directory. Where is it? How can I find it?

  2. #2
    Just Joined! NeoPjcpp's Avatar
    Join Date
    May 2008
    Posts
    51
    I figured this one out. It's in /usr/lib. Now the new question is, how can I set the environment variable for Django so I can use its admin interface?

    I'm sure it's a general question, how can we set up evrironment variable/path? Help appreciated.

  3. #3
    Content Team _madman_'s Avatar
    Join Date
    Jun 2006
    Posts
    53
    in Bash:

    Code:
    export VARIABLE_NAME=/path/to/where/ever

  4. #4
    Just Joined! NeoPjcpp's Avatar
    Join Date
    May 2008
    Posts
    51
    Thanks. Is editing /etc/profile equivalent to that?

  5. #5
    Content Team _madman_'s Avatar
    Join Date
    Jun 2006
    Posts
    53
    Yes and no.

    You should really read the Bash man page. Especially the section titled " INVOCATION ". It depends on how bash / sh is invoked, whether or not the /etc/profile will be parsed as expected. I personally noticed that in some situations my env variables were not set as expected.

    To test your theory, put it the line in /etc/profile , then try:

    Code:
    echo $VARIABLE_NAME
    ...in several different manners. For example: At a fresh reboot (after login at the VT console, inside of an xterm (or equivalent), and even inside a script:

    Code:
    cat > ~/testing.sh << "EOF"
    #!/bin/sh
    
    echo $CHANGE_THIS_TO_VARIABLE
    
    #no equals sign though - because we are testing, not setting.
    EOF
    
    chmod a+x ~/testing.sh
    ..cut & paste the above commands at the prompt to create a "testing.sh" shell script inside your home directory and change its permissions to executable. Try running this script from the console and inside an Xterm too. If it produces just a blank line, then the variable is not set.

    You can also issue :

    Code:
    env
    ...at any time to list all the environment variables in your current shell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •