Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Best approach before adding features - Movie information script
Post: RE: Best approach before adding features - Movie i...

Thanks for the feedback MadisonAster! Sorry it's taken me to long to get back to this but life has been busy. You're advice makes sense and I'll implement an __init__ method. I've realized that I nee...
pythonnewbie138 Code Review 2 2,419 Oct-23-2020, 01:08 AM
    Thread: Best approach before adding features - Movie information script
Post: Best approach before adding features - Movie infor...

Hi everyone, I think I've finally wrapped my mind around classes but I would like to get some feedback on my current script before adding additional features. There are 2 classes. - The first handle...
pythonnewbie138 Code Review 2 2,419 Oct-11-2020, 09:03 PM
    Thread: Creating a list of dictionaries while iterating
Post: RE: Creating a list of dictionaries while iteratin...

This turned out to not be as difficult as my brain was making it. I didn't realize dicts could be created while iterating like this so... Awesome! Here's the updated director_known_for block. ...
pythonnewbie138 General Coding Help 6 3,284 Sep-27-2020, 08:23 PM
    Thread: Creating a list of dictionaries while iterating
Post: RE: Creating a list of dictionaries while iteratin...

I may not be understanding your question... Quote:Why are the elements like k['title'] used repeatedly? Since k isn't changing, this will be the same in all the items. The results that are being acces...
pythonnewbie138 General Coding Help 6 3,284 Sep-27-2020, 06:24 PM
    Thread: Creating a list of dictionaries while iterating
Post: RE: Creating a list of dictionaries while iteratin...

The fstring formatting makes sense. I hadn't quite wrapped my head around it yet. Thanks for that. I see 2 acceptable ways to achieve the desired results and I would like to understand both. 1. You...
pythonnewbie138 General Coding Help 6 3,284 Sep-26-2020, 10:45 PM
    Thread: Creating a list of dictionaries while iterating
Post: Creating a list of dictionaries while iterating

Hi everyone, The class I'm writing queries TMDB and, for now, writes data to a txt file. I've written a method to populate global variables to use later but I need a way to organize the same type of ...
pythonnewbie138 General Coding Help 6 3,284 Sep-26-2020, 06:01 PM
    Thread: Error when running mktorrent subprocess command
Post: RE: Error when running mktorrent subprocess comman...

Got it. Thanks! Simply changing piece_size to str(piece_size) fixed the problem. Definitely a facepalm moment haha. Thanks again to both of you!
pythonnewbie138 General Coding Help 4 3,868 Sep-16-2020, 01:55 AM
    Thread: Error when running mktorrent subprocess command
Post: RE: Error when running mktorrent subprocess comman...

Thanks for the response. To address the first part, I should be able to just add the brackets around the list of arguments, right? subprocess.run(['mktorrent', '-vp', '-s', 'HUH', '-l', piece_size, ...
pythonnewbie138 General Coding Help 4 3,868 Sep-16-2020, 01:23 AM
    Thread: Error when running mktorrent subprocess command
Post: Error when running mktorrent subprocess command

Hi there, I can't figure out why my mktorrent subprocess command is failing. Any help in understanding why would be much appreciated. Here's my code: import os import subprocess target_file = "C:\\...
pythonnewbie138 General Coding Help 4 3,868 Sep-14-2020, 09:53 PM
    Thread: os.remove() Access is denied
Post: RE: os.remove() Access is denied

Thank you for the explanation. shutil.rmtree() works great. So the os module isn't capable to deleting a directory with contents?
pythonnewbie138 General Coding Help 3 30,947 Aug-28-2020, 09:39 PM
    Thread: os.remove() Access is denied
Post: os.remove() Access is denied

I'm receiving the below error when attempting to use os.remove() if a directory is found to exist. I've seen suggestions of running the script in an admin command prompt, that did not help. Relevant c...
pythonnewbie138 General Coding Help 3 30,947 Aug-28-2020, 08:33 PM
    Thread: Removing items from list if containing a substring
Post: RE: Removing items from list if containing a subst...

Thanks for the thorough explanation. The if logic mistake makes sense. I'll read more into remove() so I understand this better. I also forgot continue was a thing. Ugh. Pressing on! Your solution is...
pythonnewbie138 General Coding Help 2 2,208 Aug-27-2020, 10:20 PM
    Thread: Removing items from list if containing a substring
Post: Removing items from list if containing a substring

I'm trying to identify a file within a directory by removing list items containing an unwanted substring. When the script finishes running, list2 only contains 'test.test1-test-sample.mp4' when it's e...
pythonnewbie138 General Coding Help 2 2,208 Aug-27-2020, 09:10 PM
    Thread: tmdbsimple error
Post: RE: tmdbsimple error

Ah yes. This makes sense now. Thanks for helping me figure out how to figure out what's wrong. **kwargs were starting to make sense before this but connecting them to what I'm trying to practically d...
pythonnewbie138 General Coding Help 4 2,609 Aug-07-2020, 03:52 PM
    Thread: tmdbsimple error
Post: RE: tmdbsimple error

Thanks for your help. I should be able to review how this works in the search class of tmdbsimple, correct?
pythonnewbie138 General Coding Help 4 2,609 Aug-07-2020, 03:04 PM
    Thread: tmdbsimple error
Post: tmdbsimple error

I'm running into an obstacle in converting my TMDB query script into a function. The only change is having the search query as the only argument in the function and passing that along to the TMDB API....
pythonnewbie138 General Coding Help 4 2,609 Aug-06-2020, 09:17 PM
    Thread: Resolving YouTube search links
Post: RE: Resolving YouTube search links

(Aug-04-2020, 04:17 PM)snippsat Wrote: for hit in hits['items']: print(hit['snippet']['title'])[/python] That makes sense. I tried removing the index but kept ['items'] in the print statement. T...
pythonnewbie138 Web Scraping & Web Development 16 6,862 Aug-04-2020, 08:10 PM
    Thread: Resolving YouTube search links
Post: RE: Resolving YouTube search links

(Aug-02-2020, 10:27 PM)snippsat Wrote: I did choose to take out first search hit as a demo,could of course have written a loop that printed out those values i wanted from all 10 hit. I'm confused on...
pythonnewbie138 Web Scraping & Web Development 16 6,862 Aug-04-2020, 02:38 PM
    Thread: Resolving YouTube search links
Post: RE: Resolving YouTube search links

(Aug-02-2020, 12:00 AM)snippsat Wrote: Output:Learn Python - Full Course for Beginners [Tutorial] UC8butISFwT-Wl7EV0hUK0BQ Why does this only print a single result when how_many_hit = 10?
pythonnewbie138 Web Scraping & Web Development 16 6,862 Aug-02-2020, 07:26 PM
    Thread: Accessing values in list of dictionaries
Post: RE: Accessing values in list of dictionaries

Ok I figured out what I did wrong. In testing, I was choosing #2 repeated but that triggered the else block and broke out of the loop before getting to the correct match. *newbie facepalm*
pythonnewbie138 General Coding Help 2 2,137 Aug-02-2020, 05:02 PM

User Panel Messages

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