osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue in parsing the strings in python code


On 12/11/2018 09:37, srinivasan wrote:
> Because the problem is every time when ever I see the output  using the
> "nmcli c show", the below output is the weird output, so instead of
> connecting to SSID "NIFunkloch" it randomly connects to "NIFunkloch 1552"
> or sometimes to NIFunkloch 1000" or so on
> 
> root:~/qa/robot_tests# nmcli c show
> NAME                UUID                                  TYPE      DEVICE
> 
> NIFunkloch 1552     c8e1e8c0-0f25-4299-a9ae-2910cfef2ebd  wifi      wlp1s0
> 
> Wired connection 1  2a14fbe6-58a0-3b7f-b986-5d1b36a94ec0  ethernet
> enp0s21f0u4
> NIFunkloch          1da7d068-4548-4446-bf88-a440e49db1b1  wifi      --

[snipped for brevity]

That looks conveniently aligned.  Can't you just slice each line to get 
the entries you are after?


-- 
Rhodri James *-* Kynesim Ltd