Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to get specific TD text via Selenium?
Post: RE: How to get specific TD text via Selenium?

Can use CSS selector .find_element_by_css_selector If getting first name eg Jill, body > table > tbody > tr:nth-child(2) > td:nth-child(1)(can copy selector from Browser). Then the loop t...
snippsat Web Scraping & Web Development 3 73 5 hours ago
    Thread: Unable to send/reply PM messages?
Post: RE: Unable to send/reply PM messages?

Ok i will look into this.
snippsat Board 3 104 Today, 07:55 AM
    Thread: Best way to process large/complex XML/schema ?
Post: RE: Best way to process large/complex XML/schema ?

(Yesterday, 01:44 AM)MDRI Wrote: We know Python is interpreter language. Is Pyhton the right one to do the above for performance? What are the option we have ?Performance is no problem as eg lxml...
snippsat General Coding Help 2 132 Yesterday, 03:27 PM
    Thread: Unable to send/reply PM messages?
Post: RE: Unable to send/reply PM messages?

Try again now and see if it work.
snippsat Board 3 104 Yesterday, 09:57 AM
    Thread: Starting first code
Post: RE: Starting first code

(May-11-2021, 12:56 PM)Ricky Wrote: I've now typed - once I opened EDLE. print ("Hisssssss...") Saved As then OPEN the file and clicked run RUN - MODULE which comes back with on a further page as pr...
snippsat General Coding Help 4 167 May-11-2021, 03:54 PM
    Thread: I cannot delete and the elements from the list
Post: RE: I cannot delete and the elements from the lis...

Don't modify an iterator while you're iterating over it,it's a known bad pattern💀 Will mess up list index and will get your result. Could add enumerate(l2[:]) to make it work,but still no t good as a...
snippsat General Coding Help 4 211 May-11-2021, 11:58 AM
    Thread: web3
Post: RE: web3

Download and install bitarray So for you it will be this version. pip install bitarray‑2.1.0‑cp38‑cp38‑win_amd64.whlThen try install again. It's preferably to use virtual environment as it install a ...
snippsat General Coding Help 1 130 May-10-2021, 06:00 PM
    Thread: Listing All Methods Of Associated With A Class
Post: RE: Listing All Methods Of Associated With A Class

Alterative dir(class). >>> dir(Human) [..... '__subclasshook__', '__weakref__', 'age', 'display']To just show method and not all special methods. >>> [m for m in dir(Human) if no...
snippsat General Coding Help 3 176 May-09-2021, 07:06 PM
    Thread: how to keep anaconda up to date?
Post: RE: how to keep anaconda up to date?

With (base) environment active conda activate conda update conda conda update --allKeeping Anaconda Up To Date Quote:Why Updating the Anaconda Package is Almost Always a Bad Idea Then read about makin...
snippsat Bar 1 82 May-09-2021, 09:45 AM
    Thread: Testing Split elements
Post: RE: Testing Split elements

(May-08-2021, 09:56 PM)tester_V Wrote: That is why I'm testing element 4 if it is empty.Yes,but you can not do like this as mb[4] will give IndexError when empty. Then you need to do as buran show,...
snippsat General Coding Help 4 183 May-08-2021, 10:54 PM
    Thread: Printing Object Names
Post: RE: Printing Object Names

Here a example. from datetime import date class Human(): def __init__(self, sex, eyecolor): self.sex = sex self.eyecolor = eyecolor def age(self): currentdate = date....
snippsat General Coding Help 5 192 May-08-2021, 08:01 PM
    Thread: No module named 'pysolar' - even tough pysolar is installed - What am I doing wrong?
Post: RE: No module named 'pysolar' - even tough pysolar...

(May-08-2021, 06:18 PM)Jghurt Wrote: Do you know a way to get Pysolar work with my normal IDLE ?Yes it work with version from python.org,and IDLE i never use only new people use it for while as it's...
snippsat General Coding Help 5 193 May-08-2021, 06:45 PM
    Thread: No module named 'pysolar' - even tough pysolar is installed - What am I doing wrong?
Post: RE: No module named 'pysolar' - even tough pysolar...

Make sure that (base) environment is active this is required in later version of Anaconda. If using Anaconda Prompt it is automatically activated. Here a quick run where i use cmder,so i activate mys...
snippsat General Coding Help 5 193 May-08-2021, 04:01 PM
    Thread: filtering files using 'any()"
Post: RE: filtering files using 'any()"

(May-08-2021, 06:32 AM)Gribouillis Wrote: Here is one trick: for many years, there has been a module in Pypi named grin. It is some sort of grep command written in pure Python. It could be a fruitfu...
snippsat General Coding Help 19 543 May-08-2021, 12:01 PM
    Thread: Upgrade to python 3 opinion
Post: RE: Upgrade to python 3 opinion

(May-07-2021, 02:47 PM)hokie1999 Wrote: Is it correct to say that, if we want to keep python 2 functionality, but we need python 3 functionality on all our servers for a new app, and we don't want p...
snippsat News and Discussions 5 196 May-08-2021, 10:57 AM
    Thread: AttributeError: ResultSet object has no attribute 'get_text'
Post: RE: NoneType Error when Field is Empty

Quick test so it work,check turn of JavaScript in Browser then reload page and see if still can see Remote. If not may need to use Selenium so can get value generated bye JavaScript. >>> fro...
snippsat Web Scraping & Web Development 1 169 May-07-2021, 05:32 PM
    Thread: function that returns a list of dictionaries
Post: RE: function that returns a list of dictionaries

# result.py from my_record import foo def bar(): print(f'The car vaules is <{foo()[1].get("car")}>') bar()Output:The car vaules is <641>Look at at how modules work is the simplest wa...
snippsat General Coding Help 2 148 May-06-2021, 09:42 PM
    Thread: fetching, parsing data from Wikipedia
Post: RE: fetching, parsing data from Wikipedia

(May-05-2021, 06:12 PM)apollo Wrote: and the following tables = soup.find_all('table')can i do this like so?Yes,but need to find right table here a coupled of way,and a bett...
snippsat Web Scraping & Web Development 2 466 May-06-2021, 08:08 PM
    Thread: filtering files using 'any()"
Post: RE: filtering files using 'any()"

tester_V Wrote:The files are big and many, I do not want to do 'readlines' and if I'll do open each file then it is like doing 'for' loop, and I do not need 'any()So i can write some code that bring m...
snippsat General Coding Help 19 543 May-06-2021, 10:32 AM
    Thread: filtering files using 'any()"
Post: RE: filtering files using 'any()"

(May-05-2021, 04:54 PM)tester_V Wrote: All snippets produce errors. NOne is working.You posts code you run and error you get. Working example filter out so only get image(.png) files. import os pat...
snippsat General Coding Help 19 543 May-05-2021, 05:05 PM

User Panel Messages

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