Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Need help for extractring keys from dictionary
Post: RE: Need help for extractring keys from dictionary

To get those values you can try: # For second example where # info={'test': '\r\nApplication name: Cl***\r\nSource: adc***\r\nTimestamp: 2019-***\r\nMessage: HTTP"GET" "/api/fx/pr***/groups" responde...
hbknjr General Coding Help 3 1,311 Jan-23-2019, 01:14 PM
    Thread: pip install xlrd error
Post: RE: pip install xlrd error

Try to use: Quote:pip install xlrd --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org as suggested HERE. You can also try to reinstall pip.
hbknjr General Coding Help 3 6,970 Jan-19-2019, 08:01 AM
    Thread: Number Series
Post: RE: Number Series

(Jan-17-2019, 01:55 PM)MrGoat Wrote: Still doesnt work whether I use shebang or not (Jan-17-2019, 05:53 AM)MrGoat Wrote: Error:CaiGengYangs-MacBook-Pro-2:Lesson 1 caigengyang$ bash Question8.py Qu...
hbknjr General Coding Help 11 2,294 Jan-17-2019, 02:06 PM
    Thread: Script for untagged resources in aws
Post: RE: Script for untagged resources in aws

Take a look: EAFP You can just handle the exception which is similar to providing a default value in dict.get() method.(probably how it works behind the scene) PS: Since you can use dict['Key'] to a...
hbknjr General Coding Help 1 1,987 Jan-15-2019, 06:30 PM
    Thread: Bad request(400) error!
Post: RE: Bad request(400) error!

(Jan-15-2019, 11:50 AM)manhsv Wrote: I've checked, the service of this API doesn't work.But this case is POST function. I've tried another API. May you do an example for this? API's documentation is...
hbknjr General Coding Help 8 1,354 Jan-15-2019, 01:41 PM
    Thread: Python pointers?
Post: RE: Python pointers?

Not many high-level languages have pointers due to security reasons. But languages themselves do implement the datatypes and do memory management using pointers. In Python, the functionality of linke...
hbknjr General Coding Help 2 1,345 Jan-12-2019, 05:59 AM
    Thread: parse animation
Post: RE: parse animation

Since the library is undocumented your best bet is to look at the source code. Like HERE name,extent are instance variable so they must be accessible via dot(.) operator on Animation class object. ...
hbknjr General Coding Help 2 1,237 Jan-08-2019, 08:22 AM
    Thread: Selenium Parsing (unable to Parse page after loading)
Post: RE: Selenium Parsing (unable to Parse page after l...

Make sure your ISP doesn't block torrent sites. You can wait till the element is visible. try waits search = WebDriverWait(browser,5).until(lambda x: x.find_element_by_id('thesearchbox') # where We...
hbknjr Web Scraping & Web Development 7 2,089 Jan-07-2019, 07:34 AM
    Thread: Can't import pyautogui
Post: RE: Can't import pyautogui

(Jan-02-2019, 02:12 AM)HowardHarkness Wrote: IDE is pycharm You might have multiple Python installations. The one in your path seems to be Quote:c:\users\howard\appdata\local\programs\python\python...
hbknjr Web Scraping & Web Development 5 18,666 Jan-02-2019, 01:02 PM
    Thread: Firefox Selenium (open new tab)
Post: RE: Firefox Selenium (open new tab)

One way to do it is with javascript. browser.execute_script("window.open();") #or to open a url #browser.execute_script("window.open('{}');".format(ulr))Each tab has an identifier(handle), to list al...
hbknjr Web Scraping & Web Development 1 4,056 Dec-29-2018, 06:59 AM
    Thread: Flask with paramiko based ssh client gives gevent LoopExit exception
Post: RE: Flask with paramiko based ssh client gives gev...

Changed code to directly use paramiko. #!usr/bin/python3.6 #from gevent import monkey; monkey.patch_all() import flask from flask import request import paramiko app = flask.Flask(__name__) app.confi...
hbknjr Web Scraping & Web Development 3 2,331 Dec-25-2018, 07:48 AM
    Thread: Flask with paramiko based ssh client gives gevent LoopExit exception
Post: RE: Flask with paramiko based ssh client gives gev...

Thanks for replying. I tried to minimize the waits, making few assumptions with following code: server = SSHClient(ip,user='user',password='********',timeout=5,num_retries=2,retry_delay=1,keepaliv...
hbknjr Web Scraping & Web Development 3 2,331 Dec-24-2018, 12:36 PM
    Thread: Flask with paramiko based ssh client gives gevent LoopExit exception
Post: Flask with paramiko based ssh client gives gevent ...

I am getting gevent LoopExit error when using paramiko based ssh client with flask server. Sample code to reproduce the problem. #!usr/bin/python3.6 #from gevent import monkey; monkey.patch_all() fro...
hbknjr Web Scraping & Web Development 3 2,331 Dec-24-2018, 09:09 AM
    Thread: Please help explaining this recursive function
Post: RE: Please help explaining this recursive function

This algorithm is to generate all arrangments of the List Elements. Since its, a recursive generator function it is difficult to visualise it via print statements. I'd suggest you either use THIS to v...
hbknjr General Coding Help 3 1,082 Nov-13-2018, 02:35 PM
    Thread: Sending E-mails
Post: RE: Sending E-mails

Here's a troubleshooting guide that should work. Most likely problem is of "Allowing less secure apps" Go to THIS link and allow less secure apps to login into the account.
hbknjr General Coding Help 3 2,075 Aug-21-2018, 08:01 AM
    Thread: TypeError: get_formatted_name() missing 1 required positional argument: 'last_name'
Post: RE: TypeError: get_formatted_name() missing 1 requ...

(Mar-27-2018, 09:34 PM)Larz60+ Wrote: that corrects the argument problem, but now you have to check for None in all fields: def get_formatted_name(first_name=None, middle_name=None, last_name=None):...
hbknjr General Coding Help 4 34,674 Mar-28-2018, 04:37 PM
    Thread: Error Message Pip
Post: RE: Error Message Pip

Driver Links Download appropriate driver binary from above link. Add the downloaded executable in system path or specify executable_path in the constructor like. driver = webdriver.Firefox(executabl...
hbknjr Web Scraping & Web Development 6 1,630 Feb-11-2018, 02:26 PM
    Thread: Newbe question about Print() to PyQt
Post: RE: Newbe question about Print() to PyQt

(Dec-18-2017, 10:32 PM)TimW Wrote: I don't understand how to "Print()" to a text window. In PYQT there are different widgets each for input, output display, buttons etc. There is no print() functio...
hbknjr GUI 9 9,426 Dec-19-2017, 05:56 AM
    Thread: Offline audio to text (Speech Recognition)
Post: RE: Offline audio to text (Speech Recognition)

Check Out: CMUSphinx Pocketsphinx works offline but may not be as good as google STT.
hbknjr Data Science 14 51,068 Dec-04-2017, 11:07 AM
    Thread: Just bought bitcoins
Post: RE: Just bought bitcoins

(Nov-03-2017, 07:40 PM)sparkz_alot Wrote: I just read, briefly, on how to mine and apparently the PC is no longer powerful enough to effectively mine, you actually need 'mining' hardware, which, fro...
hbknjr Bar 19 6,049 Nov-06-2017, 12:06 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020