finally following code works,
import pexpect, sys
cmd = '/usr/bin/rsync config [EMAIL PROTECTED]:/tmp/.'
#cmd = 'ssh [EMAIL PROTECTED]'
child = pexpect.spawn(cmd)
child.logfile = sys.stdout
passwd = 'qwe123'
i = 0
try:
while i == 0:
i =
child.expect(['Password:','Password:
i put while True: before top of line, i=child.expect() . it worked, the file
has gone but also it goes into loop with many EOF result, i tried the
os.waitpid() function with child.pid but didnt help me. still couldn`t get
the problem.
thanks for help
On Thursday 15 June 2006 12:04, Ganesan Raj
thanks for reply, i add the line you suggested, thats what i get
[EMAIL PROTECTED]:~/tmp/multi_server$ python deneme.py
Password: qwe123
finished
Exception pexpect.ExceptionPexpect: in > ignored
does rsync may cause a problem while trying to fork-exec ssh ?
> Add "child.logfile = sys.stdout" he
hi,i have found expect method for this purpose. i`m trying to use pexpect but following code gives me an something strange as a result.# The CODEimport pexpectcmd = '/usr/bin/rsync config [EMAIL PROTECTED]:/tmp/.'
#cmd = 'ssh [EMAIL PROTECTED]'child = pexpect.spawn(cmd)passwd = 'qwe123'try:
hello,
i want to use rsync for remote file transfer via popen, but couldnt pass the
Password yet.
here`s what i did
cmd = 'rsync -av config [EMAIL PROTECTED]:/tmp/.'
f = os.popen(cmd,'w')
f.write('1234')
#not worked
f.write('1234\n')
#not worked
every time i see "Password:" line, then i tried p
hello,
i want to use rsync for remote file transfer via popen, but couldnt pass the
Password yet.
here`s what i did
cmd = 'rsync -av config [EMAIL PROTECTED]:/tmp/.'
f = os.popen(cmd,'w')
f.write('1234')
#not worked
f.write('1234\n')
#not worked
every time i see "Password:" line, then i tried p
i am unix platform, now searching for the mkfifo topics.
thank you all.
--
http://mail.python.org/mailman/listinfo/python-list
hello all,
i searched and google long long time but couldnt find any result, i
want pop the first line from file, i dont want to read all file
contents because file is being updated from another proccess. even i
couldnt realize its algorithm, thanks for any suggestion
--
http://mail.python.org/mai
thank you but also i need a pid.also react like an os.P_NOWAIT.
if i summarize,
child proccess immediately returns the pid, if child exits also
returns the exit/error code :)
--
http://mail.python.org/mailman/listinfo/python-list
hi, i am using os.spawn function, it works well but i need a flag that
allows function return the process id with exit/error code, is there
any or how can i do it, i can replace spawn with fork/exec if
necessary.
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Monday 12 December 2005 03:34 pm, Fredrik Lundh wrote:
> Sinan Nalkaya wrote:
> > hi i want to write a program that makes a video of my desktop, i think
> > that can be via return or output xwd functions in X11 lib then through to
> > the mpeg video encoding codes, h
hi i want to write a program that makes a video of my desktop, i think that
can be via return or output xwd functions in X11 lib then through to the mpeg
video encoding codes, hmm is there an easier solution to this via python?
thanks for your attention.
--
http://mail.python.org/mailman/listin
Bengt Richter wrote:
>On Mon, 21 Nov 2005 10:35:20 +0200, Sinan Nalkaya <[EMAIL PROTECTED]> wrote:
>
>
>
>>Dennis Lee Bieber wrote:
>>
>>
>>
>>>On Fri, 18 Nov 2005 22:45:37 -0500, Peter Hansen <[EMAIL PROT
Petr Jakes wrote:
>To provide some feedback:
>As Grant Edwards posted in this list, I was running my code inside of
>IDE that replaces sys.stdin with some other. While running the program
>from a shell prompt, everything goes fine.
>Petr Jakes
>
>
>
have you tried it with root account ?
--
h
Dennis Lee Bieber wrote:
>On Fri, 18 Nov 2005 22:45:37 -0500, Peter Hansen <[EMAIL PROTECTED]>
>declaimed the following in comp.lang.python:
>
>
>
>>It's quite unclear whether the last part, above, is one of your
>>*requirements*, or a description of a problem you are having with your
>>curren
hello,
i need a function like that,
wait 5 seconds:
(during wait) do the function
but function waits for keyboard input so if you dont enter any it waits
forever.
i tried time.sleep() but when i used time.sleep in while, the function
in while never executed.
then i found something about Timer
Paul Watson wrote:
>Sinan Nalkaya wrote:
>
>
>>hello everybody,
>>how can i just get 1 character ? i`ve done a search but just found
>>getch() for windows, i need same for unix and raw_input has any option
>>that is not documented ?
>>thanks.
hello everybody,
how can i just get 1 character ? i`ve done a search but just found
getch() for windows, i need same for unix and raw_input has any option
that is not documented ?
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
hi i have some python practice and want to develop tiny prgramme that
takes screen shots from command line, im using gnome now but my
programme should support the others especially pure X - window. also i
want to learn some more about inside when taking screen shots.
thanks.
--
http://mail.pyth
hi,
im using curses library in my program, i need a button. but i cannot
find anything about it. should i do the button via newwin function with
bold characters ?
any help will be appreciated
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
thank you very much for your suggestions and links, also slang got my
attention.
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
hi, i want to use ncurses library in python i`ve found proper library
for that, PyNcurses.
then i searched for some documentation about ncurses programming, i only
found that web site ;
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
this howto is nice but seems to me, this is for experience
Thomas Guettler wrote:
>Am Thu, 15 Sep 2005 14:36:38 +0300 schrieb Sinan Nalkaya:
>
>
>
>>i re-format incoming messages like this,
>>command = re.findall("^\002(.{2})\|.*\003$", response)[0]
>>it works well but when response comes with escape characte
i re-format incoming messages like this,
command = re.findall("^\002(.{2})\|.*\003$", response)[0]
it works well but when response comes with escape characters , my
command variable crashes,
i cannot parse if response variable is like ,
response = '\002AB|TIasdasdasd
asdasdasd
xzczxc
qwewer
werwer
24 matches
Mail list logo