Skip to content
How do I get someone's repl username in python?
Profile icon
RhinoRunner

Is there a way for me to get someone's repl username when they press run on a program?
such as:

from repl import db username = #get the person's username for user in db.keys(): if username.lower() == user: print('That username is already in use!')

How can I do this?

You are viewing a single comment. View All
Profile icon
[deleted]

@RhinoRunner

import os username = os.environ['REPL_OWNER'] print(username)

Good luck!

πŸ˜ƒ

P.S. for the FNAF2, I love it. But...πŸ˜”, when BB comes in the vent, you said he won't jumpscare you, he will disable some stuffπŸ”¦.

He jumpscared😨 me.
Profile icon
RhinoRunner

@XThacker
hmm... gotta fix that!
Also, did you jump (from the audio)?

Profile icon
[deleted]

@RhinoRunner
duh. 😨😱

Profile icon
[deleted]

@RhinoRunner
did i answer your question<._.>

Profile icon
RhinoRunner

@XThacker
wait, when it says REPL_OWNER, is it the owner of the repl or is it the person who pressed run??

Profile icon
[deleted]

@RhinoRunner
LOL, of course the person who pressed run. I think. πŸ˜“. Lemme check

Profile icon
RhinoRunner

@XThacker
OK, if it is the person who presses run i will accept your comment!

Profile icon
Buhron

@RhinoRunner
the person who runned it