Re: Share Code Tips

2013-07-20 Thread Devyn Collier Johnson
On 07/20/2013 12:26 AM, David Hutto wrote: I didn't see that this was for a chess game. That seems more point and click. Everyone can recognize a bishop from a queen, or a rook from a pawn. So why would case sensitivity matter other than the 16 pieces on the board? Or am I misunderstanding the

Re: Share Code Tips

2013-07-20 Thread Devyn Collier Johnson
On 07/19/2013 09:13 PM, Chris Angelico wrote: On Sat, Jul 20, 2013 at 11:04 AM, Devyn Collier Johnson wrote: On 07/19/2013 07:09 PM, Dave Angel wrote: On 07/19/2013 06:08 PM, Devyn Collier Johnson wrote: On 07/19/2013 01:59 PM, Steven D'Aprano wrote: As for the case-insensitive i

Re: Share Code Tips

2013-07-20 Thread Devyn Collier Johnson
On 07/19/2013 11:18 PM, Steven D'Aprano wrote: On Fri, 19 Jul 2013 18:08:43 -0400, Devyn Collier Johnson wrote: As for the case-insensitive if-statements, most code uses Latin letters. Making a case-insensitive-international if-statement would be interesting. I can tackle that later. For now,

Re: Share Code Tips

2013-07-20 Thread Devyn Collier Johnson
On 07/19/2013 11:44 PM, Steven D'Aprano wrote: On Fri, 19 Jul 2013 21:04:55 -0400, Devyn Collier Johnson wrote: In the future, I want to make the perfect international-case-insensitive if-statement. For now, my code only supports a limited range of characters. Even with casefold, I will have s

Re: Share Code Tips

2013-07-20 Thread Devyn Collier Johnson
On 07/19/2013 09:51 PM, Dave Angel wrote: On 07/19/2013 09:04 PM, Devyn Collier Johnson wrote: Chris Angelico said that casefold is not perfect. In the future, I want to make the perfect international-case-insensitive if-statement. For now, my code only supports a limited range of c

Re: Share Code Tips

2013-07-19 Thread David Hutto
32 if you count black, and white. On Sat, Jul 20, 2013 at 12:26 AM, David Hutto wrote: > I didn't see that this was for a chess game. That seems more point and > click. Everyone can recognize a bishop from a queen, or a rook from a pawn. > So why would case sensitivity matter other than the 16 p

Re: Share Code Tips

2013-07-19 Thread David Hutto
I didn't see that this was for a chess game. That seems more point and click. Everyone can recognize a bishop from a queen, or a rook from a pawn. So why would case sensitivity matter other than the 16 pieces on the board? Or am I misunderstanding the question? On Sat, Jul 20, 2013 at 12:22 AM,

Re: Share Code Tips

2013-07-19 Thread David Hutto
It seems that you could use import re, in my mind's pseudo code, to compile a translational usage of usernames/passwords that could remain case sensitive by using just the translational dictionaries, and refining with data input tests/unit tests. On Sat, Jul 20, 2013 at 12:15 AM, David Hutto wrot

Re: Share Code Tips

2013-07-19 Thread David Hutto
It seems, without utilizing this, or googling, that a case sensitive library is either developed, or could be implemented by utilizing case sensitive translation through a google translation page using an urlopener, and placing in the data to be processed back to the boolean value. Never attempted,

Re: Share Code Tips

2013-07-19 Thread Steven D'Aprano
On Fri, 19 Jul 2013 21:04:55 -0400, Devyn Collier Johnson wrote: > In the future, I want to > make the perfect international-case-insensitive if-statement. For now, > my code only supports a limited range of characters. Even with casefold, > I will have some issues as Chris Angelico mentioned. Th

Re: Share Code Tips

2013-07-19 Thread David Hutto
And also don't forget special char, or that it can bbe var char, or char in the DB lookup in boolean with the username. On Fri, Jul 19, 2013 at 11:43 PM, David Hutto wrote: > Just use an explanatory user tip that states it should be case sensitive, > just like with most sites, or apps. > > > On

Re: Share Code Tips

2013-07-19 Thread David Hutto
Just use an explanatory user tip that states it should be case sensitive, just like with most sites, or apps. On Fri, Jul 19, 2013 at 10:21 AM, Joel Goldstick wrote: > > > > On Fri, Jul 19, 2013 at 9:51 AM, Devyn Collier Johnson < > devyncjohn...@gmail.com> wrote: > >> Aloha Python Users! >> >>

Re: Share Code Tips

2013-07-19 Thread David Hutto
Just use an explanatory user tip that states it should be case sensitive, just like with most sites, or apps. On Fri, Jul 19, 2013 at 9:13 PM, Chris Angelico wrote: > On Sat, Jul 20, 2013 at 11:04 AM, Devyn Collier Johnson > wrote: > > > > On 07/19/2013 07:09 PM, Dave Angel wrote: > >> > >> On

Re: Share Code Tips

