Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 21st, 2012, 03:40 AM
farshad.f921@ya farshad.f921@ya is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 1 farshad.f921@ya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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()

Reply With Quote
  #2  
Old August 21st, 2012, 08:17 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,345 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 6 h 47 m 59 sec
Reputation Power: 383
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!

Reply With Quote
  #3  
Old August 22nd, 2012, 12:18 AM
farshad.f farshad.f is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 3 farshad.f User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?

Reply With Quote
  #5  
Old August 22nd, 2012, 07:08 AM
farshad.f farshad.f is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 3 farshad.f User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #6  
Old August 22nd, 2012, 07:27 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,345 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 6 h 47 m 59 sec
Reputation Power: 383
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.

Reply With Quote
  #7  
Old August 22nd, 2012, 11:32 AM
farshad.f farshad.f is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 3 farshad.f User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 9 sec
Reputation Power: 0
re

Thanks for your time ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Eclipse ImagePhoto

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap