I have created a form that takes server ip, username and password. I use
pexpect to ssh into remote server, run a particular command and get basic
data related to that server. I am creating the form using controller and
also doing ssh in same controller and returning both form and processed
The Following code is giving gluon.rocket.SocketTimeout'(Socket timed out
before request error
{{extend 'layout.html'}}
{{import xml.etree.ElementTree as ET}}
h1
This is a Stations detail page
/h1
{{
filename = xmlfile
with open(filename, mode=r) as fp:
for line in fp:
print line
I am reading data from remote machine and converting it into dictionary
format
like
{IP: [192.111.111.111, 222.222.222.222, 333.333.333.333], MAC:
[aa:aa:aa:aa, bb:bb:bb:bb, cc:cc:cc:cc], conn: [wireless, wireless,
wireless]}
I am sending this dictionary to view which is index.html where I
I am trying to spawn a shell to remote machine in web2py and I am getting
following exception
Cannot import module 'pexpect'
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
I have controller in web2py as below
# coding: utf8
# try something like
#!/usr/local/python2.7
def index():
import pexpect
import sys
import time
import cgi, cgitb
import getpass
import urllib3
import elementtree.ElementTree as ET
ssh_cmd = 'ssh -t'
5 matches
Mail list logo