2013-07-19 Thread Steven D'Aprano
On Fri, 19 Jul 2013 18:08:43 -0400, Devyn Collier Johnson wrote: > As for the case-insensitive if-statements, most code uses Latin letters. > Making a case-insensitive-international if-statement would be > interesting. I can tackle that later. For now, I only wanted to take > care of Latin letters

Re: Share Code Tips

2013-07-19 Thread Dave Angel
On 07/19/2013 09:04 PM, Devyn Collier Johnson wrote: Chris Angelico said that casefold is not perfect. In the future, I want to make the perfect international-case-insensitive if-statement. For now, my code only supports a limited range of characters. Even with casefold, I will have s

Re: Share Code Tips

2013-07-19 Thread Chris Angelico
On Sat, Jul 20, 2013 at 11:04 AM, Devyn Collier Johnson wrote: > > On 07/19/2013 07:09 PM, Dave Angel wrote: >> >> On 07/19/2013 06:08 PM, Devyn Collier Johnson wrote: >>> >>> >>> On 07/19/2013 01:59 PM, Steven D'Aprano wrote: >> >> >> >>> >>> >>> As for the case-insensitive if-statements, m

Re: Share Code Tips

2013-07-19 Thread Devyn Collier Johnson
On 07/19/2013 07:09 PM, Dave Angel wrote: On 07/19/2013 06:08 PM, Devyn Collier Johnson wrote: On 07/19/2013 01:59 PM, Steven D'Aprano wrote: As for the case-insensitive if-statements, most code uses Latin letters. Making a case-insensitive-international if-statement would be interes

Re: Share Code Tips

2013-07-19 Thread Chris Angelico
On Sat, Jul 20, 2013 at 8:08 AM, Devyn Collier Johnson wrote: > As for the case-insensitive if-statements, most code uses Latin letters. > Making a case-insensitive-international if-statement would be interesting. I > can tackle that later. For now, I only wanted to take care of Latin letters. > I

Re: Share Code Tips

2013-07-19 Thread Chris Angelico
On Sat, Jul 20, 2013 at 8:10 AM, Devyn Collier Johnson wrote: > > On 07/19/2013 12:19 PM, Steven D'Aprano wrote: >> >> On Fri, 19 Jul 2013 10:21:10 -0400, Joel Goldstick wrote: >> >>> >> class="gmail_quote"> >> >> [snip 70-odd lines of HTML...] >> >>> I'm guessing you may be posting with html. So

Re: Share Code Tips

2013-07-19 Thread Dave Angel
On 07/19/2013 06:08 PM, Devyn Collier Johnson wrote: On 07/19/2013 01:59 PM, Steven D'Aprano wrote: As for the case-insensitive if-statements, most code uses Latin letters. Making a case-insensitive-international if-statement would be interesting. I can tackle that later. For now, I on

Re: Share Code Tips

2013-07-19 Thread Devyn Collier Johnson
On 07/19/2013 01:59 PM, Steven D'Aprano wrote: On Fri, 19 Jul 2013 09:51:23 -0400, Devyn Collier Johnson wrote: def KDE_VERSION(): print(subprocess.getoutput('kded4 --version | awk -F: \'NR == 2 {print $2}\'').strip()) ##Get KDE version## I run KDE 3, and the above does not work for

Re: Share Code Tips

2013-07-19 Thread Devyn Collier Johnson
On 07/19/2013 12:19 PM, Steven D'Aprano wrote: On Fri, 19 Jul 2013 10:21:10 -0400, Joel Goldstick wrote: [snip 70-odd lines of HTML...] I'm guessing you may be posting with html. So all your code runs together. -- Joel Goldstickhttp://joelgoldstick.com My irony meter didn't merely ex

Re: Share Code Tips

2013-07-19 Thread Steven D'Aprano
On Fri, 19 Jul 2013 09:51:23 -0400, Devyn Collier Johnson wrote: > def KDE_VERSION(): > print(subprocess.getoutput('kded4 --version | awk -F: > \'NR == 2 {print $2}\'').strip()) ##Get KDE version## I run KDE 3, and the above does not work for me. *half a wink* By the way, a comment that

Re: Share Code Tips

2013-07-19 Thread Steven D'Aprano
On Fri, 19 Jul 2013 10:21:10 -0400, Joel Goldstick wrote: > class="gmail_quote"> [snip 70-odd lines of HTML...] > I'm guessing you may be posting with html.  So all your code runs > together. > -- dir="ltr"> Joel Goldstickhttp://joelgoldstick.com > My irony meter didn't merely explode, it a

Re: Share Code Tips

2013-07-19 Thread Joel Goldstick
On Fri, Jul 19, 2013 at 9:51 AM, Devyn Collier Johnson < devyncjohn...@gmail.com> wrote: > Aloha Python Users! > > I have some coding tips and interesting functions that I want to share > with all of you. I want to give other programmers ideas and inspiration. It > is all Python3; most of it shoul

Share Code Tips

2013-07-19 Thread Devyn Collier Johnson
Aloha Python Users! I have some coding tips and interesting functions that I want to share with all of you. I want to give other programmers ideas and inspiration. It is all Python3; most of it should work in Python2. I am a Unix/Linux person, so some of these will only work on Unix systems. S