Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8888121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:58:03+00:00 2026-06-14T21:58:03+00:00

I am having the following problem where the user keeps pressing enter key on

  • 0

I am having the following problem where the user keeps pressing “enter key” on the command window when the python script is running…following is what runs on the command window,but user keeps pressing enter which eventually gets fed into password and the script fails,how do I prevent this?

 Parsing the XML

 Building the build combo table

  **Password: //asks for password but user had multiple enter key presses above which is taken as passoword and fails**

Python code:-

url='http://wiki.com/'+wikiName+'/w/index.php?title='+hId +'_'+rId+'&action=edit'
cookiehand = urllib2.HTTPCookieProcessor()
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_mgr.add_password(user=getpass.getuser(),passwd=getpass.getpass(),uri=authhost,realm=realm)
auth_handler = urllib2.HTTPBasicAuthHandler(password_mgr)
opener = urllib2.build_opener(auth_handler, cookiehand)
urllib2.install_opener(opener)
# make the request
req = urllib2.Request(url=url)
try:
    f = urllib2.urlopen(req)
    txt = f.read()
    f.close()
except urllib2.HTTPError, e:
    txt = ''
    print 'An error occured connecting to the wiki. No wiki page will be generated.'//eventually gets this error
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:58:04+00:00Added an answer on June 14, 2026 at 9:58 pm

    I think you should try flushing the user input just before you read the password.

    In order to do so, having a look at this other post might help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running xcode 4.3.2 and just started having the following problem. All projects
I've written an IRC bot in java, but I am having the following problem
I'm having the following problem: I have a page where a user inserts text
I'm having the following problem in a Safari extension. I ask the user to
I'm having following problem. I should convert a control to a certain type, this
I am having the following problem: a) I have a UNIX build environment set
I'm having the following problem and wondered whether anyone could see why this is
I have been having the following problem, i think it's probably due to the
I'm having the following problem using the Visual Studio 2010 Team System Beta 1:
I've been having the following problem with my GoDaddy's server. I am using JSPs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.