Hi All,
I'm having a python script: test.py
in /path/to/script/test.py
I'm using a properties file: test_properties.py
(it is having values as dictionary{}) which is in same DIR as the script.
Sample Properties file:
params = {
'target_db' : 'a1_db'
'src_db' : 'src1_db'
'countryCode' : 'cc'
'date_1' : 'start_date'
'date_2' : 'end_date'
}
My sample code:
==============
from test_properties import *
It is working fine.
//Issue//
Now I'm keeping the properties file in: /path/to/config
DIR and referring it in my script.
I have tried:
==========
fileName1=os.path.join('/path/to/config','test_properties.py')
from fileName1 import *
It is giving error:
==============
ImportError: No module named fileName1
I'm using python version 2.6 (default with Linux as of now in all Non-PROD serves) and I have requested Admin to to upgrade/install python 3.4+
Please help.
Thanks,
Saptarshi