Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

I can't get my password masked using Python trying getpass, getpass4, pwinput or maskpass in Pycharm [duplicate]

I have tried a number of packages in an attempt to input my password but have it masked but none of these worked for me in Pycharm. I ran the same code in Jupyter and it worked. I wonder if this is a ...
Dev_Reka's user avatar
0 votes
0 answers
20 views

How to determine the user in a python script (ran by supervisord)

I have a python script that is started by supervisor. In supervisor's myapp.conf I have set the user=app_api as the user the script should be run under. supervisor's myapp.conf : [program:api] ...
lukik's user avatar
  • 4,050
0 votes
1 answer
33 views

Python: save output file with the logged-in username appended to the file name

I have a python program that creates an output file. That all works correctly. However, I'd now like to save the python output file with a "_username" appended to the filename. I have ...
thepen's user avatar
  • 1
0 votes
0 answers
43 views

python input() not printing to screen when piping to another command [duplicate]

I have a simple python program that is using input to get a username and password, ie: from getpass import getpass username = input("Username: ") password = getpass() When i run the ...
feeble's user avatar
  • 309
2 votes
1 answer
203 views

Can't pass password to SSH by getpass

I have code like under: def acces_machine_connnect(): print(namess.secnd_banner) login = input('Login: ') passwd = getpass.getpass('Password:') ssh_proxy = paramiko.SSHClient() ...
Mateusz Plsz's user avatar
-4 votes
2 answers
5k views

How to use getpass library in python

I'm trying to use getpass library in python but I can't. Can somebody help me to use it in vscode? I tried: Getpass import as input but it didn't work.
Arya Tavana's user avatar
1 vote
1 answer
137 views

getpass behaves different in pychram IDE and terminal

paaword.py is a script where getpass() asked the user about the password and validates it. but i want to automate the whole process and used subprocess for it (main.py). And i am using python3.10 ...
Rabia Hussain's user avatar
0 votes
0 answers
210 views

Not able to pipe through a inputpassword in python

I am trying to pass this pipe stnd input from a script password.py. this script excepts a password from user. but it is not allowing me to see by piping the input through a screen from subprocess. I ...
Rabia Hussain's user avatar
0 votes
0 answers
147 views

Undefined reference to 'getpass' in c

#include <stdio.h> #include <unistd.h> int main() { char *itm; char *qnt; qnt,itm = getpass(""); printf("%s %s ",qnt,itm); return 0; } So if i run this ...
xGT_007's user avatar
4 votes
1 answer
146 views

How to add '\n" to a variable value to submit it as an input of remote process via Paramiko

I am working with Paramiko on Linux, I would like to know if I can send a variable to shell. I want to enter to "enable mode" of a Cisco router. But I don't want to hard-code the password in ...
MadChabelo's user avatar
1 vote
1 answer
380 views

Pyinstaller with concurrent.futures executing function call on every process start

Edit: So I've been playing around with this; placing the getpass() call under the if name block, placing it in main, outside of main, the big issue is when it runs in the IDE or CLI normally it works ...
Rufom1's user avatar
  • 99
1 vote
1 answer
791 views

Is it possible to hide the getpass() warning?

Is it possible to hide the message that gets displayed if getpass() cannot hide the message? GetPassWarning: Can not control echo on the terminal. Warning: Password input may be echoed. Is it ...
neur0n-7's user avatar
0 votes
0 answers
401 views

Telnet login in python

I have been trying to make a automated python login system, but I keep getting this error: Traceback (most recent call last): File "/home/kali/py.py", line 14, in <module> tn....
BOBERT's user avatar
  • 13
1 vote
2 answers
718 views

Python get user input password with timeout

I'm writing a Python application and would like to prompt a user for their password. If they do not enter it within 60 seconds, the program should exit. If they do enter it, their password should be ...
whoopscheckmate's user avatar
0 votes
1 answer
332 views

Python getpass works at second attempt when in separate module

I try to use a seperate Module with a getpass() function in it, e.g. #! /usr/bin/python3 from getpass import getpass import sys def mypass(): try: password = getpass('Password: ') ...
mxFrank's user avatar
  • 11
2 votes
3 answers
903 views

trainer.train() in Kaggle: StdinNotImplementedError: getpass was called, but this frontend does not support input requests

When saving a version in Kaggle, I get StdinNotImplementedError: getpass was called, but this frontend does not support input requests whenever I use the Transformers.Trainer class. The general code I ...
Riccardo Bassani's user avatar
0 votes
0 answers
307 views

How to fake user input in python

I recently came across this website. In the implore bar, if you type "/" and then some random letters, it will look like you are not typing that and are instead typing "Sam says sweet ...
Rebecca's user avatar
  • 33
