Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Need GUI pop-up to edit a (unicode ?) string

Reply
Thread Tools

Need GUI pop-up to edit a (unicode ?) string

 
 
rantingrick
Guest
Posts: n/a
 
      01-26-2011
On Jan 26, 12:53*am, Terry Reedy <tjre...@udel.edu> wrote:

> I only see "self.wait_window(self)" in the Dialog base class and not in
> SimpleDialog, which is what I though you were talking about. It is the
> last line of Dialog.__init__.


Yes. In the module "tkSimpleDialog" the class "Dialog" is what i am
referring to. Sorry for the confusion.

> It appears that the intention is that all
> configuration be done in the body and button_box methods which are
> called earlier.


Yes exactly. And this works well most of the time. However there are
many times where you may want to create a dialog with say a Label. And
you do not want to hard code the string displayed on the label.
However you cannot change the string once you initialize the dialog
because it enters a "modal wait loop". So what i am proposing is that
we change tkSimpleDialog to be like any other modal dialogs out there.
We move the modal code into a show method and use the dialog like i
suggested. I can send you a patch if you would be interested. My patch
does break backward compatibility. However we can make it compatible
somehow. Or an alternative approach would be to create a new dialog
module and then depreciate tkSimpleDialog. Let me know on or off list
if you are interested.

> As far as I know, anything contributed to the stdlib has been licensed
> by the author to be redistributed under the Python license and can be
> patched by the developers. (This is one reason for people to not
> contribute their code to the stdlib.)


I don't understand what that means. Are you suggesting that
contributing code is bad?

 
Reply With Quote
 
 
 
 
Terry Reedy
Guest
Posts: n/a
 
      01-26-2011
On 1/26/2011 2:11 AM, rantingrick wrote:
> On Jan 26, 12:53 am, Terry Reedy<tjre...@udel.edu> wrote:
>
>> I only see "self.wait_window(self)" in the Dialog base class and not in
>> SimpleDialog, which is what I though you were talking about. It is the
>> last line of Dialog.__init__.

>
> Yes. In the module "tkSimpleDialog"


In 3.x, the module is now tk.simpledialog -- all lower case. The purpose
of all lowercase module names is to avoid confusion with upper case
class names.

> the class "Dialog" is what i am
> referring to. Sorry for the confusion.


and there is also a SimpleDialog class.

>
>> It appears that the intention is that all
>> configuration be done in the body and button_box methods which are
>> called earlier.

>
> Yes exactly. And this works well most of the time. However there are
> many times where you may want to create a dialog with say a Label. And
> you do not want to hard code the string displayed on the label.
> However you cannot change the string once you initialize the dialog
> because it enters a "modal wait loop". So what i am proposing is that
> we change tkSimpleDialog to be like any other modal dialogs out there.


SimpleDialog has a go method. Dialog does not, but I see no reason (yet)
why it could not.

> We move the modal code into a show method and use the dialog like i
> suggested. I can send you a patch if you would be interested.


I saw that first and was puzzled what you were asking. Clearer now.

> My patch
> does break backward compatibility. However we can make it compatible
> somehow. Or an alternative approach would be to create a new dialog
> module and then depreciate tkSimpleDialog. Let me know on or off list
> if you are interested.
>
>> As far as I know, anything contributed to the stdlib has been licensed
>> by the author to be redistributed under the Python license and can be
>> patched by the developers. (This is one reason for people to not
>> contribute their code to the stdlib.)

>
> I don't understand what that means. Are you suggesting that
> contributing code is bad?


If you write code and want to keep absolute control over it -- the api,
the doc, the coding style, and the test methods -- then yes it can be
bad, especially for people who are not active core developers.
Contributing can also be a great -- if the module already meets with
approval or if one is flexible and wants the critical review and likely
improvement and increased usage. It depends on one's goal in writing the
code.

--
Terry Jan Reedy

 
Reply With Quote
 
 
 
 
rantingrick
Guest
Posts: n/a
 
      01-26-2011
On Jan 26, 2:11*am, Terry Reedy <tjre...@udel.edu> wrote:

> In 3.x, the module is now tk.simpledialog -- all lower case. The purpose
> of all lowercase module names is to avoid confusion with upper case
> class names.


Yes Terry, i found the new module and documented the bugs in a new
thread. I am not sure if the bugs are still present in the current RC
(Note: i have 3.1.1 installed) however i would bet they are. As soon
as i can find the current source in svn i'll update the "bug thread".
However i cannot find it. If you can give a link that would be great!
 
Reply With Quote
 
Bryan
Guest
Posts: n/a
 
      01-27-2011
On Jan 25, 5:02*pm, rantingrick <rantingr...@gmail.com> wrote:
> On Jan 25, 3:54*pm, Bryan <bryan.oak...@gmail.com> wrote:
> ... And you people wonder why i hate Tkinter!


