Re: [Tutor] subprocess.Popen help

2014-01-29 Thread Mkhanyisi Madlavana
On 28 January 2014 21:52, leam hall wrote: > Python tutorial for 2.6 (using 2.4 -- don't ask), first code blurb under > 17.1.1 > > > http://docs.python.org/2.6/library/subprocess.html?highlight=subprocess#subprocess.Popen > > How would you make an ssh to another box put data back in "p"? The > go

Re: [Tutor] How to print certain elements

2014-01-21 Thread Mkhanyisi Madlavana
How would I print washington and monroe using [:]? print X[::3] How would I print every element but those two names? print X[1::2] On 21 January 2014 12:18, Alan Gauld wrote: > On 21/01/14 06:18, Adriansanchez wrote: > >> Hello everyone, >> I am newbie to Python and programming in general. My

[Tutor] Listing available variables

2009-12-24 Thread Mkhanyisi Madlavana
How do I list all the available variables in python. for example if I say: >>>a = range(10) >>>b = 16 >>>c = "" ... (some variables) >>>z = ["this","that","none"] I then need a command that will list the variables I assigned like: >>>some_command a, b, c, ... (some variables), z Regards Mkhanyisi

[Tutor] How do I plot a horizontal line and a vertical line in python

2009-12-04 Thread Mkhanyisi Madlavana
How can I do this using matplotlib? The snippet of my code looks like: k = 1.195*ones((1,data[0].size)) plot(data[0], k,'--') but I get this error: Traceback (most recent call last): File "./plot_detector.py", line 26, in plot(data[0], k,'--') File "/usr/lib/pymodules/python2.6/matplotli