0 votes
1 answer
116 views

Using getpass() fails in the self.__init__() method but works fine when used functionally. Why is this?

I can't work out what I'm doing wrong here. I want to set up a new user if this class is instantiated and there is no user already pickled. My __init__ method currently looks like this: class User: ...
nihilok's user avatar
  • 1,993
0 votes
1 answer
904 views

Is there method such that password won't be echoed on cmd while passing it as command line argument?

I am trying to build a Python application for running in various platforms, for that I am adding command line options for parameters, two of which is username and password. For password, I don't want ...
M S's user avatar
  • 3
0 votes
0 answers
939 views

How to turn off ECHO in IDLE python as i have to use it to maskpasswords

[GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license()" for more information. >>> import getpass >>> f=getpass.getpass() ...
Python-Freelancer's user avatar
0 votes
1 answer
1k views

Getting password using getPass isn't working for me [duplicate]

My code : from getpass import getpass def display_credentials(): website = input("Enter the name of the website:") password = getpass("Enter master password: ") print(...
Developing_brain's user avatar
-1 votes
1 answer
98 views

Python getpass function

I have tried to use this getpass function in python to type in my password, but when I run the code, i cannot input anything in the terminal. Thanks in advance! :D enter image description here enter ...
Felix's user avatar
  • 1
0 votes
1 answer
291 views

Why expect is able to interact with `getpass` call?

I am surprised about way of working getpass(). I am using it in python, however I am aware of the fact that it is about https://linux.die.net/man/3/getpass call in reality. Moreover, I am aware of the ...
dbs9654's user avatar
  • 13
0 votes
1 answer
2k views

getpass.getuser / os.environ['username'] returns computer name and not username

I made a service with python which will call this app made with pyinstaller using subprocess.popen. It makes a call to getpass.getuser() but instead of the username it returns the computer-name. I've ...
Wasim Afser's user avatar
0 votes
2 answers
2k views

send an input file to a python code which is using getpass function

Assume this code as a simple Python code which can get username and password: from getpass import getpass user = getpass(" enter username :") pass = getpass(" enter password ") ...
Saeed's user avatar
  • 159
1 vote
1 answer
1k views

SMTP getpass.getpass() not accepting input, can you fix this? [closed]

I am trying to create a password protected server but, when I go in to type my password, the output doesn’t let me type in the password. All the other inputs work just getpass doesn’t let me type ...
user avatar
2 votes
0 answers
702 views

How to hide password input with getpass in Python 3 on Visual Studio Code? [duplicate]

The following code snippet: from getpass import getpass username = input("Username: ") password = getpass("Password: ") When run in Visual Studio Code's integrated Python Console produces the ...
Matthias's user avatar
  • 13.4k
1 vote
1 answer
1k views

What does "GetPassWarning: Can not control echo on the terminal" mean? "Inappropriate ioctl for device"?

I wrote a script that sends an email with the daily holiday. It works when run independently. I also wrote a script that sets a cronjob for it to run automatically, which correctly sets a cronjob, but ...
BenG's user avatar
  • 116
2 votes
1 answer
1k views

dill.dump_session not working with getpass

I have a Jupyter notebook whose state I want to save using dill.dump_session, however the function throws an error if the notebook uses the getpass module. Is there any way around this issue? I ...
danilociaffi's user avatar
2 votes
2 answers
6k views

How to get all Windows/Linux user and not only current user with python

I know how to get the current user using os or getpass.getuser(), but is there a way to get a list of all user and not only the current one? Read os and getpass documentations but i didn't thing ...
Arus's user avatar
  • 21
-1 votes
1 answer
177 views

I'm trying to use selenium but keep getting this error [duplicate]

I'm trying to make a python program that you can use as a module for instagram.com. Here's the code: from selenium import webdriver from getpass import getpass user = input("Enter your username/...
JosephAB's user avatar
2 votes
0 answers
1k views

getpass in pytest return OSError: reading from stdin while output is captured

I'm trying to write a test in pytest to pass a password with getpass but I'm getting this error: OSError: reading from stdin while output is captured here is my function: def test_my_password_check(...
virtualdvid's user avatar
  • 2,403
0 votes
1 answer
339 views

How to remove \r character from the getpass prompt

I have written a code which actually matches the patter RegEx in Python. I have used getpass library to prompt the user to enter the password.But if the user enters the wrong password[say 'HH'-which ...
Akash's user avatar
  • 1
3 votes
0 answers
682 views

getpass isn't working in jupyter notebook (python 3.6, Ubuntu 18.04)

I recently updated from ubuntu 16.04 to 18.04. getpass was working with jupyter in ubuntu 16.04. However, since the upgrade it has ceased to work. Whenever I enter getpass.getpass in a jupyter ...
Mike Campbell's user avatar
0 votes
0 answers
114 views

Why does python getpass not work for connecting to gmail using imapclient, and how should I accomplish connecting in instead?

I want to connect to gmail using imapclient. I've followed the example from the book "Automate the Boring Stuff with Python" chapter 16 by Al Sweigart. The code from the book works well in interactive ...
John's user avatar
  • 11
3 votes
1 answer
930 views

How do I hide input WITHOUT getpass (it doesn't work)? [duplicate]

I've been trying to make a simple sign-up/in program and I wanted to hide the password, so I took to the internet. I tried out this thing called getpass, but it didn't work. It just told me it couldn'...
Eleeza the Other World Wizard's user avatar
0 votes
0 answers
561 views

python 3 - getpass.getpass() is echoing password... nothing seems to work [duplicate]

So I wrote a script, and it actually worked for a while. I import the getpass module, and sure enough the user name was echoed, but the password was not. I ran the script several weeks later, and now ...
MS-87's user avatar
  • 193
0 votes
1 answer
415 views

Problem in using getpass with psycog for password management

My goal is to use getpass to hide the entry of my password when I connect to a postgresql database via python3. I use python3 on jyputer notebook. This work well : connect = psycopg2.connect("dbname=...
A. Sègla's user avatar
3 votes
1 answer
1k views

Get password silently from clipboard in Python

The standard way to enter a password in Python without echoing it is using getpass.getpass(). However,it doesn't support clipboard input (ctrl-V), which is needed when dealing with complex, highly ...
mrgou's user avatar
  • 2,408
-1 votes
1 answer
2k views

ValueError: No closing quotation - slappasswd wrapper

I'm using getpass to edit LDAP passwords simply and efficiently. When I use a password, for example: c;_pr8\\E0L)ec*\'E._rPBH?"4i9Tne and try to run the program I get the following error: Traceback (...
CertifcateJunky's user avatar
1 vote
1 answer
522 views

Using getpass with Sublime Text

Like the title says I am tryin gto use the getpass library with sublime text (and SublimeREPL.) When I run a simple piece of code, I get nothing but a blank screen in the sublime terminal and the REPL ...
Benjamin Pharris's user avatar
1 vote
1 answer
2k views

Pytest mock hide expected password

I am testing a function that gets a login and a password from the command line. The code below works as expected: # ---------- Function part ---------- import getpass def my_function(): login = ...
Simpom's user avatar
  • 977
5 votes
2 answers
1k views

Making getpass read from shell script

I have python script (3rd party script) calling getpass. I need to use a script to provide the password. Simple piping doesn't work because getpass, according to the doc, reads from /dev/tty. I'm by ...
sel's user avatar
  • 493
2 votes
0 answers
722 views

getpass.getpass() hangs on ipython notebook

I am using very simple code on ipython notebook for user to input password. Command hangs after user inputs the password. Here is my code sample - import getpass try: p = getpass.getpass() ...
Sangy's user avatar
  • 21
9 votes
3 answers
9k views

getpass is not working for spyder (Python)

I'm trying to use getpass to hide the input but it just gives me this error: "Warning: QtConsole does not support password mode, the text you type will be visible." I'm using Spyder. Here is my ...
Ahmed Sameh Wagih's user avatar
0 votes
2 answers
5k views

Testing getpass module: 'password input may be echoed'

I'm looking for any insight into why the below error is raised. I'm wondering if the issue is with pytest? I'm otherwise using getpass with no issues in my application. However, I'm new to the ...
Michael Johnson's user avatar
6 votes
1 answer
4k views

Rmarkdown password with getPass

I am building an application in RMarkdown that relies upon a user-generated password: library(getPass) pw <- getPass(msg = "Enter the Password, please!") When I run all of the code interactively ...
DoubleTap's user avatar
1 vote
2 answers
2k views

How to use argparse in the actual script

How does argparse work? I was told to 'hide' the password from the psycopg2 connection I am building so to be able to run the script automatically every week and being able to share it between ...
ccasimiro9444's user avatar
-1 votes
3 answers
8k views

Python Telnet script

Thanks to Python Library i was able to use their example to telnet to Cisco switches, I am using this for learning purposes, specifically learning python. However, although all the code seem ...
tafiela's user avatar
  • 93
0 votes
1 answer
740 views

getpass python3 no input

existing_users = { 'adam' : 'Test123' } unverified_users = [] status = "" status = input("If you have an account, type YES, NO to create a new user, QUIT to exit: ") status = status....
cyzczy's user avatar
  • 197