Honestly, I don't think anyone wonders why _you_ hate Tkinter, you've
made that abundantly clear.

 
Reply With Quote
 
Stephen Hansen
Guest
Posts: n/a
 
      01-27-2011
On 1/25/11 3:02 PM, rantingrick wrote:
> This is a major flaw in the design and i would be
> happy to fix the flaw. However our "friend" Fredrick decided to
> copyright the module to himself! What a jerk! Which is quite
> disgusting considering that Tkinter, and TclTk are completely open
> source!



Uh. ... LOL.

Copyright doesn't mean what you think it means.

Tkinter is copyrighted. Python is copyrighted. Tcl/TK is copyrgithed.

In fact: everything that is "open source" is copyrighted. By
definition[* see footnote].

Open source is simply copyrighted material that has been released under
a *license* that allows you to copy it, too: sometimes with some
significant catches (i.e., GPL), sometimes with basically no strings at
all except not to sue (i.e., MIT).

So.

Its a major flaw? Well! Go fix it, you have every right to. Python's
source is released under a rather liberal license, allowing you to do
just about anything you want with it. Including fix it and even-- gasp--
submit those fixes to the bug-tracker for inclusion.


--

Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/

* Some software has no copyright, such as SQLITE: it has been released
into the public domain. But that is exceedingly rare, and can be a bit
complicated as public domain and its meaning varies from jurisdiction to
jurisdiction. Whereas copyright is pretty standard across the board and
subject to a whole lot of international treaties. I'm really not sure
you can legitimately call public domain software open source: its free
to use, modify, and do anything you want with (provided you're in a
jurisdiction which recognizes public domain), but it has its own
particular legal ... issues. Then again, IANAL.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)

iQEcBAEBAgAGBQJNQPkgAAoJEKcbwptVWx/l2EoIALbYtmfWsV55bsVShkIgAXJU
wxmwrmOgZpQyB1df51zWluCQAxSi95TucGu6SMozcASrOK/IXshdd51cDxOxnbpi
FTephdc6VK5GTSCBVwofuArObQjBhMiCTdYml3hJkSjMtd8LCQ ZFeQTAhNcv4fAM
te1sUDj7QHX66uu1trhFvUYlzdeTArCYLtA2WI25Q6DTEjsjLm GUOlmPPIVCpEo2
MLDkxQbkRnuO/vmcdos9Yv1xj0IRH+e/f8yyGxgB4ZGE9N0YNQIflm4lRn8rKR9z
EWNnLjwzSssJvmYsZdqwP0D8effT6IAK0xYfwWOWlMwffvrY/IIvU7s4H4CAc6M=
=w/Kg
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      01-27-2011
On 2011-01-27, Stephen Hansen <me+list/> wrote:
> On 1/25/11 3:02 PM, rantingrick wrote:
>> This is a major flaw in the design and i would be
>> happy to fix the flaw. However our "friend" Fredrick decided to
>> copyright the module to himself! What a jerk! Which is quite
>> disgusting considering that Tkinter, and TclTk are completely open
>> source!

>
> Uh. ... LOL.
>
> Copyright doesn't mean what you think it means.
>
> Tkinter is copyrighted. Python is copyrighted. Tcl/TK is copyrgithed.
>
> In fact: everything that is "open source" is copyrighted. By
> definition[* see footnote].


One (domestic US) exception would be open-source software written by
an employee of the US federal government. Works produced by the US
Government are not copyrighted under US domestic copyright law. Such
works are copyrighted under international law (which is probably what
the Python maintainers care about).

--
Grant Edwards grant.b.edwards Yow! Wow! Look!! A stray
at meatball!! Let's interview
gmail.com it!
 
Reply With Quote
 
Stephen Hansen
Guest
Posts: n/a
 
      01-27-2011
On 1/27/11 10:04 AM, Grant Edwards wrote:
> On 2011-01-27, Stephen Hansen <me+list/> wrote:
>> On 1/25/11 3:02 PM, rantingrick wrote:
>>> This is a major flaw in the design and i would be
>>> happy to fix the flaw. However our "friend" Fredrick decided to
>>> copyright the module to himself! What a jerk! Which is quite
>>> disgusting considering that Tkinter, and TclTk are completely open
>>> source!

>>
>> Uh. ... LOL.
>>
>> Copyright doesn't mean what you think it means.
>>
>> Tkinter is copyrighted. Python is copyrighted. Tcl/TK is copyrgithed.
>>
>> In fact: everything that is "open source" is copyrighted. By
>> definition[* see footnote].

>
> One (domestic US) exception would be open-source software written by
> an employee of the US federal government. Works produced by the US
> Government are not copyrighted under US domestic copyright law. Such
> works are copyrighted under international law (which is probably what
> the Python maintainers care about).


