Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
I apologize to the group for my lack of information in my original post. I will do better in the future. I very much want to remain in good standing in this group because of all the knowledgeable people here. Thanks again to everyone that replied and helped me solve my problem. -- GNU/Linux u

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 16:38:08 -0500, Terry Reedy wrote: > On 3/5/2016 11:47 AM, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > No single simple state

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 21:55:40 +0200, Serhiy Storchaka wrote: > On 05.03.16 18:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > On Windows: > >

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 19:36:19 +0100, Christian Gollwitzer wrote: > Am 05.03.16 um 19:10 schrieb Wildman: >> On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: >> >>> Anybody have the correct method of adding an icon to a >>> window? I have found several code examples on the web >>> but they all re

Re: [Still off-topic] Physics

2016-03-05 Thread Steven D'Aprano
On Fri, 4 Mar 2016 09:19 pm, Oscar Benjamin wrote: >> As far as the reaction of matter and anti-matter, we've known for about a >> century that mass and energy are related and freely convertible from one >> to the other. That's the famous equation by Einstein: E = m*c**2. Even >> tiny amounts of e

Re: Can I find the class of a method in a decorator.

2016-03-05 Thread Steven D'Aprano
On Sun, 6 Mar 2016 03:21 am, Antoon Pardon wrote: > The idea is that some of these methods will be externally available > and others are not. So that I get an external string and can do > something of the following: > > tryout = Tryout() > > st = read_next_cmd() > > if st in tryout.allowed: >

Re: Can I find the class of a method in a decorator.

