i have a script running a few commands on a network device. i can't seem to
figure out how to log both the input and output of what the pexpect script
initiates and responds to.
child = pexpect.spawn ('telnet '+ ip)
child.expect ('.*:*')
child.sendline (user)
child.expect ('.*:*')
child.sendline
Congrats. This will no doubt prove valuable to any Python programmer.
--
http://mail.python.org/mailman/listinfo/python-list
uot;command"] = self.quit
self.qbutton.pack(side = "top")
idata =
PhotoImage(file="/home/sj/documents/projects/xaed/images/cat_001.gif")
canvas = Canvas(width=300,height=200)
canvas.pack(side="top",fill=BOTH,expand=YES)
canv
Hi,
I have got a problem with importing global variables. For instance I have
got two files:
# t1.py #t2.py
counter = 1
def counter_adder(filenr): def show_adder():
global counter
Thanks, but my point wasn't fixing the bug. I'd like the logging
module to raise an exception on this occasion (rather than print and
consume the error) so that I can find the bug easily. If those two
lines were part of 10,000-line code, I'd have to check all logging
statements one-by-one.
--
h
Suppose the following are part of a long file and executed:
logging.basicConfig(stream = sys.stderr, level=logging.INFO)
logging.info("%d %d", 1, 2, 3)# buggy
Python prints the traceback of the error as follows:
Traceback (most recent call last):
File ".../local
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica