3.131.13.37 |    

Navigation

Google Advertisement

This construct expant the python path from the working directory (scriptdir) about the two relative directorys lib/ and etc/.

libdir
  1. import os, sys
  2.  
  3. # Get the script directory.
  4. scriptdir =  os.path.abspath( os.path.dirname( sys.argv[0] ) )
  5.  
  6. # Expant the python path for config and library directory.
  7. sys.path[1:2] = ( scriptdir + os.sep + 'etc', scriptdir + os.sep + 'lib' )
Parsed in 0.001 seconds at 216.32 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 3 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)