I did try to excute the ssh and shell ls grep command in all in one
like so:
ssh [EMAIL PROTECTED] "ls mytest.log > /dev/null 2>&1; echo $?"
This seem to work, but also throwing exceptions. Also, including ssh
and shell command together would be a problem when I later add a pass
phrase to ssh k
I don't get 0 or 2(excuting ls command exit code)
from result.split('\r\n')[0] or result.split('\r\n')[1]. I have to
try another method.
Regular shell ssh login:
[EMAIL PROTECTED] ~]$ ssh [EMAIL PROTECTED]
Last login: Mon Dec 31 20:51:09 2007 from com1
[EMAIL PROTECTED] ~]$
Pexpect Login:
>>> i
1) what are these characters:
\x1b]0;
~\x07\x1b[?1034h
in line '\x1b]0;[EMAIL PROTECTED]:[EMAIL PROTECTED] ~]'?
2) Also, how come I don't get 0 or 2(excuting ls command exit code)
from result.split('\r\n')[0] or result.split('\r\n')[1] ?
This is what I get:
>>> import pexpect
>>> child=pexpect.s
I need to ssh into a remote machine and check if mytest.log file is
there. I have setup ssh keys to handle login authentications.
How do I determine if mytest.log is there by using Pexpect. What I
have done so far is spawned a child for ssh.
1) Now what do I do to execute shell_cmd(ls and grep),
Right now I am trying to install pydev 1.3.10 on Eclipse 3.3. I am
getting an Mylar
error org.eclipse.mylar (2.0.0.v20070403-1300) or something needed.
Mylyn is mylar, now.
How do you disable the mylar dependency, so that Mylyn is used by
PyDev?
--
http://mail.python.org/mailman/listinfo/python-
I wrote a python code in linux text pad and copied to thumb drive and
try to ran the file by changing the path to windows:
sys.path = sys.path + ['D:\Python24\Lib\site-packages\mycode]
I get the following error:
ValueError: invalid \x escape
I am pretty sure this problem is due some kind of lin
Why you specify type and name of the exception in your custom
exceptions,
but not in built in exceptions
except IOError:
print "no file by the name ccy_rates*.txt"
except MyError, e:
print e.msg
Also, when you do:
try: raise MyError(23)
In "try: MyError(23) ", y
when I do this in my python code and run it in windows xp, it creates
ctemp//.../.../../ so on and creates file t. Not file starting
with the name complist and ending with .txt (complist*.txt). Any idea
why this may be? glob only works in *nix not on windows?
os.renames(glob.glob('complist*.
import re
s1 =' 25000 '
s2 = ' 5.5910 '
mypat = re.compile('[0-9]*(\.[0-9]*|$)')
rate= mypat.search(s1)
print rate.group()
rate=mypat.search(s2)
print rate.group()
rate = mypat.search(s1)
price = float(rate.group())
print price
I get an error when it hits the whole number, that is in this forma
print all_tds[0].string
print all_tds[8].string
On Sep 21, 3:38 am, 7stud <[EMAIL PROTECTED]> wrote:
> On Sep 20, 9:04 pm, crybaby <[EMAIL PROTECTED]> wrote:
>
> > I need to traverse a html page with big table that has many row and
> > columns. For example, how to go
I need to traverse a html page with big table that has many row and
columns. For example, how to go 35th td tag and do regex to retireve
the content. After that is done, you move down to 15th td tag from
35th tag (35+15) and do regex to retrieve the content?
--
http://mail.python.org/mailman/li
On Sep 20, 4:12 pm, Tobiah <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I need to extract the number on each
> > i.e 49.950 from the following:
>
> > 49.950
>
> > The actual number between: 49.950 can be any number of
> > digits before decimal and after decimal.
>
> > ##.
12 matches
Mail list logo