[Tutor] Fwd: How to create a GUI for python using tkinter

Walter Prins wprins at gmail.com
Tue Feb 5 14:40:12 CET 2013


Forwarding (presumed accidental) personal reply back to list.

---------- Forwarded message ----------
From: Aaron Misquith <aaronmisquith at gmail.com>
Date: 5 February 2013 13:01
Subject: Re: [Tutor] How to create a GUI for python using tkinter
To: Walter Prins <wprins at gmail.com>



On Tue, Feb 5, 2013 at 5:40 PM, Walter Prins <wprins at gmail.com> wrote:

> On 5 February 2013 09:38, Aaron Misquith <aaronmisquith at gmail.com> wrote:
>
>> I have attached a python program with this mail which peforms following
>> operations:
>> 1.Logs in to facebook.
>> 2.Asks the user for access tokens.
>> 3.Gets the friend list of the user.
>> 4.outputs the friend list as pdf.
>>
>> My Problems regarding the above program are:
>> 1.I want to display the names of my friends(in output) one in each line
>> in the intermediate .doc file that i have created.
>>               example output: {'data': [{'name': 'Roy Fernandes'},
>> {'name': 'Aniruddh Beigh'},
>>                                        I want it to be displayed as : Roy
>> Fernandes
>>
>> Aniruddh Beigh
>>
>> 2.Is there a way to automate getting access tokens for the user that is
>> logging in? If not how to get access tokens for each user while logging in?
>>
>> 3.How to dislpay text with clickable links.
>>    Eg: Something thing like alert box, wherein if you click the link you
>> go to the page.
>>
>> 4. Finally my lecturer has asked me to create a gui for the facebook
>> login program using tkinter library module. I don't know how to create one
>> (the lecturer has not thought this topic in class so i'm just clueless
>> here). So if someone can do it and explain me the steps it will be very
>> helpfull.
>
>
> The way this tutoring mailing list (and in general, any programming
> mailing list or support forum) works is that you do the legwork first, then
> come with the actual problems you're having.  You don't just ask for people
> to write your solutions for you.
>
> Also, your questions together with a partial solution by (apparently)
> someone else makes me wonder whether this is homework.  Can you please
> clarify?  Obviously, apart from the above comment on this not being a
> solution service, we cannot provide direct solutions to homework
> assignments.
>
> All that said, to address your questions somewhat:
> 1.) The program is directly printing the returned Python dict object (e.g.
> nik) which is why you're getting the curly-braced representation of it.  To
> print/output it differently, take some more control over the printing
> process.  E.g. print the attributes of the nik object manually and use
> newline characters (\n) where required.  If you don't understand this
> answer then you're lacking some basic Python skills/understanding and I'd
> recommend learning some basic Python first, perhaps by working through Alan
> Gauld's tutorial: http://www.alan-g.me.uk/tutor/index.htm
> Then try your hand at this problem again yourself, and *then* post back
> with specific problems you're having.
>
> 2.) Probably, but I don't offhand know how.  This is not really a Python
> tutoring question and may be a question for appropriate for a Facebook API
> programming forum.
>
> 3.) There's lots of TkInter materials on the web that will get you
> started.  Here's a decent tutorial:
> http://www.tkdocs.com/tutorial/index.html
>

First of all i would like to confirm that this was my assignment and i have
completed it and shown to my lecturer. I'll also confirm that the class
facebook was available in stackoverflow( Not completely, I had to make some
changes to suit my requirements).But the rest is all mine especially
exporting the output as pdf. None of the forums were helpful regarding
this. Everywhere people have mentioned about pypdf and reportlab toolkit ,
but none of them worked for me (i have also posted the solution on
stackoverflow yesterday). After showing the output my lecturer informed me
if i could Display better  using tkinter GUI. Since it wasn't thought in
class I have no idea regarding this. The problem that i encounter in
creating GUI is I already have a class *facebook*; How am i supposed to
integrate it to class "*Application*"(required to create GUI with tkinter)
which i have to integrate it with (the small bookish knowledge i possess in
the topic).

I don't expect direct solutions but if you do give them i want possible *
explanations* on it so i can understand how it was done. And since this is
a tutor i want someone who knows the answers to teach me; since you cant
study everything in class.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130205/61f426ef/attachment-0001.html>


More information about the Tutor mailing list