I've actually wondered a bit about that: but the only open source
software that I'm aware of that's been government-adjacent has ended up
being written/owned by some University or joint venture funded by a
government agency -- it didn't fall into the public domain category of
content created directly by the federal government.

Are you aware of any code out there that is? Just curious. I'm not
arguing that the exception doesn't exist or anything.

--

Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)

iQEcBAEBAgAGBQJNQbcSAAoJEKcbwptVWx/l9zkH/jZrIcnJz7qsjYW02PqhVQCh
2zCdQh8TDeKEJgtCW+ptbDDFxhdv1clfnPmBVqO6RNnHemycdG xLpLqCFwFQk1oL
VlbwbrBJARcyDqbcTW235JL4+y0Je3ie4yRz7iX4g1MDMddD/GDt8oQR2bXW/oJ+
xzT1cQyQuuHczyaLqCsJp4b9La4yMRuch0w4FVmjLGNnVYwRVc v9NrbuZV2kgNLT
+HxDrTFH5WhbYGJ9cDUAAzwTJl2lYrbBnana66J3kJWo4UGHv8 jM3T162ab6wXS4
GM29zbS3qKeyQaWSmB51iw6apt2kP18XlBmB5YHfK6fFJTPhL6 uERYYX67LP+0Q=
=6ey0
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      01-27-2011
On 2011-01-27, Stephen Hansen <me+list/> wrote:
> On 1/27/11 10:04 AM, Grant Edwards wrote:
>> On 2011-01-27, Stephen Hansen <me+list/> wrote:
>>
>>> In fact: everything that is "open source" is copyrighted. By
>>> definition[* see footnote].

>>
>> One (domestic US) exception would be open-source software written by
>> an employee of the US federal government. Works produced by the US
>> Government are not copyrighted under US domestic copyright law. Such
>> works are copyrighted under international law (which is probably what
>> the Python maintainers care about).

>
> I've actually wondered a bit about that: but the only open source
> software that I'm aware of that's been government-adjacent has ended
> up being written/owned by some University or joint venture funded by
> a government agency -- it didn't fall into the public domain category
> of content created directly by the federal government.


That seems to be the usual case.

> Are you aware of any code out there that is? Just curious. I'm not
> arguing that the exception doesn't exist or anything.


No, I can't point to anything significant or recent. I have vague
memories of stuff from a long time ago (back when open-source software
travelled hand-to-hand on DECUS tapes) written by people at NOAA or
USGS that was copyright-free.

--
Grant Edwards grant.b.edwards Yow! RELATIVES!!
at
gmail.com
 
Reply With Quote
 
Robert Kern
Guest
Posts: n/a
 
      01-27-2011
On 2011-01-27 12:18 , Stephen Hansen wrote:
> On 1/27/11 10:04 AM, Grant Edwards wrote:
>> On 2011-01-27, Stephen Hansen<me+list/> wrote:
>>> On 1/25/11 3:02 PM, rantingrick wrote:
>>>> This is a major flaw in the design and i would be
>>>> happy to fix the flaw. However our "friend" Fredrick decided to
>>>> copyright the module to himself! What a jerk! Which is quite
>>>> disgusting considering that Tkinter, and TclTk are completely open
>>>> source!
>>>
>>> Uh. ... LOL.
>>>
>>> Copyright doesn't mean what you think it means.
>>>
>>> Tkinter is copyrighted. Python is copyrighted. Tcl/TK is copyrgithed.
>>>
>>> In fact: everything that is "open source" is copyrighted. By
>>> definition[* see footnote].

>>
>> One (domestic US) exception would be open-source software written by
>> an employee of the US federal government. Works produced by the US
>> Government are not copyrighted under US domestic copyright law. Such
>> works are copyrighted under international law (which is probably what
>> the Python maintainers care about).

>
> I've actually wondered a bit about that: but the only open source
> software that I'm aware of that's been government-adjacent has ended up
> being written/owned by some University or joint venture funded by a
> government agency -- it didn't fall into the public domain category of
> content created directly by the federal government.
>
> Are you aware of any code out there that is? Just curious. I'm not
> arguing that the exception doesn't exist or anything.


A lot of stuff from NIST is legitimately public domain. E.g.

http://fingerprint.nist.gov/NFIS/

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView edit validation, edit dropdown list, delete popup confirm =?Utf-8?B?a2Vu?= ASP .Net 1 01-23-2006 12:51 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM
Edit All Function for DataGrid, and Moving the Edit Function in a DataGrid Schultz ASP .Net 3 02-14-2005 04:47 AM
copying value of DDL in a Datagrid "pre-edit command" to value in "post edit command" San Diego Guy ASP .Net 0 08-07-2003 08:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57