Python Forum
Is there a better way of formatting os.uname() output?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a better way of formatting os.uname() output?
#4
(Aug-27-2021, 05:56 PM)snippsat Wrote: If can write cross platform try to do that,os.uname only work on Linux.

This isn't an issue as what I'm planning on making is for Unixes only.

At any rate, Larz60+'s post put me on the right track. The previous f-string code was replaced with the following:

self.info = ""
for item in os.uname():
    self.info += item + "\n\n"
Reply


Messages In This Thread
RE: Is there a better way of formatting os.uname() output? - by CodeWolf - Aug-27-2021, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Formatting float number output barryjo 2 1,014 May-04-2023, 02:04 PM
Last Post: barryjo
  Formatting to output file Mark17 2 1,388 Jan-13-2022, 09:06 PM
Last Post: BashBedlam
  Is there a better way to print uname information? EkaCaesium 4 3,908 Apr-26-2021, 12:51 PM
Last Post: EkaCaesium
  Output formatting Steffenwolt 0 2,232 Jan-18-2018, 03:47 PM
Last Post: Steffenwolt

Forum Jump:

User Panel Messages

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