Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to put users in a dictionary?
Post: RE: How to put users in a dictionary?

Thank you for the response, but i meant my the users with pwd.getpwall.
nostradamus64 General Coding Help 3 2,072 May-09-2021, 10:22 PM
    Thread: How to put users in a dictionary?
Post: How to put users in a dictionary?

How do i put my users in a dictionary, then access the key value pairs uid, name and shell?
nostradamus64 General Coding Help 3 2,072 May-09-2021, 10:10 PM
    Thread: function that returns a list of dictionaries
Post: RE: function that returns a list of dictionaries

(May-06-2021, 09:42 PM)snippsat Wrote: # result.py from my_record import foo def bar(): print(f'The car vaules is <{foo()[1].get("car")}>') bar()Output:The car vaules is <641>Look ...
nostradamus64 General Coding Help 2 1,740 May-06-2021, 09:58 PM
    Thread: function that returns a list of dictionaries
Post: function that returns a list of dictionaries

Hello everyone, i want to create a function that returns a list of dictionaries with my users in Python. I dont want it to print out something, i want to use this module for another script. How do i g...
nostradamus64 General Coding Help 2 1,740 May-06-2021, 09:03 PM
    Thread: format the output from a nested dictionary.
Post: RE: format the output from a nested dictionary.

Thank you all for your replies, the output is as i wanted it to print out.
nostradamus64 General Coding Help 9 4,514 May-03-2021, 04:45 PM
    Thread: format the output from a nested dictionary.
Post: RE: format the output from a nested dictionary.

(May-03-2021, 07:50 AM)perfringo Wrote: You can pass formatting with f-strings so little adjustment to menator01 code would deliver required result (numbers are aligned to right and text to left whi...
nostradamus64 General Coding Help 9 4,514 May-03-2021, 04:35 PM
    Thread: format the output from a nested dictionary.
Post: RE: format the output from a nested dictionary.

(May-03-2021, 01:54 AM)bowlofred Wrote: If you want formatting, I prefer using a formatting package. tabulate has worked well for me. from tabulate import tabulate currentuser ={'root':{'uid': 0,...
nostradamus64 General Coding Help 9 4,514 May-03-2021, 06:29 AM
    Thread: format the output from a nested dictionary.
Post: RE: format the output from a nested dictionary.

(May-02-2021, 11:19 PM)menator01 Wrote: currentuser ={'root':{'uid': 0,'username': 'root' ,'shell': '/bin/bash'}, 'daemon': {'uid': 1,'username': 'daemon' ,'shell': '/usr/sbin/nologin'}, 'bin': {'ui...
nostradamus64 General Coding Help 9 4,514 May-03-2021, 06:27 AM
    Thread: format the output from a nested dictionary.
Post: format the output from a nested dictionary.

Hello everyone im trying to make my codes output to look like this output, without any trailing or leading symbols. Any tips on how i can do that? The expected output should look like this. Output:...
nostradamus64 General Coding Help 9 4,514 May-02-2021, 10:37 PM

User Panel Messages

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