[Tutor] os.system() not working

2013-08-27 Thread Nitish Kunder
Hii
I have a python program which i am calling from a php script.
The arguments to the program is a path to the file
The program when directly run from console executes normally.
But when I try to execute the program from browser ie call the python
script from php,
os.system command is not working what might be the problem.
Thanks
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Dictionary from a text file

2013-10-31 Thread Nitish Kunder
I have a dictionary which is in this format
for ex:

{
'5x' : {
'50' : {
'update' : {
'update-from-esxi5.0-5.0_update01' : {
'call' : Update,
'name' : 'Update50u1',
'release' : '15/03/12'
},
'update-from-esxi5.0-5.0_update02' : {
'call' : Update,
'name' : 'Update50u2',
'release' : '21/12/12'
},
},
 'patch' : {
'ESXi500-201109001' : {
'call' : Patch,
'name' :'Patch_501',
'release' : '13/09/11'
},
'ESXi500-20001' : {
'call' : Patch,
'name' :'ExpressPatch501',
'release' : '13/09/11'
},
 },
},
 '51' : {
'update' : {
'update-from-esxi5.1-5.1_update01' : {
'call' : Update,
'name' : 'Update51u1',
'release' : '25/04/13'
},
},
'patch' : {
'ESXi510-201210001' : {
'call' : Patch,
'name' :'ExpressPatch511',
'release' : '29/08/13'
},
'ESXi510-201212001' : {
'call' : Patch,
'name' :'Patch_511',
'release' : '20/12/12'
},
 },
},
},
 }

Note: in* 'call' : Update* ,Update it is a function defined in my python
script. My dictionary is too large so i taught rather than using directly
in python program I save it in a text file and when needed i assign it to
dictionary object . How can i assign this text file to dictionary object
and call it?

Thanks for you help
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor