Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > I don't why there is no output....

Reply
Thread Tools

I don't why there is no output....

 
 
chad
Guest
Posts: n/a
 
      12-25-2010
Given the following...

#!/usr/bin/python

import pexpect

p = pexpect.spawn('cat')
p.sendline('1234')
p.expect (['1234'])
p.expect (['1234'])

I no output when I run it...

[cdalten@localhost oakland]$ ./ecat.py
[cdalten@localhost oakland]$

I don't get it. I was expecting to see the output from both the tty
and cat. Instead, I see nothing. Why?
 
Reply With Quote
 
 
 
 
chad
Guest
Posts: n/a
 
      12-25-2010
On Dec 24, 4:00*pm, chad <(E-Mail Removed)> wrote:
> Given the following...
>
> #!/usr/bin/python
>
> import pexpect
>
> p = pexpect.spawn('cat')
> p.sendline('1234')
> p.expect (['1234'])
> p.expect (['1234'])
>
> I no output when I run it...
>
> [cdalten@localhost oakland]$ ./ecat.py
> [cdalten@localhost oakland]$
>
> I don't get it. I was expecting to see the output from both the tty
> and cat. Instead, I see nothing. Why?


Never mind. I figured it out.
 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      12-25-2010
On Fri, 24 Dec 2010 16:22:18 -0800, chad wrote:

>> I don't get it. I was expecting to see the output from both the tty and
>> cat. Instead, I see nothing. Why?

>
> Never mind. I figured it out.


Well, don't keep us in suspenders. What was the problem?


--
Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM
Why, why, why??? =?Utf-8?B?VGltOjouLg==?= ASP .Net 6 01-27-2005 03:35 PM
Why Why Why You HAVE NO IDEA MCSE 31 04-24-2004 06:40 PM



Advertisments