Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
he he :) On Fri, Mar 1, 2013 at 7:59 PM, Sergiy Khohlov wrote: > take a look > https://docs.djangoproject.com/en/dev/topics/logging/ > > using paramiko inside views ... I would like to say that you know a > meaning of the sex :-) > > Many thanks, > > Serge > > > +380 636150445 > skype: skhohl

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread Sergiy Khohlov
take a look https://docs.djangoproject.com/en/dev/topics/logging/ using paramiko inside views ... I would like to say that you know a meaning of the sex :-) Many thanks, Serge +380 636150445 skype: skhohlov On Fri, Mar 1, 2013 at 4:26 PM, JAI PRAKASH SINGH < jaiprakashsingh...@gmail.com> w

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
No Tom it just a part of code from django views i just want to know .. is any another systemcall i should use to log a file ??? or if u have batter option to log a file please share ... i will thankfull to u .. till thenn i m posting it to python post also.. On Fri, Mar 1, 2013 at 7:38 PM, JAI

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
No Tom it just a part of code from django views i just want to know .. is any another systemcall i should use to log a file ??? or if u have batter option to log a file please share ... i will thankfull to u .. till thenn i m posting it to python post also.. On Friday, March 1, 2013 6:33:05 P

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread Tom Evans
On Fri, Mar 1, 2013 at 11:29 AM, JAI PRAKASH SINGH wrote: > import sys,os > sys.stderr = open('/dev/null') > import paramiko > sys.stderr = sys.__stderr__ > > os.system("echo \'s3\' >> myfile.txt ") #debug first in ssh2 > def ssh2_connect(host, user, pswd, port=22): > try: > ssh = par

os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
import sys,os sys.stderr = open('/dev/null') import paramiko sys.stderr = sys.__stderr__ os.system("echo \'s3\' >> myfile.txt ") #debug first in ssh2 def ssh2_connect(host, user, pswd, port=22): try: ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.set_missin