2016-03-05 Thread Ian Kelly
On Sat, Mar 5, 2016 at 9:21 AM, Antoon Pardon wrote: > Op 05-03-16 om 16:18 schreef Chris Angelico: >> On Sun, Mar 6, 2016 at 2:05 AM, Antoon Pardon >> wrote: >>> Using python 3.4/3.5 >>> >>> Suppose I have the following class: >>> >>> class Tryout: >>> >>> @extern >>> def method(self, ..

Re: password and username code

2016-03-05 Thread Ben Finney
Ömer sarı writes: > hi , all , l m fresh user and l m trying to learn python by doing > practice but l got stuck in that , l need help , l m a beginner and l > learn some basic things so far so, plz take in consideration that > before command . Welcome! You have chosen a good language for learn

password and username code

2016-03-05 Thread Ömer sarı
hi , all , l m fresh user and l m trying to learn python by doing practice but l got stuck in that , l need help , l m a beginner and l learn some basic things so far so, plz take in consideration that before command . here is my code trial: #login by using username and password loop=1 paword

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Terry Reedy
On 3/5/2016 11:47 AM, Wildman via Python-list wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. No single simple statement work for all situations. You should have specified OS, Python

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 6:45 AM, Christian Gollwitzer wrote: Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right? Rig

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Serhiy Storchaka
On 05.03.16 18:47, Wildman via Python-list wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. On Windows: root.wm_iconbitmap(default='myapp.ico') .ico-file can contain several icons

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:38:57 +, Mark Lawrence wrote: > On 05/03/2016 16:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. >> > > Would you please b

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:08:15 +, Grant Edwards wrote: > On 2016-03-05, Wildman wrote: > >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > You'll have to be a lot more specific a

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Christian Gollwitzer
Am 05.03.16 um 19:10 schrieb Wildman: On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. I found this and it works in Linux but only with bla

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Mark Lawrence
On 05/03/2016 16:47, Wildman via Python-list wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. Would you please be kind enough to read this http://www.catb.org/esr/faqs/smart-questions

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: > Anybody have the correct method of adding an icon to a > window? I have found several code examples on the web > but they all result in an error. Thanks. I found this and it works in Linux but only with black and white xbm images (I would pre

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Grant Edwards
On 2016-03-05, Wildman wrote: > Anybody have the correct method of adding an icon to a > window? I have found several code examples on the web > but they all result in an error. Thanks. You'll have to be a lot more specific about what you mean by "add an icon to a window". Do you just want to

Re: Can I find the class of a method in a decorator.

2016-03-05 Thread Peter Otten
Antoon Pardon wrote: > Op 05-03-16 om 16:18 schreef Chris Angelico: >> On Sun, Mar 6, 2016 at 2:05 AM, Antoon Pardon >> wrote: >>> Using python 3.4/3.5 >>> >>> Suppose I have the following class: >>> >>> class Tryout: >>> >>> @extern >>> def method(self, ...) >>> >>> Now how can I have ac

Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Can I find the class of a method in a decorator.

2016-03-05 Thread Antoon Pardon
Op 05-03-16 om 16:18 schreef Chris Angelico: > On Sun, Mar 6, 2016 at 2:05 AM, Antoon Pardon > wrote: >> Using python 3.4/3.5 >> >> Suppose I have the following class: >> >> class Tryout: >> >> @extern >> def method(self, ...) >> >> Now how can I have access to the Tryout class in >> the e

Photon mass (was: [Still off-top] Physics)

2016-03-05 Thread Thomas 'PointedEars' Lahn
Gene Heskett wrote: > I've never heard of a massless photon, That is unfortunate as it should be common knowledge by now. > and they do exert a push on the surface they are reflected from, […] Photons exert a force on surfaces because they carry *momentum* or, as it had been understood in term

Photon mass (was: [Still off-top] Physics)

2016-03-05 Thread Thomas 'PointedEars' Lahn
Oscar Benjamin wrote: > On 5 March 2016 at 02:51, Gregory Ewing > wrote: >>> The masslessness of photons comes from an extrapolation >>> that leads to a divide by infinity: strictly speaking it's just >>> undefined. >> >> No, it's not. The total energy of a particle is given by >> >>E**2 ==

Re: Can I find the class of a method in a decorator.

2016-03-05 Thread Chris Angelico
On Sun, Mar 6, 2016 at 2:05 AM, Antoon Pardon wrote: > Using python 3.4/3.5 > > Suppose I have the following class: > > class Tryout: > > @extern > def method(self, ...) > > Now how can I have access to the Tryout class in > the extern function when it is called with method > as argument >

Re: [Still off-top] Physics [was Requests author discusses MentalHealthError exception]

2016-03-05 Thread Gene Heskett
On Saturday 05 March 2016 08:11:46 Oscar Benjamin wrote: > On 5 March 2016 at 02:51, Gregory Ewing wrote: > > The masslessness of photons comes from an extrapolation > > > >> that leads to a divide by infinity: strictly speaking it's just > >> undefined. > > > > No, it's not. The total energy o

Can I find the class of a method in a decorator.

2016-03-05 Thread Antoon Pardon
Using python 3.4/3.5 Suppose I have the following class: class Tryout: @extern def method(self, ...) Now how can I have access to the Tryout class in the extern function when it is called with method as argument def extern(f): the_class = f.__class doesn't work, if I write th

Re: ANN: Wing IDE 5.1.10 released

2016-03-05 Thread jumppanen . jussi
On Saturday, March 5, 2016 at 5:55:34 AM UTC+11, Mario R. Osorio wrote: > your messages area misleading; you should label them as ADVERTISEMENT The fact the title contains ANN (announce) means pretty much the same thing. -- https://mail.python.org/mailman/listinfo/python-list

Re: [Still off-top] Physics [was Requests author discusses MentalHealthError exception]

2016-03-05 Thread Oscar Benjamin
On 5 March 2016 at 02:51, Gregory Ewing wrote: > The masslessness of photons comes from an extrapolation >> >> that leads to a divide by infinity: strictly speaking it's just >> undefined. > > No, it's not. The total energy of a particle is given by > >E**2 == c**2 * p**2 + m**2 * c**4 > > wh

Re: Reason for not allowing import twice but allowing reload()

2016-03-05 Thread alien2utoo
Steven, > There are better ways to manage your Python path than to manually insert > paths into sys.path like that. What version of Python are you using? I would love to know, apart from PYTHONPATH and sys.path.append() route. I am using Python 2.7.11 to start with as suggested by my employer. -

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-05 Thread Albert Visser
On Sat, 05 Mar 2016 08:41:39 +0100, wrote: On Saturday, December 12, 2015 at 1:05:29 AM UTC-8, Harbey Leke wrote: Create a class called BankAccount .Create a constructor that takes in an integer and assigns this to a `balance` property. .Create a method called `deposit` that takes in cash

Re: Any comment on using ctypesgen package?

2016-03-05 Thread Mark Lawrence
On 05/03/2016 08:14, jf...@ms4.hinet.net wrote: Chris Angelico at 2016/3/5 UTC+8 1:50:05PM wrote: Your conclusion may well be correct. However, the exact issue you're looking at here might be easily enough fixed; it looks like it's trying to sort things by length, so you can simply use "key=len

Re: Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right? Is there an easy way to run a tkinter program within

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. Is there an easy way to run a tkinter program within an interactive console? Answer: yes, two ways, after removing the r

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-05 Thread Peter Otten
lucasfrank...@gmail.com wrote: > On Saturday, December 12, 2015 at 1:05:29 AM UTC-8, Harbey Leke wrote: >> Create a class called BankAccount >> >> .Create a constructor that takes in an integer and assigns this to a >> `balance` property. >> >> .Create a method called `deposit` that takes in cas

Re: [Still off-top] Physics [was Requests author discusses MentalHealthError exception]

2016-03-05 Thread Marko Rauhamaa
Chris Angelico : > On Sat, Mar 5, 2016 at 1:51 PM, Gregory Ewing > wrote: >> Conservation of energy would be one reason. If you put two particles >> together and got more energy out than went in, where did the extra >> energy come from? > > You borrowed it from the bank, of course. You have to ma

Re: Any comment on using ctypesgen package?

2016-03-05 Thread jfong
Chris Angelico at 2016/3/5 UTC+8 1:50:05PM wrote: > Your conclusion may well be correct. However, the exact issue you're > looking at here might be easily enough fixed; it looks like it's > trying to sort things by length, so you can simply use "key=len" (and > maybe "reverse=True"). After Chris

Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Hi all, is there an easy way to add an application console to a Tkinter program? For instance, can you embed IDLE into a program such that when a button is pressed, it pops up a REPL window where the running program can be examined? Say, there is a simple program like:

Re: Continuing indentation

2016-03-05 Thread Steven D'Aprano
On Sat, 5 Mar 2016 08:14 am, sohcahto...@gmail.com wrote: > I wouldn't call PEP 8 "correct". I would say that you just simply agree > with PEP 8's suggestion. > > You guys are spending way too much time fighting over something that is > clearly subjective. Nobody is "correct" here. There's no

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-05 Thread lucasfrank254
On Saturday, December 12, 2015 at 1:05:29 AM UTC-8, Harbey Leke wrote: > Create a class called BankAccount > > .Create a constructor that takes in an integer and assigns this to a > `balance` property. > > .Create a method called `deposit` that takes in cash deposit amount and > updates the bal