Posts: 42
Threads: 6
Joined: May 2024
May-23-2024, 07:10 PM
(This post was last modified: May-23-2024, 07:10 PM by ebn852_pan.)
Quote:Traceback (most recent call last):
File "<main.py>", line 11, in <module>
ModuleNotFoundError: No module named 'Pillow'
=== Code Exited With Errors ===
This is what I got trying to import a Pillow package into my computer. Will it import if I write out a exception and then run it? It's for a picture file I'm still on it. Online interpreter and compiler.
I don't know how to write a exception yet. But from the looks of it, similar to Java. And it has the same affect. Run time. I'll look it up.
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.
Posts: 42
Threads: 6
Joined: May 2024
data = "Some data"
filename = "test.txt"
try:
file = open(filename, 'w+')
except:
print("Error opening file")
else:
try:
file.write(data)
except:
print("Error writing to file")
finally:
file.close()
A picture file, .jpg extension. name is the full url assuming. The file is the picture. Then write it like that. It should compile and run. Just learning ideas and concepts. No heart to go through that now. But will get there. Thank for your input.
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.
Posts: 42
Threads: 6
Joined: May 2024
(May-23-2024, 07:31 PM)deanhystad Wrote: Why are you trying to import Pillow? There is no module named Pillow. Before trying something new, read some documentation.
https://pillow.readthedocs.io/en/stable/...orial.html
okay. I saw it on stack overflow
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.
Posts: 42
Threads: 6
Joined: May 2024
May-23-2024, 11:57 PM
(This post was last modified: May-23-2024, 11:57 PM by ebn852_pan.)
I read the tutorial on images, thanks.
I still need to get my chrome book to c:\ figuring it out. Well, I like python so far because it's a software language. Pretty much like how basic was or Java. Same idea. Application is what the aim is for, downloading pictures.
Does this script rotate my pictures back when the other person views it. It places in like that, even though I did not write the script.
Just figuring out what's going to happen. The codes on images I understand, just the import and modules I'll have to memorize. What modules and what's happening. C# or C++ is what I'm concentrating on. That way application just comes natural because the codes say so. Easy to understand from a applications point of view.
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.