Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Get the filename from a path
Post: RE: Get the filename from a path

(Jul-13-2020, 04:10 PM)DeaD_EyE Wrote: (Jul-13-2020, 02:58 PM)12237ee1 Wrote: I am using linux so where should I put the path of the file in the script I tried it like this a= "/home/file.txt" p...
12237ee1 General Coding Help 7 3,551 Jul-13-2020, 06:01 PM
    Thread: Get the filename from a path
Post: RE: Get the filename from a path

(Jul-12-2020, 10:11 AM)DeaD_EyE Wrote: Iterate over the open file, then you get line by line. Instead of regex you could use str.rsplit() or str.rpartition(). pdf_files = set() # https://docs.pytho...
12237ee1 General Coding Help 7 3,551 Jul-13-2020, 02:58 PM
    Thread: Get the filename from a path
Post: Get the filename from a path

I have a large text file which has a lot of links and I need python script to extract all the names of the files which end with .pdf format and sorted without repeated result ? Example: Quote:http:/...
12237ee1 General Coding Help 7 3,551 Jul-12-2020, 07:03 AM

User Panel Messages

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