Python Forum
Getting wanted data from the 'top' command (Linux)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting wanted data from the 'top' command (Linux)
#3
Ah that's perfect! Thanks

Thanks again... Here's what I ended up using:

    for k, v in enumerate(chain.from_iterable(info.items() for info in Top().run_top())):
        if k < 2 or 'command_path' in v:
            print("%s: %s\n" % (v[0],  v[1]))
        else:
            print("%s: %s" % (v[0], v[1]))
Reply


Messages In This Thread
RE: Getting wanted data from the 'top' command (Linux) - by rootVIII - Nov-10-2018, 05:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Command output to pdf (linux) Gribouillis 0 5,065 Mar-05-2021, 07:35 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020