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 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 21; 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 key.
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
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
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?
--
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
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) , you
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?
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 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
import re
s1 ='nbsp;25000nbsp;'
s2 = 'nbsp;5.5910nbsp;'
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
On Sep 20, 4:12 pm, Tobiah [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I need to extract the number on each td tags from a html file.
i.e 49.950 from the following:
td align=right width=80font size=2 face=New Times
Roman,Times,Serifnbsp;49.950nbsp;/font/td
The actual number
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?
--
12 matches
Mail list logo