how to handle output generated after execution of command/script on host unix machine?

2010-12-19 Thread Darshak Bavishi
Hi Experts, I am still struggling with handling output generated after execution of command/script on host unix machine using windows client machine ssh code : import sys import datetime import time # setup logging paramiko.util.log_to_file('darshak_simple.log') ssh=paramiko.SSHClient() ssh.set

Re: get python bit version as in (32 or 64)

2010-12-19 Thread Ned Deily
In article , Ned Deily wrote: > In article > , > Vincent Davis wrote: > > On Tue, Oct 19, 2010 at 3:55 PM, Philip Semanchuk > > wrote: > > > On Oct 19, 2010, at 5:38 PM, Hexamorph wrote: > > >> On 19.10.2010 23:18, Vincent Davis wrote: > > >>> How do I get the bit version of the installed py

Re: how to measure TCP congestion windows using python ??

2010-12-19 Thread plz
hi many thanks for helping me i also tried to manipulate it last night here is my code... import socket import struct sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) tcp_info = sock.getsockopt(socket.SOL_TCP, socket.TCP_INFO, struct.calcsize('BBB')) print str

ANN: PyGUI 2.3.3

2010-12-19 Thread Greg Ewing
PyGUI 2.3.3 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Minor update to fix a problem with the previous release on some versions of MacOSX. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API

Re: Reading special Danish letters in Python

2010-12-19 Thread Vlastimil Brom
2010/12/19 Martin Hvidberg : > Dear list > > I have to read some data from an ASCII text file, filter it, and then export > it to a .dbf file. Basically a straight forward task... > My problem is that the input files contains some special national (Danish) > characters, and it appears that I have t

Reading special Danish letters in Python

2010-12-19 Thread Martin Hvidberg
Dear list I have to read some data from an ASCII text file, filter it, and then export it to a .dbf file. Basically a straight forward task... My problem is that the input files contains some special national (Danish) characters, and it appears that I have to do something special to handle the

Re: True lists in python?

2010-12-19 Thread Antoine Pitrou
On Sun, 19 Dec 2010 20:45:55 +0100 Stefan Sonnenberg-Carstens wrote: > Am 19.12.2010 07:18, schrieb Dmitry Groshev: > > Is there any way to use a true lists (with O(c) insertion/deletion and > > O(n) search) in python? For example, to make things like reversing > > part of the list with a constant

Re: True lists in python?

2010-12-19 Thread Ian Kelly
On Sun, Dec 19, 2010 at 5:59 AM, Vito 'ZeD' De Tullio wrote: > Steven D'Aprano wrote: > >> I can't see any way to go from this linked list: >> >> node1 -> node2 -> node3 -> node4 -> node5 -> node6 -> node7 >> >> to this: >> >> node1 -> node6 -> node5 -> node4 -> node3 -> node2 -> node7 >> >> in co

Re: True lists in python?

2010-12-19 Thread TomF
On 2010-12-18 22:18:07 -0800, Dmitry Groshev said: Is there any way to use a true lists (with O(c) insertion/deletion and O(n) search) in python? For example, to make things like reversing part of the list with a constant time. I assume you mean a C extension that implements doubly linked list

Re: True lists in python?

2010-12-19 Thread John Nagle
On 12/18/2010 10:41 PM, Dmitry Groshev wrote: On Dec 19, 9:18 am, Dmitry Groshev wrote: Is there any way to use a true lists (with O(c) insertion/deletion and O(n) search) in python? For example, to make things like reversing part of the list with a constant time. I forgot to mention that I m

Re: True lists in python?

2010-12-19 Thread Stefan Sonnenberg-Carstens
Am 19.12.2010 07:18, schrieb Dmitry Groshev: Is there any way to use a true lists (with O(c) insertion/deletion and O(n) search) in python? For example, to make things like reversing part of the list with a constant time. reversing part of the list could also be interpreted as reading it in the

Re: True lists in python?

2010-12-19 Thread Ulrich Eckhardt
Dmitry Groshev wrote: > Is there any way to use a true lists (with O(c) insertion/deletion > and O(n) search) in python? Inserting/deleting in the middle requires shuffling elements around, since Python's list is an array/vector. If you don't rely on the ordering, insert or delete at the end ins

Re: how to measure TCP congestion windows using python ??

2010-12-19 Thread Stefan Sonnenberg-Carstens
Am 19.12.2010 11:39, schrieb plz: hi! i'm newbie about python and i want to measure the value of cwnd in TCP socket. I have searched from an internet and got that we could handle it from SOL_TCP, TCP_INFO...since unix had #include and we could refer to tcp_info for getting the information o

Re: True lists in python?

2010-12-19 Thread Vito 'ZeD' De Tullio
Steven D'Aprano wrote: > I can't see any way to go from this linked list: > > node1 -> node2 -> node3 -> node4 -> node5 -> node6 -> node7 > > to this: > > node1 -> node6 -> node5 -> node4 -> node3 -> node2 -> node7 > > in constant time. You have to touch each of the nodes being reversed. very

Re: how to measure TCP congestion windows using python ??

2010-12-19 Thread Stefan Sonnenberg-Carstens
Am 19.12.2010 11:39, schrieb plz: hi! i'm newbie about python and i want to measure the value of cwnd in TCP socket. I have searched from an internet and got that we could handle it from SOL_TCP, TCP_INFO...since unix had #include and we could refer to tcp_info for getting the information o

how to measure TCP congestion windows using python ??

2010-12-19 Thread plz
hi! i'm newbie about python and i want to measure the value of cwnd in TCP socket. I have searched from an internet and got that we could handle it from SOL_TCP, TCP_INFO...since unix had #include and we could refer to tcp_info for getting the information of TCP by using this method but i do

Re: True lists in python?

2010-12-19 Thread Christian Heimes
Am 19.12.2010 09:24, schrieb Paul Rubin: > Deques are not linked lists. They're just like regular Python lists > (i.e. resizeable arrays) except they can grow and shrink at both ends > rather than just one. The amortized complexity of an append or pop > operation (at either end) is O(1) but occas

Re: True lists in python?

2010-12-19 Thread Steven D'Aprano
On Sat, 18 Dec 2010 22:18:07 -0800, Dmitry Groshev wrote: > Is there any way to use a true lists (with O(c) insertion/deletion and > O(n) search) in python? Python lists have amortized constant time insertion and deletion at the end of the list, O(N) insertion and deletion at the beginning of t

Re: If/then style question

2010-12-19 Thread Steven D'Aprano
On Sat, 18 Dec 2010 19:59:45 -0800, Carl Banks wrote: > On Dec 17, 12:23 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> On Thu, 16 Dec 2010 20:32:29 -0800, Carl Banks wrote: >> > Even without the cleanup issue, sometimes you want to edit a function >> > to affect all return values

Re: True lists in python?

2010-12-19 Thread Paul Rubin
Dmitry Groshev writes: > -I can't find any information about reverse's complexity in python > docs, but it seems that deque is a linked list. Maybe this is the one > I need. Deques are not linked lists. They're just like regular Python lists (i.e. resizeable arrays) except they can grow and shri