473,396 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Hide raw_input text?

I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better, a '*' for every character. Is there a way to do this? I'm
planning on building this into a GUI tool using Tkinter or wxPython,
so methods using a secret input for those might be helpful as well ( I
could jump straight into the GUI part).

Thanks!
Aug 13 '08 #1
3 9565
On Wed, Aug 13, 2008 at 1:26 PM, tmallen <th**********@gmail.comwrote:
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su),
The getpass module does that. http://docs.python.org/lib/module-getpass.html

--
Jerry
Aug 13 '08 #2
tmallen wrote:
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better, a '*' for every character. Is there a way to do this? I'm
planning on building this into a GUI tool using Tkinter or wxPython,
so methods using a secret input for those might be helpful as well ( I
could jump straight into the GUI part).
for console input, use the getpass module:
>>import getpass
getpass.getpass("Password: ")
Password:
'trustno1'

for GUI toolkits, the standard text entry widgets usually support
password input (e.g. using the show option in Tkinter, the wxTE_PASSWORD
style in wxPython, etc).

</F>

Aug 13 '08 #3

-----Original Message-----
From: tmallen [mailto:th**********@gmail.com]
Sent: Wednesday, August 13, 2008 12:26 PM
To: py*********@python.org
Subject: Hide raw_input text?

I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better, a '*' for every character. Is there a way to do this? I'm
planning on building this into a GUI tool using Tkinter or wxPython,
so methods using a secret input for those might be helpful as well ( I
could jump straight into the GUI part).

Thanks!
Aug 13 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
2
by: UJ | last post by:
Is there a way with a asp:checkbox to run a JavaScript to display/hide text/input on the screen without doing a postback? I also need to be able to access the stuff at the server so I need to...
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
3
by: chitrapu | last post by:
i have a text box and a button in a form. when i click on the button is it possible to hide the textbox? the textbox should not appear on the screen after the button is clicked
3
by: saroj007799 | last post by:
Can someone tell me that how can i hide or display the content(text) of my textbox whenever it is required. Thanks
11
by: C.W.Holeman II | last post by:
I what to hide an input element and the following text. I have the selector for the input working and just need to grab the text following it. CSS: form{ display:table; text-align:center; }
10
by: avr1983 | last post by:
hi, would you please help me in writing a javascript code to implement a text box that is hidden beside a drop down box.the text box should be enabled only when we select an "others"option from a...
1
by: stuy2k | last post by:
Hi im trying to make a section of text appear and disapear by clicking the question find example at - http://www.yellowtruck.co.uk/pascoes2/Untitled-4.html the java script i am using is found...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.