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]

Let's do a test run. Copy that code and then post it somewhere so I can run it too. If it says XThacker, then it works, if it says RhinoRunner, then it doesn't work. Okay?

Profile icon
RhinoRunner

@XThacker
Alright here
https://repl.it/@RhinoRunner/os-test#main.py
for me it says:

RhinoRunner
Profile icon
[deleted]

@RhinoRunner
YAYAYAY for me it says XThacker. AND I pressed the run button. And youuur the owner. It works! :)

Profile icon
RhinoRunner

@XThacker
owo thanks!