On Thu, 2005-05-12 at 13:37 -0400, William O'Higgins wrote:
> I am trying to learn Python by translating some of my Perl scripts. One
> thing that is eluding me is assigning the results of system calls to
> variables. Here's what I want to do in Perl:
>
> $isxrunning = `ps -C startx | gr
On Thu, May 12, 2005 at 09:37:03PM +0200, Roel Schroeven wrote:
>William O'Higgins wrote:
>> It is a simple check to see if the X server is running (this is
>> inelegant, but it works - if you have a better way, I'd love to know
>> about it, but I would like to be able to do things like this in Pyt
William O'Higgins wrote:
> It is a simple check to see if the X server is running (this is
> inelegant, but it works - if you have a better way, I'd love to know
> about it, but I would like to be able to do things like this in Python -
> so I might better write scripts with it).
Checking for star
On Thu, 12 May 2005, William O'Higgins wrote:
> I am trying to learn Python by translating some of my Perl scripts. One
> thing that is eluding me is assigning the results of system calls to
> variables. Here's what I want to do in Perl:
>
> $isxrunning = `ps -C startx | grep "startx"`;
>
I am trying to learn Python by translating some of my Perl scripts. One
thing that is eluding me is assigning the results of system calls to
variables. Here's what I want to do in Perl:
$isxrunning = `ps -C startx | grep "startx"`;
if ($isxrunning =~ "startx") {
do somet