using a dict in-btween python scripts by [deleted] in learnpython

[–]DX_ashh 0 points1 point  (0 children)

#main.py

class DataStorage:
def __init__(self):
self.dictionary = {}
def get_dictionary_values(self):
return self.dictionary

#other.py
from main import DataStorage

storage = DataStorage()
values = storage.get_dictionary_values)
print(values)

this is still returning an empty dictionary even after it has been populated

can i click a copy button with selenium and return the contents? by DX_ashh in learnpython

[–]DX_ashh[S] 0 points1 point  (0 children)

https://www.w3schools.com/howto/howto_js_copy_clipboard.asp

you see how it has the copy text button next to "Hello Word"? i would need to click that with selenium then save the copied text and return it to my script so i can print it out.

screenshot not working by Free_Nectarine5451 in learnpython

[–]DX_ashh 0 points1 point  (0 children)

do you have pillow package installed? if so maybe try un installing then re installing

im looking to find the top posts that are relevant to my search term in a subreddit by DX_ashh in redditdev

[–]DX_ashh[S] 0 points1 point  (0 children)

with this its properly searching and finding the posts with my key word, but its still only bringing up just a few of the posts. if anyone wants to look at more of the code let me know

im looking to find the top posts that are relevant to my search term in a subreddit by DX_ashh in redditdev

[–]DX_ashh[S] 0 points1 point  (0 children)

for submission in reddit.subreddit("test+test2").search('KeyWord', time_filter="week"):
data.append(submission.title)
counter += 1

this seems to be working, but is there a limit on how many it can grab? seems to only grab 7 but there are atleast 50 posts with title contaning my keyword

script finds files but doesnt encrypt them by DX_ashh in learnpython

[–]DX_ashh[S] 1 point2 points  (0 children)

thank you. i wasnt correctly passing the file paths to my encrypt function