The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Eclipse ImagePhoto
Discuss Eclipse ImagePhoto in the Python Programming forum on Dev Shed. Eclipse ImagePhoto Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 21st, 2012, 03:40 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Posts: 1
Time spent in forums: 8 m 46 sec
Reputation Power: 0
|
|
|
Eclipse ImagePhoto
Hi
I wrote this tkinter code, but it doesn't work and shows error in eclipse:
................................
Traceback (most recent call last):
File "C:\Users\farshad\workspace\python3test\src\email.py", line 5, in <module>
logo = PhotoImage(file="c://Python32/1.gif")
File "C:\Python32\lib\tkinter\__init__.py", line 3228, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Python32\lib\tkinter\__init__.py", line 3184, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "c://Python32/1.gif"
............................
from tkinter import *
root = Tk()
logo = PhotoImage(file="c://Python32/1.gif")
w1 = Label(root, image=logo).pack(side="right")
explanation = """At present, only GIF and PPM/PGM
formats are supported, but an interface
exists to allow additional image file
formats to be added easily."""
w2 = Label(root,
justify=LEFT,
padx = 40,
text=explanation).pack(side="left")
root.mainloop()
|

August 21st, 2012, 08:17 AM
|
 |
Contributing User
|
|
|
|
|
Your program works fine when presented with an actual gif format file.
Perhaps you need to mime parse the email to first extract the picture?
__________________
[code] Code tags[/code] are essential for python code!
|

August 22nd, 2012, 12:18 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Posts: 3
Time spent in forums: 25 m 9 sec
Reputation Power: 0
|
|
|
Re
actually, this cod works in python3.2 but it doesn't work in eclipse... would you please tell me what should I do?
|

August 22nd, 2012, 06:43 AM
|
 |
Contributing User
|
|
|
|
|
Sure
|

August 22nd, 2012, 07:08 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Posts: 3
Time spent in forums: 25 m 9 sec
Reputation Power: 0
|
|
|
Re
Then you mean that Emacs is better and more flexible?
Thanks for your guidance
|

August 22nd, 2012, 07:27 AM
|
 |
Contributing User
|
|
|
|
|
I know little about eclipse, however emacs comes with a symbolic calculator, artist mode, various computer language modes, built in support for gdb, mail, diary, eliza (M-x doctor), rectangle editing support, keyboard macros, on and on and on, emacs can open windows on multiple display servers all of which can access same buffer and therefor can be used for non-local meetings.
|

August 22nd, 2012, 11:32 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Posts: 3
Time spent in forums: 25 m 9 sec
Reputation Power: 0
|
|
|
re
Thanks for your time ...
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|