Python Forum
looking 4 py code: commang logger
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking 4 py code: commang logger
#1
i have already implemented one of these in bash.  it's kinda big and awkward (no, it doesn't use awk).  it does use the script command for the terminal environment.  it names the log file with a date and time. there are options: -s to add a suffix to the name, -p to add a prefix to the name, -d to put the log file in a specified directory, and -f to specify a full file name.  the options precede the command to be run and logged (both stdout and stdin).  what else do you think this could use for features and/or options (in case i re-implement this in python3)?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
This can be done with the linux audit system but I never used it.

Have you seen ttyrec? It's on top of script

On the question... Except of logging, sharing the sessions ( with educational purpose ) I can not think of anything else right now
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
ttyrec is in C.  i want to do it in Python3.

i have used my own logcmd, the one i wrote in bash many years ago, a few times today. one of them was running my weekly scripted rsync backup.  maybe i should redo that in Python3 soon.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

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