Re: Use the Source Luke

2011-01-28 Thread rusi
On Jan 29, 4:10 am, Ben Finney  wrote:

> Note that Raymond is speaking specifically in the context of free
> software, where the license is by definition permitting free
> redistribution of the source code.

It is an obvious necessary condition that for code to be opened it
should be open (source).
However the necessary condition is not sufficient.

>
> I have a quibble with the framing:
>
> > The rest of the blame lies with installers. They all treat
> > human-readable scripts like they were binaries and tuck the code away
> > in a dark corner.

Consider this example:
The emacs source if compiled from source will give you help for each
lisp or even builtin (C) function out of the box from inside emacs.
However if you get the emacs package from debian/ubuntu you will get
neither unless you install el files -- which is fine -- just install
the el package.  About the C sources?  I dont believe that one can get
that linkage from within apt; one just hast to compile oneself.  (I
would be happy to be surprised on this).

Isn't this an instance of the problem that Raymond is talking of?

[Personal note:  Ive been a python user and teacher for nearly 10
years and would eagerly welcome more easy code-open-ness]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rusi
On Jan 27, 10:47 pm, Grant Edwards  wrote:
> So you're saying that you don't see any value in easing communication,
> nor presumably in communication itself?

A Goedel-ian meta-recursion problem here Grant:

You want to communicate the need for communication to one who does not
see the need/value of communication
-- 
http://mail.python.org/mailman/listinfo/python-list


Employments Chance in Management work.

2011-01-28 Thread gaurav
The Greatest site to Start your own Work from Home earn start earning.
http://rojgars1.webs.com/gov.htmhttp://rojgars.webs.com/bankingjobs.htm

Great earning in Management careers.
Sales and Management work.
http://managementjobs.webs.com/pm.htm & 
http://topcareer.webs.com/humanresourcemgmt.htm
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Raymond Hettinger
[Jack Diedrich]
> I think you overestimate how common it used to be to carry around the
> sourcecode for the software you use compared to now;  In the past it
> wasn't even always possible - if the Sun cc compiler core dumps you
> have no recourse to code.

You're right of course.  For the Python world though, there does seem
to have been a change.  A decade ago in this newsgroup, there were
frequent references to standard library source.  I don't see that
much anymore.


> Promoting the idea of doing it is good
> because it /is/ a novel idea to many people.  Promoting the idea of
> making it extremely easy via documentation links is good because it is
> new as well.

Judging from the comments so far, it looks like everyone here agrees.

> Modern tools are making this easier than it used to be so your call
> for making it easier still is well timed.  Github/bitbucket/launchpad
> have combined the source with documentation;

Do they typically feature multiple links from documentation specifics
to corresponding code specifics?

Part of my thesis is that it is not enough to make docs and source
available, they need to be linked in a way that helps people
answer specific problems without having to invest a week in learning
the gestalt of a foreign code base.


> Worst case the docstrings suck and I just read the code.

That's a good habit to have.  I find that my willingness to do it
varies across projects -- I'm happy to look at the Mercurial source
but could never being myself to look at the innards of Git or CouchDB.


> * Anecdote.  I was in a room with Tim Peters and has some questions
> about the interface to code he wrote so I thought "Hey, I'll just ask
> Tim!"  I asked him and he replied "I'm not sure what you're asking -
> do you want me to read the code aloud to you?"  So I just went and
> read it.

Thanks for the anecdote.  I love that story :-)
Uncle Timmy's style is both clever and pointed.


Raymond


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Ben Finney
Jack Diederich  writes:

> I think you overestimate how common it used to be to carry around the
> sourcecode for the software you use compared to now;  In the past it
> wasn't even always possible - if the Sun cc compiler core dumps you
> have no recourse to code.

Note that Raymond is speaking specifically in the context of free
software, where the license is by definition permitting free
redistribution of the source code.

So it doesn't cover the case of things like the Sun C compiler, either
now or in the past.

> Promoting the idea of doing it is good because it /is/ a novel idea to
> many people. Promoting the idea of making it extremely easy via
> documentation links is good because it is new as well.

When one notes that the context is specifically free software projects,
the promotion of reading the source code is even more a good idea.

-- 
 \ “This [Bush] Administration is not sinking. This Administration |
  `\   is soaring. If anything they are rearranging the deck chairs on |
_o__) the Hindenburg.” —Steven Colbert, 2006-04-29 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determining calculation order for group of related calculations

2011-01-28 Thread python
Ian,

> A google search for "python topological sort" returns lots of results.

Perfect!! That's exactly what I was looking for but couldn't manage to
put a name to.

Cheers,
Malcolm
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Jack Diederich
On Fri, Jan 28, 2011 at 1:32 PM, Raymond Hettinger  wrote:
> I hoping a new trend will start with dev's putting direct
> source code links in their documentation:
>
>  http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/
>
> I'm looking for more examples of projects that routinely
> link their docs back into relavant sections of code.
> Have any of you all seen other examples besides
> the Go language docs and the Python docs?

I think you overestimate how common it used to be to carry around the
sourcecode for the software you use compared to now;  In the past it
wasn't even always possible - if the Sun cc compiler core dumps you
have no recourse to code.  Promoting the idea of doing it is good
because it /is/ a novel idea to many people.  Promoting the idea of
making it extremely easy via documentation links is good because it is
new as well.

Modern tools are making this easier than it used to be so your call
for making it easier still is well timed.  Github/bitbucket/launchpad
have combined the source with documentation; github especially because
the README on github is the canonical documentation and the source is
only one mouse click away.  ack-grep has changed my life.  Sure, I
could always do the same thing in the past with find+grep but ack-grep
makes it so easy (switches for language file types!) that I use it
much more;  I have "ag" aliased to "ack-grep --python" and I use it
all the f'ing time because it costs me near zero to do so.  Likewise I
have an alias "cdp" that "cd"s me into the directory where any given
python module lives.  "cdp collections" puts me straight into
"/usr/local/lib/python2.6" - again, it makes it so easy to look at
sourcecode that I do it all the time.  It is usually quicker to do
cdp/python/import module_name/help(module_name) than to look up the
docs.  Worst case the docstrings suck and I just read the code.

* Anecdote.  I was in a room with Tim Peters and has some questions
about the interface to code he wrote so I thought "Hey, I'll just ask
Tim!"  I asked him and he replied "I'm not sure what you're asking -
do you want me to read the code aloud to you?"  So I just went and
read it.

-Jack
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determining calculation order for group of related calculations

2011-01-28 Thread Ian Kelly
On Fri, Jan 28, 2011 at 4:29 PM,   wrote:
> Wondering if there's a Python library or algorithm for determining the order
> in which a group of calculations should be performed when some calculations
> reference the result of other equations. I don't need anything as fancy as a
> spreadsheet engine, however I do need to detect recursive equations and
> treat these situations as errors.

A google search for "python topological sort" returns lots of results.
-- 
http://mail.python.org/mailman/listinfo/python-list


Determining calculation order for group of related calculations

2011-01-28 Thread python
Wondering if there's a Python library or algorithm for
determining the order in which a group of calculations should be
performed when some calculations reference the result of other
equations. I don't need anything as fancy as a spreadsheet
engine, however I do need to detect recursive equations and treat
these situations as errors.

In terms of an example: What I would like to do is order the
following equations such that all the dependent variables are
calculated before they are referenced by later calculations.

a + b + c = d
a + b + d = e
a + e = f
d + e + f = g
a + e = h

Thank you,
Malcolm
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Ben Finney
Raymond Hettinger  writes:

> I hoping a new trend will start with dev's putting direct
> source code links in their documentation:
>
>  http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/

That's a good article overall.

I have a quibble with the framing:

> The rest of the blame lies with installers. They all treat
> human-readable scripts like they were binaries and tuck the code away
> in a dark corner.

That’s hardly a “blame” of installers. The modules are placed in such
locations because they need to be accessible in a hierarchy at a
location that is known to not conflict with anything else, and be
predictable for the Python interpreter on the system.

If you want to blame anything for this (though I think it’s inaccurate
to frame it as a problem), the correct target of your accusation is the
fact that a filesystem path is the identifier for these modules that
will be used by programs to find them.


As for reading the source and making it more available to programmers,
yes, I agree wholeheartedly. Encouraging the routine reading of other
projects’s source code is a good thing, and thank you for beating the
drum.

-- 
 \   “I distrust those people who know so well what God wants them |
  `\to do to their fellows, because it always coincides with their |
_o__)  own desires.” —Susan Brownell Anthony, 1896 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Christian Tismer

On 1/25/11 12:04 AM, Steven D'Aprano wrote:

On Mon, 24 Jan 2011 12:24:24 -0800, Robin Dunn wrote:


On Jan 24, 12:03 pm, rantingrick  wrote:

On Jan 24, 1:57 pm, Robin Dunn  wrote:

BTW, on behalf of the wxPython community I'd like to apologize for
the havoc caused by the flaming troll escaping from his cage.  In
general wxPython users are much less militant and zealotty and honor
everyone's freedom to choose which ever UI tool kit works the best
for their own needs.

Well we forgive Byran, but we will not forget! :)

For the record, that is not who I was referring to.

I don't believe that anyone in their right mind could have imagined even
for a second that you were referring to Bryan.

As we all experienced milleniums before:
Self-criticism is the weakest, maybe totally missing
virtue of a bozo.
Which is great, because he won't recognize the irony ;-)

--
Christian Tismer :^)
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A :*Starship* http://starship.python.net/
14109 Berlin : PGP key ->  http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04   9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
  whom do you want to sponsor today?   http://www.stackless.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick

Rick:
> Man look at the state of Tkinter. Look at the bugs and mediocre code i
> exposed. Are you going to set there with a strait face and tell me
> many people are using Tkinter. Come on Kevin, be realistic!

Tyler:
> You also uncovered bugs in WX (remember those segfaults, RR)?

Yes i do, and i also remember Robin pointing out that those who were
experiencing segfaults were experiencing them because they did not run
wxPython correctly.But lets just ignore facts for a moment, you do
this all the time. But just to make a point i will entertain you.

Let's imagine that the segfaults are in fact only a wxPython problem.
Now imagine you are buying a car and you have two choices. You can
choose an old Yugo with 300,000 miles and a bad paint job or you can
choose a fancy sports car fresh off the assembly line that contains
the most modern technology. Both the new sports car and the old and
dumpy Yugo have brand new tires.  You're argument about segfauts would
be akin to making the decision solely based on the tires. Completely
moronic.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A and B but not C in list

2011-01-28 Thread CM
Thanks, everyone, for your suggestions.

-Che
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread rantingrick
On Jan 28, 2:34 pm, Benjamin Kaplan  wrote:

> It's not that people don't appreciate your help.

First: Thanks for the reasonable response.

> It's that the mailing
> list is not the appropriate place for this type of discussion.

Actually i see you point but there is a good reason behind me bringing
this up here. I want to bring to the attention of everyone how little
interest there is for Tkinter. Not many folks are using Tkinter, most
hate Tkinter,  and not many (if any) are capable of patching the
Tkinter source code. It has been mentioned in this thread that the
last person to do any real work on Tkinter is someone from two years
ago. This is insanity! You know why i think nobody cares..

 * Too much trouble to get patches submitted.
 * Nobody really cares at py-dev so the patches never get resolved.
 * There is resistance in the community to "outsiders".

This mentality is setting us up for a bad bad future. Why are people
so pedantic and emotional. Python does not belong to me, or you, or
anybody. This is a team effort. And whist we need people doing work we
also need to listen to the community. I have had nothing but an uphill
battle dealing with a few "elites" on this list. Anybody can see that
i am serious about helping out. Heck, i want Tkinter to be removed
from the stdlib but yet i still offer help to noobies and still report
bugs.

> Once
> it's been verified as a bug, you should create a ticket on the bug
> tracker, come back here and post a link, and then move the discussion
> over to the tracker.

Agreed. However i would rather just write a patch, send it to some
email and be done. Or just commit the changes myself.  This bug
tracker is just bureaucracy at it's worst. You are making this process
too hard and people are not going to get involved when they have to
jump through 20 hoops just to patch three lines of freaking code!
There is too much red tape here. I COULD HAVE PATCHED HUNDREDS OF LINE
OF CODE IN THE TIME I HAVE WASTED WITH THE BUG TRACKER PROCESS ALONE!
I understand we need checks and balances but at some point the very
safety net we rely on becomes a noose around our neck!  Something
needs to be done!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-28 Thread Benjamin Kaplan
On Fri, Jan 28, 2011 at 3:42 PM, bansi  wrote:
> On Jan 28, 1:52 pm, Benjamin Kaplan  wrote:
>> On Fri, Jan 28, 2011 at 1:33 PM, bansi  wrote:
>> > On Jan 28, 9:46 am, bansi  wrote:
>> >> On Jan 26, 8:31 pm, MRAB  wrote:
>>
>> >> > On 27/01/2011 00:57, bansi wrote:
>>
>> >> > > On Jan 26, 6:25 pm, Ethan Furman  wrote:
>> >> > >> bansi wrote:
>>
>> >> > >>   >  First namelookupWrapper.py running under Python 2.6 accept 
>> >> > >> arguments
>> >> > >>   >  from stdin and uses csv reader object to read it i.e.
>> >> > >>   >  r=csv.reader(sys.stdin)
>>
>> >> > >>   >  And then it has to pass csv reader object to another python 
>> >> > >> script
>> >> > >>   >  namelookup.py running under Python 2.7 because it uses pyodbc to
>> >> > >>   >  connect to database and iterates thru reader object
>>
>> >> > >> Ben Finney wrote:
>> >> > >>> bansi  writes:
>>
>> >> >  Thanks Chris. Sorry for mis-communicating, the two python scripts 
>> >> >  are
>> >> >  dependant in a way that namelookupWrapper.py needs to pass csv 
>> >> >  record
>> >> >  object to another python script
>>
>> >> > >>> Why have you structured them that way, though? What constraint is
>> >> > >>> keeping you from doing the work in a single process, where the CSV
>> >> > >>> reader object can be shared?
>>
>> >> >  If thats not possible then please let me know how to do the 
>> >> >  workaround
>> >> >  i didnt understood the import thing and not sure if it helps in my
>> >> >  case
>>
>> >> > >>> The problem as you've described it so far is best solved by having a
>> >> > >>> single process accessing the CSV reader object in memory. If that
>> >> > >>> doesn't suit your use case, you'll need to explain why not.
>>
>> >> > >> In other words, why can't you use Python 2.7 to accept input and
>> >> > >> generate a csv.reader?
>>
>> >> > >> ~Ethan~- Hide quoted text -
>>
>> >> > >> - Show quoted text -
>>
>> >> > > Ethan,
>> >> > > The python script takes the input from Splunk (http://www.splunk.com/
>> >> > > base/Documentation/) which supports only Python 2.6
>> >> > > So the real constraint is Splunk supports only Python 2.6 .
>>
>> >> > > As you know Python 2.6 doesnt support or doesnt have pyodbc install
>> >> > > for Windows  64 bit OS
>> >> > > So i installed Python 2.7 and thereafter pyodbc install for Windows 64
>> >> > > bit OS for Python 2.7
>>
>> >> > Have you actually tried Splunk with Python 2.7? It might not work with
>> >> > versions which are earlier than Python 2.6, but that doesn't
>> >> > necessarily mean that it won't work with versions of Python 2 which are
>> >> > later than Python 2.6 (unless the documentation says that it must be
>> >> > Python 2.6).- Hide quoted text -
>>
>> >> > - Show quoted text -
>>
>> >> Splunk's latest version 4.1.6 doesn't support Python 2.7
>> >> I tried the import trick but it didnt work because the real script
>> >> which runs under Python 2.7 has import pyodbc so it results in
>> >> following error
>>
>> >> c:\Splunk\etc\apps\search\bin>splunk cmd python namelookupWrapper.py
>> >> memberId memberName < memberInput.csv
>> >> Traceback (most recent call last):
>> >>   File "namelookupWrapper.py", line 3, in 
>> >>     import namelookup
>> >>   File "c:\Splunk\etc\apps\search\bin\namelookup.py", line 7, in
>> >> 
>> >>     import pyodbc
>> >> ImportError: DLL load failed: The specified module could not be found.
>>
>> >> Please let me know if i am missing something on import. If so please
>> >> provide me with an example- Hide quoted text -
>>
>> >> - Show quoted text -
>>
>> > Here are some more details from my earlier posting. Please click the
>> > below link
>>
>> >http://answers.splunk.com/questions/11145/its-getting-mysterious-to-m...
>> > --
>> >http://mail.python.org/mailman/listinfo/python-list
>>
>> Have you tried downloading the source for PyODBC and compiling it
>> yourself? All you need to do is python setup.py install. My guess
>> would be that it works just fine on 64-bit Python 2.6, they just never
>> released a re-compiled version of it for that platform.- Hide quoted text -
>>
>> - Show quoted text -
>
> Thanks Benjamin. Please point me to the website from where i can
> download pyodbc for Windows 64 bit OS under Python 2.6 and
> installation instructions
> --

You don't download it for 64-bit Windows with Python 2.6. You download
the source code from the website and make the Python 2.6, 64-bit
Windows version yourself.

Download the source zip file and extract it. Then, open up the command
prompt and use the "cd" command to change directories to that source
folder. For instance, if the source code has been extracted to
C:\pyodbc-2.1.8\, you type in "cd C:\pyodbc-2.1.8" and press enter.

After that, you just run the build script which is already in there:

C:\Python26\python26.exe setup.py install

You'll need to have Visual C++ 2008 (not 2010) installed for this to
work. You can get it for free from
http://www.microsoft.com/express/Downloads/ if yo

Re: WxPython versus Tkinter.

2011-01-28 Thread Stephen Hansen
On 1/28/11 12:35 PM, rantingrick wrote:
> The fact remains.

The word "fact" does not mean what you think it means.

-- 

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



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Littlefield, Tyler

>Man look at the state of Tkinter. Look at the bugs and mediocre code i
>exposed. Are you going to set there with a strait face and tell me
>many people are using Tkinter. Come on Kevin, be realistic!
You also uncovered bugs in WX (remember those segfaults, RR)?
On 1/28/2011 1:35 PM, rantingrick wrote:

On Jan 28, 10:16 am, Kevin Walzer  wrote:

On 1/28/11 9:18 AM, rantingrick wrote:


Everyone on this list knows that Kevin and myself are the *only*
people who know how to wield Tkinter past some simple utility GUI's.

I strongly disagree with this statement.

Whether you agree or disagree is irrelevant. The fact remains. And if
there are others, why do we never hear from them? Why do they never
help noobs when Tkinter questions come up? I guess they are the
"silent majority" right?

Man look at the state of Tkinter. Look at the bugs and mediocre code i
exposed. Are you going to set there with a strait face and tell me
many people are using Tkinter. Come on Kevin, be realistic!



--

Thanks,
Ty

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 28, 2:37 pm, Terry Reedy  wrote:
> On 1/28/2011 3:33 AM, Octavian Rasnita wrote:

> > "Get the library and its documentation included in the core Python
> > distribution, so that truly cross-platform GUI applications may be written
> > that will run on any Python installation, anywhere."
>
> I don't know if Grey still has that goal.  It is 2.x only.

True, but *if* the community saw the potential that i see with pyGUI
and wanted to seriously do some development to bring it into 3.0
compliance i'll bet Greg *would* be interested! pyGUI has lots of
potential. To be honest, i would sacrifice all the functionality of
wxWidgets if we could get pyGUI into the stdlib. Why? Well because
pyGUI would be under OUR complete control. No more kissing TclTk butt,
no more kissing WxWidgets+Robin Dunn butt. WE decide how fast to move
and NOBODY will get in our way anymore!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Rui Maciel
Raymond Hettinger wrote:

> Have any of you all seen other examples besides
> the Go language docs and the Python docs?

Wasn't doxygen developed with that in mind?


Rui Maciel
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-28 Thread bansi
On Jan 28, 1:52 pm, Benjamin Kaplan  wrote:
> On Fri, Jan 28, 2011 at 1:33 PM, bansi  wrote:
> > On Jan 28, 9:46 am, bansi  wrote:
> >> On Jan 26, 8:31 pm, MRAB  wrote:
>
> >> > On 27/01/2011 00:57, bansi wrote:
>
> >> > > On Jan 26, 6:25 pm, Ethan Furman  wrote:
> >> > >> bansi wrote:
>
> >> > >>   >  First namelookupWrapper.py running under Python 2.6 accept 
> >> > >> arguments
> >> > >>   >  from stdin and uses csv reader object to read it i.e.
> >> > >>   >  r=csv.reader(sys.stdin)
>
> >> > >>   >  And then it has to pass csv reader object to another python 
> >> > >> script
> >> > >>   >  namelookup.py running under Python 2.7 because it uses pyodbc to
> >> > >>   >  connect to database and iterates thru reader object
>
> >> > >> Ben Finney wrote:
> >> > >>> bansi  writes:
>
> >> >  Thanks Chris. Sorry for mis-communicating, the two python scripts 
> >> >  are
> >> >  dependant in a way that namelookupWrapper.py needs to pass csv 
> >> >  record
> >> >  object to another python script
>
> >> > >>> Why have you structured them that way, though? What constraint is
> >> > >>> keeping you from doing the work in a single process, where the CSV
> >> > >>> reader object can be shared?
>
> >> >  If thats not possible then please let me know how to do the 
> >> >  workaround
> >> >  i didnt understood the import thing and not sure if it helps in my
> >> >  case
>
> >> > >>> The problem as you've described it so far is best solved by having a
> >> > >>> single process accessing the CSV reader object in memory. If that
> >> > >>> doesn't suit your use case, you'll need to explain why not.
>
> >> > >> In other words, why can't you use Python 2.7 to accept input and
> >> > >> generate a csv.reader?
>
> >> > >> ~Ethan~- Hide quoted text -
>
> >> > >> - Show quoted text -
>
> >> > > Ethan,
> >> > > The python script takes the input from Splunk (http://www.splunk.com/
> >> > > base/Documentation/) which supports only Python 2.6
> >> > > So the real constraint is Splunk supports only Python 2.6 .
>
> >> > > As you know Python 2.6 doesnt support or doesnt have pyodbc install
> >> > > for Windows  64 bit OS
> >> > > So i installed Python 2.7 and thereafter pyodbc install for Windows 64
> >> > > bit OS for Python 2.7
>
> >> > Have you actually tried Splunk with Python 2.7? It might not work with
> >> > versions which are earlier than Python 2.6, but that doesn't
> >> > necessarily mean that it won't work with versions of Python 2 which are
> >> > later than Python 2.6 (unless the documentation says that it must be
> >> > Python 2.6).- Hide quoted text -
>
> >> > - Show quoted text -
>
> >> Splunk's latest version 4.1.6 doesn't support Python 2.7
> >> I tried the import trick but it didnt work because the real script
> >> which runs under Python 2.7 has import pyodbc so it results in
> >> following error
>
> >> c:\Splunk\etc\apps\search\bin>splunk cmd python namelookupWrapper.py
> >> memberId memberName < memberInput.csv
> >> Traceback (most recent call last):
> >>   File "namelookupWrapper.py", line 3, in 
> >>     import namelookup
> >>   File "c:\Splunk\etc\apps\search\bin\namelookup.py", line 7, in
> >> 
> >>     import pyodbc
> >> ImportError: DLL load failed: The specified module could not be found.
>
> >> Please let me know if i am missing something on import. If so please
> >> provide me with an example- Hide quoted text -
>
> >> - Show quoted text -
>
> > Here are some more details from my earlier posting. Please click the
> > below link
>
> >http://answers.splunk.com/questions/11145/its-getting-mysterious-to-m...
> > --
> >http://mail.python.org/mailman/listinfo/python-list
>
> Have you tried downloading the source for PyODBC and compiling it
> yourself? All you need to do is python setup.py install. My guess
> would be that it works just fine on 64-bit Python 2.6, they just never
> released a re-compiled version of it for that platform.- Hide quoted text -
>
> - Show quoted text -

Thanks Benjamin. Please point me to the website from where i can
download pyodbc for Windows 64 bit OS under Python 2.6 and
installation instructions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 28, 10:16 am, Kevin Walzer  wrote:
> On 1/28/11 9:18 AM, rantingrick wrote:
>
> > Everyone on this list knows that Kevin and myself are the *only*
> > people who know how to wield Tkinter past some simple utility GUI's.
>
> I strongly disagree with this statement.

Whether you agree or disagree is irrelevant. The fact remains. And if
there are others, why do we never hear from them? Why do they never
help noobs when Tkinter questions come up? I guess they are the
"silent majority" right?

Man look at the state of Tkinter. Look at the bugs and mediocre code i
exposed. Are you going to set there with a strait face and tell me
many people are using Tkinter. Come on Kevin, be realistic!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Terry Reedy

On 1/28/2011 3:33 AM, Octavian Rasnita wrote:

From: "Terry Reedy" 

For example: pygui pretty much uses native widgets on Windows and OX and
gtk (I believe) on *nix. How is the accessibility of those widget sets
*as
accessed through pygui*? Is it different from the 'native' accessibility
of each of those set?



Thank you for telling about this GUI lib!
I have tested the sample apps it offers and the standard dialogs are very
accessible. I hope it is the same in case of the other common controls like
list boxes, list views, check boxes, radio buttons, combo boxes, tree
views...


Which OS? The result might be different on each of Windows, OSX, and 
*nis as different widgets are used on each.



How complete is this GUI lib compared with others that can be used in
Python
apps?
I am asking this, because I read:

"Get the library and its documentation included in the core Python
distribution, so that truly cross-platform GUI applications may be written
that will run on any Python installation, anywhere."


I don't know if Grey still has that goal.  It is 2.x only.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Paul Rubin
Raymond Hettinger  writes:
>  http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/
>
> I'm looking for more examples of projects that routinely
> link their docs back into relavant sections of code.
> Have any of you all seen other examples besides
> the Go language docs and the Python docs?

That is a very good post, and just about 2 days ago I happened to be
looking at the source of heapq for something I was doing, and I think I
got to it through the doc link that you added.  So the link has already
been useful.

Haddock (Haskell's equivalent to Pydoc or Javadoc) can automatically
generate source links in Haskell documentation.  For example, here's the
docs (including source links) for Haskell's standard library for dealing
with lists:

http://www.haskell.org/ghc/docs/7.0-latest/html/libraries/base-4.3.0.0/Data-List.html

I've wanted for a long time for developer-oriented Linux distributions
to include full source code of everything as an integral part of the
distro rather than as a separate distribution.  For example, you could
examine any application and instantly see its source.  All programs
would be compiled with debugging enabled and a way to attach a debugger
to the running process, so you could at any time interrupt the program
and use gdb to see what it was doing, single step it, etc.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 28, 9:52 am, Grant Edwards  wrote:

> [plonk]

Why is it necessarily for you guys to advertise when you plonk. Just
plonk and shut up about it. Nobody cares what you do with your own
incoming email. Really, are you that self centered as to think we
actually care?

[zing]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread Jerry Hill
On Fri, Jan 28, 2011 at 3:24 PM, rantingrick  wrote:

> Why don't you instead thank me for helping out instead of jumping to
> irate conclusions? It would *seem* that if YOU cared about the future
> of Python you would be more *accepting* of my help.
>

But you have not, in fact, helped out.  You've complained to a mailing list
of python users that you've found some bugs.  If you want to help out, you
need to file issues on the bug tracker for bugs that you've found.  If you
want to be extra helpful, you'll also attach patches to those bug reports.

It really isn't difficult, but you don't seem to be willing to do it.  Until
you do, all you're doing is ranting, not helping.

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread Benjamin Kaplan
On Fri, Jan 28, 2011 at 3:24 PM, rantingrick  wrote:
> On Jan 28, 8:52 am, Giampaolo Rodolà  wrote:
>
>> Why don't you file a ticket on the bug tracker instead of wasting
>> yours and other people's time here by making appear another rant
>> against Tkinter as a bug report?
>
> Why don't you instead thank me for helping out instead of jumping to
> irate conclusions? It would *seem* that if YOU cared about the future
> of Python you would be more *accepting* of my help.
>

It's not that people don't appreciate your help. It's that the mailing
list is not the appropriate place for this type of discussion. Once
it's been verified as a bug, you should create a ticket on the bug
tracker, come back here and post a link, and then move the discussion
over to the tracker. Even if you intend to fix it yourself, you should
create a ticket and then attach the patch to the ticket when you fix
it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Use the Source Luke

2011-01-28 Thread Giampaolo Rodolà
2011/1/28 Raymond Hettinger :
> I hoping a new trend will start with dev's putting direct
> source code links in their documentation:
>
>  http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/
>
> I'm looking for more examples of projects that routinely
> link their docs back into relavant sections of code.
> Have any of you all seen other examples besides
> the Go language docs and the Python docs?
>
>
> Raymond
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Thanks, I think this is a great idea.
I think this definitively should be done for 2.7 documentation as well.

--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't use multiprocessing with class factory?

2011-01-28 Thread Alan
On Jan 28, 2:23 pm, Robert Kern  wrote:
> Send the (pickleable) factory and the arguments used to construct the 
> instance,
> not the unpickleable instance itself.
>
> def g(factory, i):
>  cls = factory(i)
>  print cls._x
>
> if __name__ == '__main__':
>pool = mp.Pool(2)
>pool.map(g, zip([class_factory] * 4, range(4)))



If I change that to g((factory,i)) it does work.

Thanks!

Alan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread rantingrick
On Jan 28, 8:52 am, Giampaolo Rodolà  wrote:

> Why don't you file a ticket on the bug tracker instead of wasting
> yours and other people's time here by making appear another rant
> against Tkinter as a bug report?

Why don't you instead thank me for helping out instead of jumping to
irate conclusions? It would *seem* that if YOU cared about the future
of Python you would be more *accepting* of my help.

> [...snip: shameless plugs...]

Oh, i see why you dropped by; First to score some points on my behalf
and then to plug your own software. Interesting.

-- 
http://mail.python.org/mailman/listinfo/python-list


Question on Python Freelance Projects in NLP and Machine Learning

2011-01-28 Thread joy99
Dear Room,

I am a Python programmer from India. I am looking for some freelance
Python projects, preferably in Natural Language Processing and Machine
Learning. If any one knows of it, please let me know.

Best Regards,
Subhabrata Banerjee.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't use multiprocessing with class factory?

2011-01-28 Thread Robert Kern

On 1/28/11 1:25 PM, Daniel Urban wrote:


Only classes defined on the top level of a module are picklable (see
http://docs.python.org/dev/py3k/library/pickle#what-can-be-pickled-and-unpickled
). The collections.namedtuple class factory function works around this
limitation by setting the __module__  attribute of the created class,
but I'm not sure if this solution can be used in this case.


namedtuple's trick only works when you assign the created class to a name at the 
module level. E.g.


  MyFancyTuple = collections.namedtuple(...)

The trick won't work for "anonymous" classes like the above use case.

--
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

--
http://mail.python.org/mailman/listinfo/python-list


Re: can't use multiprocessing with class factory?

2011-01-28 Thread Hidura
What is the output?

2011/1/28, Alan :
> Can the below example be fixed to work?
> Thanks,
> Alan Isaac
>
> import multiprocessing as mp
>
> class Test(object):
> pass
>
> def class_factory(x):
> class ConcreteTest(Test):
> _x = x
> return ConcreteTest
>
> def f(cls):
> print cls._x
>
> if __name__ == '__main__':
> pool = mp.Pool(2)
> pool.map(f, [class_factory(i) for i in range(4)])
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

-- 
Enviado desde mi dispositivo móvil

Diego I. Hidalgo D.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't use multiprocessing with class factory?

2011-01-28 Thread Daniel Urban
On Fri, Jan 28, 2011 at 20:02, Alan  wrote:
> Can the below example be fixed to work?
> Thanks,
> Alan Isaac
>
> import multiprocessing as mp
>
> class Test(object):
>    pass
>
> def class_factory(x):
>    class ConcreteTest(Test):
>        _x = x
>    return ConcreteTest
>
> def f(cls):
>    print cls._x
>
> if __name__ == '__main__':
>    pool = mp.Pool(2)
>    pool.map(f, [class_factory(i) for i in range(4)])

Only classes defined on the top level of a module are picklable (see
http://docs.python.org/dev/py3k/library/pickle#what-can-be-pickled-and-unpickled
). The collections.namedtuple class factory function works around this
limitation by setting the __module__  attribute of the created class,
but I'm not sure if this solution can be used in this case.


Daniel
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't use multiprocessing with class factory?

2011-01-28 Thread Robert Kern

On 1/28/11 1:02 PM, Alan wrote:

Can the below example be fixed to work?
Thanks,
Alan Isaac

import multiprocessing as mp

class Test(object):
 pass

def class_factory(x):
 class ConcreteTest(Test):
 _x = x
 return ConcreteTest

def f(cls):
 print cls._x

if __name__ == '__main__':
 pool = mp.Pool(2)
 pool.map(f, [class_factory(i) for i in range(4)])


Send the (pickleable) factory and the arguments used to construct the instance, 
not the unpickleable instance itself.


def g(factory, i):
cls = factory(i)
print cls._x

if __name__ == '__main__':
  pool = mp.Pool(2)
  pool.map(g, zip([class_factory] * 4, range(4)))

By the way, when asking for help like this, show us what your code did and 
describe what results you want. It can often be hard to figure out exactly what 
you mean by "work".


--
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

--
http://mail.python.org/mailman/listinfo/python-list


can't use multiprocessing with class factory?

2011-01-28 Thread Alan
Can the below example be fixed to work?
Thanks,
Alan Isaac

import multiprocessing as mp

class Test(object):
pass

def class_factory(x):
class ConcreteTest(Test):
_x = x
return ConcreteTest

def f(cls):
print cls._x

if __name__ == '__main__':
pool = mp.Pool(2)
pool.map(f, [class_factory(i) for i in range(4)])

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-28 Thread Benjamin Kaplan
On Fri, Jan 28, 2011 at 1:33 PM, bansi  wrote:
> On Jan 28, 9:46 am, bansi  wrote:
>> On Jan 26, 8:31 pm, MRAB  wrote:
>>
>>
>>
>>
>>
>> > On 27/01/2011 00:57, bansi wrote:
>>
>> > > On Jan 26, 6:25 pm, Ethan Furman  wrote:
>> > >> bansi wrote:
>>
>> > >>   >  First namelookupWrapper.py running under Python 2.6 accept 
>> > >> arguments
>> > >>   >  from stdin and uses csv reader object to read it i.e.
>> > >>   >  r=csv.reader(sys.stdin)
>>
>> > >>   >  And then it has to pass csv reader object to another python script
>> > >>   >  namelookup.py running under Python 2.7 because it uses pyodbc to
>> > >>   >  connect to database and iterates thru reader object
>>
>> > >> Ben Finney wrote:
>> > >>> bansi  writes:
>>
>> >  Thanks Chris. Sorry for mis-communicating, the two python scripts are
>> >  dependant in a way that namelookupWrapper.py needs to pass csv record
>> >  object to another python script
>>
>> > >>> Why have you structured them that way, though? What constraint is
>> > >>> keeping you from doing the work in a single process, where the CSV
>> > >>> reader object can be shared?
>>
>> >  If thats not possible then please let me know how to do the workaround
>> >  i didnt understood the import thing and not sure if it helps in my
>> >  case
>>
>> > >>> The problem as you've described it so far is best solved by having a
>> > >>> single process accessing the CSV reader object in memory. If that
>> > >>> doesn't suit your use case, you'll need to explain why not.
>>
>> > >> In other words, why can't you use Python 2.7 to accept input and
>> > >> generate a csv.reader?
>>
>> > >> ~Ethan~- Hide quoted text -
>>
>> > >> - Show quoted text -
>>
>> > > Ethan,
>> > > The python script takes the input from Splunk (http://www.splunk.com/
>> > > base/Documentation/) which supports only Python 2.6
>> > > So the real constraint is Splunk supports only Python 2.6 .
>>
>> > > As you know Python 2.6 doesnt support or doesnt have pyodbc install
>> > > for Windows  64 bit OS
>> > > So i installed Python 2.7 and thereafter pyodbc install for Windows 64
>> > > bit OS for Python 2.7
>>
>> > Have you actually tried Splunk with Python 2.7? It might not work with
>> > versions which are earlier than Python 2.6, but that doesn't
>> > necessarily mean that it won't work with versions of Python 2 which are
>> > later than Python 2.6 (unless the documentation says that it must be
>> > Python 2.6).- Hide quoted text -
>>
>> > - Show quoted text -
>>
>> Splunk's latest version 4.1.6 doesn't support Python 2.7
>> I tried the import trick but it didnt work because the real script
>> which runs under Python 2.7 has import pyodbc so it results in
>> following error
>>
>> c:\Splunk\etc\apps\search\bin>splunk cmd python namelookupWrapper.py
>> memberId memberName < memberInput.csv
>> Traceback (most recent call last):
>>   File "namelookupWrapper.py", line 3, in 
>>     import namelookup
>>   File "c:\Splunk\etc\apps\search\bin\namelookup.py", line 7, in
>> 
>>     import pyodbc
>> ImportError: DLL load failed: The specified module could not be found.
>>
>> Please let me know if i am missing something on import. If so please
>> provide me with an example- Hide quoted text -
>>
>> - Show quoted text -
>
> Here are some more details from my earlier posting. Please click the
> below link
>
> http://answers.splunk.com/questions/11145/its-getting-mysterious-to-make-the-lookup-script-work
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Have you tried downloading the source for PyODBC and compiling it
yourself? All you need to do is python setup.py install. My guess
would be that it works just fine on 64-bit Python 2.6, they just never
released a re-compiled version of it for that platform.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-28 Thread bansi
On Jan 28, 9:46 am, bansi  wrote:
> On Jan 26, 8:31 pm, MRAB  wrote:
>
>
>
>
>
> > On 27/01/2011 00:57, bansi wrote:
>
> > > On Jan 26, 6:25 pm, Ethan Furman  wrote:
> > >> bansi wrote:
>
> > >>   >  First namelookupWrapper.py running under Python 2.6 accept arguments
> > >>   >  from stdin and uses csv reader object to read it i.e.
> > >>   >  r=csv.reader(sys.stdin)
>
> > >>   >  And then it has to pass csv reader object to another python script
> > >>   >  namelookup.py running under Python 2.7 because it uses pyodbc to
> > >>   >  connect to database and iterates thru reader object
>
> > >> Ben Finney wrote:
> > >>> bansi  writes:
>
> >  Thanks Chris. Sorry for mis-communicating, the two python scripts are
> >  dependant in a way that namelookupWrapper.py needs to pass csv record
> >  object to another python script
>
> > >>> Why have you structured them that way, though? What constraint is
> > >>> keeping you from doing the work in a single process, where the CSV
> > >>> reader object can be shared?
>
> >  If thats not possible then please let me know how to do the workaround
> >  i didnt understood the import thing and not sure if it helps in my
> >  case
>
> > >>> The problem as you've described it so far is best solved by having a
> > >>> single process accessing the CSV reader object in memory. If that
> > >>> doesn't suit your use case, you'll need to explain why not.
>
> > >> In other words, why can't you use Python 2.7 to accept input and
> > >> generate a csv.reader?
>
> > >> ~Ethan~- Hide quoted text -
>
> > >> - Show quoted text -
>
> > > Ethan,
> > > The python script takes the input from Splunk (http://www.splunk.com/
> > > base/Documentation/) which supports only Python 2.6
> > > So the real constraint is Splunk supports only Python 2.6 .
>
> > > As you know Python 2.6 doesnt support or doesnt have pyodbc install
> > > for Windows  64 bit OS
> > > So i installed Python 2.7 and thereafter pyodbc install for Windows 64
> > > bit OS for Python 2.7
>
> > Have you actually tried Splunk with Python 2.7? It might not work with
> > versions which are earlier than Python 2.6, but that doesn't
> > necessarily mean that it won't work with versions of Python 2 which are
> > later than Python 2.6 (unless the documentation says that it must be
> > Python 2.6).- Hide quoted text -
>
> > - Show quoted text -
>
> Splunk's latest version 4.1.6 doesn't support Python 2.7
> I tried the import trick but it didnt work because the real script
> which runs under Python 2.7 has import pyodbc so it results in
> following error
>
> c:\Splunk\etc\apps\search\bin>splunk cmd python namelookupWrapper.py
> memberId memberName < memberInput.csv
> Traceback (most recent call last):
>   File "namelookupWrapper.py", line 3, in 
>     import namelookup
>   File "c:\Splunk\etc\apps\search\bin\namelookup.py", line 7, in
> 
>     import pyodbc
> ImportError: DLL load failed: The specified module could not be found.
>
> Please let me know if i am missing something on import. If so please
> provide me with an example- Hide quoted text -
>
> - Show quoted text -

Here are some more details from my earlier posting. Please click the
below link

http://answers.splunk.com/questions/11145/its-getting-mysterious-to-make-the-lookup-script-work
-- 
http://mail.python.org/mailman/listinfo/python-list


Use the Source Luke

2011-01-28 Thread Raymond Hettinger
I hoping a new trend will start with dev's putting direct
source code links in their documentation:

 http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/

I'm looking for more examples of projects that routinely
link their docs back into relavant sections of code.
Have any of you all seen other examples besides
the Go language docs and the Python docs?


Raymond
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread MRAB

On 28/01/2011 08:34, Octavian Rasnita wrote:

From: "Littlefield, Tyler" 

what >JAWS 


Tyler, did I used bad words in my posts as you do now?
I didn't, but the other list members told me that my atitude is not good,
that I am not civilized, because I have a different opinion than them.
I am sure *nobody* will tell you that thing even though they can also see
your posts.


[snip]
They are saying that your attitude is not good because your attitude is
not good. They are not saying that your opinion is not good.

It's not what you say but how you say it.
--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Stephen Hansen
On 1/28/11 6:18 AM, rantingrick wrote:
> On Jan 27, 12:13 pm, Stephen Hansen  wrote:
> 
>> Seriously. Octavian's attitude in this thread makes me want to go use
>> Tkinter just to spite him. And I'm net-buds with Tyler, and I'm working
>> on a project that I thought accessibility for the blind was very
>> important for. But no more!
> 
> Well Stephen that would mean you would have to actually *learn* to use
> Tkinter, and from your own admission (not very long ago!) you don't
> know anything about Tkinter. Remember our Tk-Wx geometry challenge?
> Nice try! ;-)

And?

Gee-whiz-golly, I might have to learn something new. OH NOES. Its friday
again.

> Everyone on this list knows that Kevin and myself are the *only*
> people who know how to wield Tkinter past some simple utility GUI's.

Hah. No.

-- 

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



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Bryan
On Jan 28, 10:16 am, Kevin Walzer  wrote:
> On 1/28/11 9:18 AM, rantingrick wrote:
>
> > Everyone on this list knows that Kevin and myself are the *only*
> > people who know how to wield Tkinter past some simple utility GUI's.
>
> I strongly disagree with this statement.
>

(BTW, Kevin, Congrats on getting a tk app accepted by the Mac app
store. That's an impressive feat!)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Kevin Walzer

On 1/28/11 9:18 AM, rantingrick wrote:


Everyone on this list knows that Kevin and myself are the *only*
people who know how to wield Tkinter past some simple utility GUI's.


I strongly disagree with this statement.

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: A http server

2011-01-28 Thread Diez B. Roggisch
Back9  writes:

> Hi,
> I'm trying to set up a http server to handle a single POST request.
> That POST request is to upload a huge file and the server is supposed
> to handle it with the just POST request.
> With my python sample code, multiple post requests are working well,
> but that is not my solution.
> I need a single POST request handling in the http server side.
> Does anyone have a good idea for this case or sample code?

Why doesn't the single post not work with your sample code? Where is
your sample code?

It might be a good idea to use WSGI for this, to stream out the
POST-body to a temporary file. Can you use mod_wsgi in conjuction with
Apache? If not, some pure WSGI-server implementation such as Paster might be 
enough.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Grant Edwards
On 2011-01-28, Octavian Rasnita  wrote:
> From: "Grant Edwards" 
>> A very important way to help would be to test accessibility features
>> and post accurate, detailed, bug-reports.

> I am willing to do that. I have tested that program made with
> WxPython and I have posted here what I found,

The wxPython mailing list and/or bug-tracker is the right place for
that.

> What can I say more?

You don't need to say more.  You need to say less and say it
differently.

-- 
Grant Edwards   grant.b.edwardsYow! Do you guys know we
  at   just passed thru a BLACK
  gmail.comHOLE in space?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Grant Edwards
On 2011-01-28, Octavian Rasnita  wrote:
> From: "Stephen Hansen" 
>> Seriously. Octavian's attitude in this thread makes me want to go use
>> Tkinter just to spite him.
>
> Oh yes? And this would probably mean that your atitude is a very good
> and normal one, right?

Good? No.

Normal? Yes.

I'm beginning to think that Octavian has some fundamental problems
when it comes to empathy and social interaction skills. I think he
genuinly has no clue how others perceive his postings nor does he
understand what we mean by etiquette.

-- 
Grant Edwards   grant.b.edwardsYow! HOORAY, Ronald!!
  at   Now YOU can marry LINDA
  gmail.comRONSTADT too!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Bryan
On Jan 28, 8:18 am, rantingrick  wrote:
> On Jan 27, 12:13 pm, Stephen Hansen  wrote:
>
> > Seriously. Octavian's attitude in this thread makes me want to go use
> > Tkinter just to spite him. And I'm net-buds with Tyler, and I'm working
> > on a project that I thought accessibility for the blind was very
> > important for. But no more!
>
> Well Stephen that would mean you would have to actually *learn* to use
> Tkinter, and from your own admission (not very long ago!) you don't
> know anything about Tkinter. Remember our Tk-Wx geometry challenge?
> Nice try! ;-)

Do you have a link to this challenge? I assume it's a different one
than the challenge that started this thread since the one that started
this thread had nothing to do with geometry.

>
> Everyone on this list knows that Kevin and myself are the *only*
> people who know how to wield Tkinter past some simple utility GUI's.

I beg your pardon. Neither statement is true. There are more experts
than you realize, and "this list" knows there are more experts than
you and Kevin. There's a possible third misconception in your
statement that's not worth discussing at this point.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Grant Edwards
On 2011-01-28, Octavian Rasnita  wrote:

> How can we talk about etiquette when exactly this etiquette is the one that
> needs to be changed?

Huh?

> As you say, the etiquette is in favor of the preferences of the majority,
> but how should react someone, what he/she should say in order to make the
> others understand that that etiquette is bad because it discriminates some
> categories of people?

Please explain what etiquette you are talking about that is
discriminatory.

> You are right in that case, but the comparison is not good because yes there
> is a value in creating accessible GUIS.

I'm not arguing against creating accessible GUIs.  I'm not saying
that you shouldn't argue in favor of doing so.  I'm just saying that
the _way_ you are presenting your argument is counter-productive.

> Those who drive on the left, the minority, can adapt to drive on the
> right. If their cars have the wheels on the right, there are
> technical solutions for that problem... they ccan change their cars.
> But if an application uses Tk, those minorities that have problems
> don't have any technical solution to solve them, because there are
> not accessible versions for all the inaccessible apps.

You've completely missed the analogy.  I'm not saying that people who
need/want accessible apps are "driving on the left".  I'm saying that
by the manner in which you espouse accessibility you are driving on
the left.

> Try to imagine that it will appear an incurable disease for those who drive
> on the right. What do you think it will happen? Probably they all would
> start driving on the left.

I'm not saying accessibility isn't good or important.  I'm saying
you're _hurting_ the cause of accessiblity by the manner in which you
lobby for it.

But, you seem unable or unwilling to understand that. When somebody
tells you you're being rude, insulting, or disrepectful, they're _not_
saying that accessibility is not important.  They're just telling you
that you're being rude, insulting , or disrepectful.

[plonk]

-- 
Grant Edwards   grant.b.edwardsYow! There's enough money
  at   here to buy 5000 cans of
  gmail.comNoodle-Roni!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread Giampaolo Rodolà
2011/1/26 rantingrick :
>
> I just installed Python 3,0 on my machine. I cannot use 3.0
> exclusively yet however i was interested in just poking around and
> acquiring a taste if you will. I was happy to find that the new
> Tkinter module names now follow convention and are placed correctly...
> example: "tkinter.simpledialog"
>
> However some things never change it seems and some improvements are
> actually a step backwards. The same problems with the unit test in 2.x
> got ported to 3.x. And the new SimpleDialog is just more lackluster
> code like we've seen before. I was hoping to be amazed, i am
> disappointed and disgusted. It is obvious that whoever is writing/
> maintaining the tkinter code base does NOT understand tkinter
> completely and this is blinding apparent by reading the source code!
>
> ---
>  Issues
> ---
>
> First lets start with the problems that migrated from 2.x...
> (tkinter.simpledialog)
>
> #-- ISSUE 1 --#
> In the test() function we still have code that uses the "quit" method
> instead of "destroy". Calling the "quit" method only tells Tkinter to
> stop processing events, IT DOES NOT DESTROY THE WIDGET!! And on
> windows the the root will then become unresponsive -- you cannot close
> the window, you cannot do anything. I have said time and time again.
> DO NOT USE THE QUIT METHOD UNLESS YOU KNOW WHAT THE HECK YOU ARE
> DOING! So the code needs to be this...
>
> OLD:
>   q = Button(root, text='Quit', command=t.quit)
>
> NEW:
>   q = Button(root, text='Quit', command=root.destroy)
>
>
> #-- ISSUE 2: --#
> The author used a very strange method by which to denote the default
> button in the SimpleDialog class. He choose to set the relief to RIDGE
> and the border "8". This not only looks horrible (and exposes the
> authors ignorance of tkinter) but a much more elegant solution is
> provided by the TclTk folks. All buttons have a "default" option that
> will display the button with a nice border so the user can visually
> see which button is active. So the code should be this
>
> OLD:
>            if num == default:
>                b.config(relief=RIDGE, borderwidth=8)
>
> NEW:
>            if num == default:
>                b.config(default=ACTIVE)
>
>
> Last but not least i am puzzled as to why we choose the method name
> "go" over "show". for "showing" the dialog.  SimpleDialog uses no
> inheritance so name clashes are mum. Why would anyone choose "go" over
> "show" for a modal dialog? I would really like an explanation for
> this.
>
>
> Other minor issues exists. I may describe them later. At this time we
> need to fix these grave abominations first.
> --
> http://mail.python.org/mailman/listinfo/python-list

Why don't you file a ticket on the bug tracker instead of wasting
yours and other people's time here by making appear another rant
against Tkinter as a bug report?
It's been 3 days in a row you've been doing this. Aren't you tired?
Seriously! This has come to not even being a rant anymore. It's just nonsense.


--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-28 Thread bansi
On Jan 26, 8:31 pm, MRAB  wrote:
> On 27/01/2011 00:57, bansi wrote:
>
>
>
>
>
> > On Jan 26, 6:25 pm, Ethan Furman  wrote:
> >> bansi wrote:
>
> >>   >  First namelookupWrapper.py running under Python 2.6 accept arguments
> >>   >  from stdin and uses csv reader object to read it i.e.
> >>   >  r=csv.reader(sys.stdin)
>
> >>   >  And then it has to pass csv reader object to another python script
> >>   >  namelookup.py running under Python 2.7 because it uses pyodbc to
> >>   >  connect to database and iterates thru reader object
>
> >> Ben Finney wrote:
> >>> bansi  writes:
>
>  Thanks Chris. Sorry for mis-communicating, the two python scripts are
>  dependant in a way that namelookupWrapper.py needs to pass csv record
>  object to another python script
>
> >>> Why have you structured them that way, though? What constraint is
> >>> keeping you from doing the work in a single process, where the CSV
> >>> reader object can be shared?
>
>  If thats not possible then please let me know how to do the workaround
>  i didnt understood the import thing and not sure if it helps in my
>  case
>
> >>> The problem as you've described it so far is best solved by having a
> >>> single process accessing the CSV reader object in memory. If that
> >>> doesn't suit your use case, you'll need to explain why not.
>
> >> In other words, why can't you use Python 2.7 to accept input and
> >> generate a csv.reader?
>
> >> ~Ethan~- Hide quoted text -
>
> >> - Show quoted text -
>
> > Ethan,
> > The python script takes the input from Splunk (http://www.splunk.com/
> > base/Documentation/) which supports only Python 2.6
> > So the real constraint is Splunk supports only Python 2.6 .
>
> > As you know Python 2.6 doesnt support or doesnt have pyodbc install
> > for Windows  64 bit OS
> > So i installed Python 2.7 and thereafter pyodbc install for Windows 64
> > bit OS for Python 2.7
>
> Have you actually tried Splunk with Python 2.7? It might not work with
> versions which are earlier than Python 2.6, but that doesn't
> necessarily mean that it won't work with versions of Python 2 which are
> later than Python 2.6 (unless the documentation says that it must be
> Python 2.6).- Hide quoted text -
>
> - Show quoted text -

Splunk's latest version 4.1.6 doesn't support Python 2.7
I tried the import trick but it didnt work because the real script
which runs under Python 2.7 has import pyodbc so it results in
following error

c:\Splunk\etc\apps\search\bin>splunk cmd python namelookupWrapper.py
memberId memberName < memberInput.csv
Traceback (most recent call last):
  File "namelookupWrapper.py", line 3, in 
import namelookup
  File "c:\Splunk\etc\apps\search\bin\namelookup.py", line 7, in

import pyodbc
ImportError: DLL load failed: The specified module could not be found.

Please let me know if i am missing something on import. If so please
provide me with an example
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Bugs/issues in tkinter.simpledialog!!

2011-01-28 Thread Jerry Hill
On Fri, Jan 28, 2011 at 12:34 AM, rantingrick  wrote:

> Well i tried searching for "Tkinter" issues on the tracker and just
> got annoyed quickly and left. It seems far to complicated to do
> searches with this software.
>

You should apply some of the persistence that you show on the mailing list
to the problem!

Go to http://bugs.python.org
On the left hand side, there's a link to the search page (listed just below
"Issues").  Click that.
Find the list box labeled "Components" and select "Tkinter" from the drop
down.
Click Search.
Bob's your uncle!

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 27, 3:49 pm, "Littlefield, Tyler"  wrote:
>  >Yes but his silence speaks louder than words. He is saying " While i
>  >won't defend Tkinter publicly, i won't promote any others as well".
> That's the best translation I've ever heard: taking silence and
> diverting it into your own meaning for what you want it to mean.

Oh Tyler, your just jealous that i beat you to the punch! :-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 27, 12:13 pm, Stephen Hansen  wrote:

> Seriously. Octavian's attitude in this thread makes me want to go use
> Tkinter just to spite him. And I'm net-buds with Tyler, and I'm working
> on a project that I thought accessibility for the blind was very
> important for. But no more!

Well Stephen that would mean you would have to actually *learn* to use
Tkinter, and from your own admission (not very long ago!) you don't
know anything about Tkinter. Remember our Tk-Wx geometry challenge?
Nice try! ;-)

Everyone on this list knows that Kevin and myself are the *only*
people who know how to wield Tkinter past some simple utility GUI's.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread rantingrick
On Jan 28, 2:33 am, "Octavian Rasnita"  wrote:
> From: "Terry Reedy" 
>
> > For example: pygui pretty much uses native widgets on Windows and OX and
> > gtk (I believe) on *nix. How is the accessibility of those widget sets *as
> > accessed through pygui*? Is it different from the 'native' accessibility
> > of each of those set?
>
> Thank you for telling about this GUI lib!
> I have tested the sample apps it offers and the standard dialogs are very
> accessible. I hope it is the same in case of the other common controls like
> list boxes, list views, check boxes, radio buttons, combo boxes, tree
> views...

It is great to hear that pyGUI is accessible! You know, if we cannot
have wxPython in the stdlib my next choice would be pyGUI. Heck, we
should have started with pyGUI 20 years ago and we would better off
today!


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Littlefield, Tyler" 

>Yes but his silence speaks louder than words. He is saying " While i
>won't defend Tkinter publicly, i won't promote any others as well".
That's the best translation I've ever heard: taking silence and diverting 
it into your own meaning for what you want it to mean.



And he is perfectly right.
A library included in the stdlib is obviously promoted without beeing 
necessary to tell the world "use it".


Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Littlefield, Tyler" 

>* Disclaimer: You are stupid if you think this is true. But seriously,
>Octavian makes it REALLY hard to continue caring about something that I
>actually cared about before and thought was important.


When I told about what the community of the blind from my country cares, or
what I care, the others told me that that is not important. I am sure that
won't say the same thing to your post in which you also say about what you
care, just because you have the same opinions like them.


People like Octavian do that. Sadly, it is one of the things holding the
blind community back. I hope that with my arguments (for those that didn't
just toss everything related to this thread), I have been able to get
people to see a little differently and not consider Octavian as the voice
for us all.



Who are those "us all"?
Are you a representative voice for all the screen reader users? (Even though
most of them use JAWS that you don't seem to like)
Or do you agree with the associations of the blind in your country do when
they fight with different companies because they make discrimination by not
offering accessible products?
Or you are more representative than those associations?

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Stephen Hansen" 

Seriously. Octavian's attitude in this thread makes me want to go use
Tkinter just to spite him.



Oh yes? And this would probably mean that your atitude is a very good and 
normal one, right?


Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "rusi" 
Its quite clear to everyone here that
-- Octavian has no interest in a 21st century snazzy-looking toolkit


Oh well I am interested, but with the condition that toolkit to be
accessible, however Tkinter is not.
Is it too much to expect from a "21st century snazzy-looking toolkit" to be
accessable to screen readers?

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Littlefield, Tyler

>Yes but his silence speaks louder than words. He is saying " While i
>won't defend Tkinter publicly, i won't promote any others as well".
That's the best translation I've ever heard: taking silence and 
diverting it into your own meaning for what you want it to mean.

--
http://mail.python.org/mailman/listinfo/python-list


Re: how to read the last line of a huge file???

2011-01-28 Thread kost BebiX
26.01.2011, 12:59, "Xavier Heruacles" :
> I have do some log processing which is usually huge. The length of each line 
> is variable. How can I get the last line?? Don't tell me to use readlines or 
> something like linecache... --
> http://mail.python.org/mailman/listinfo/python-list

Well, it's very simple. Don't store the whole log in one file. Create new one 
and archive the old one every night. You will also get a lot of free space this 
way.
Or store it in some MongoDB's capped collection. It's fast and queryable (if 
you need).
Good luck!

-- 
jabber: k...@ya.ru
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Littlefield, Tyler
>Exactly what I said. They are doing the same mistake as I did 20 years 
ago.
and are still making now... Lack of English and grammar isn't the 
problem...


--
http://mail.python.org/mailman/listinfo/python-list


Re: Behaviour-based interface/protocol implementation?

2011-01-28 Thread Daniel Urban
On Fri, Jan 28, 2011 at 11:32, Alan Franzoni  wrote:
> On Thu, Jan 27, 2011 at 11:41 PM, Daniel Urban  wrote:
>
>> Actually it can. You don't have to modify the object, just check for
>> the desired methods/signature/whatever. See for example the
>> implementation of collections.Hashable.__subclasshook__ in _abcoll.py
>> and the abc.ABCMeta.__instancecheck__ method.
>
> Mmh, I don't get your examples (subclasshook checks for *classes*, not
> instances, and ABCMeta is a metaclass whose instance is an ABC), but
> after properly looking at the PEP (__instancecheck__ seems to be
> poorly documented in python standard docs) I've seen that yes,
> __instancecheck__ on an ABC can actually be used in place of
> maybe_implemented_by and hooking into isinstance().

Exactly. I mentioned subclasshook because it is possible to define a
similar "instancehook", which would check for instances.


Daniel
-- 
http://mail.python.org/mailman/listinfo/python-list


Algorithm for generating pitch-class sets in prime form

2011-01-28 Thread John O'Hagan
I'm looking for some help coming up with an algorithm to produce lists which 
meet the following criterion (you don't need to know music to get this):

In musical pitch-class set theory, "prime form" is defined as the most tightly-
packed-to-the-left rotation of a set's interval structure. Prime forms are 
important in music because they provide the unique simplest form of any pitch 
structure. I'm writing a python program which uses this principle.

For example: the sequence [2, 6, 9] (which happens to be a D major chord) 
would be put in prime form by:

- Sorting and transposing it so it starts on zero: [0, 4, 7]
- Expressing it as intervals: [4, 3, 5] (the last number is the distance to 
the octave)
- Rotating the intervals such that the biggest interval is at the end; if 
there are more than one biggest intervals, we want the rotation with the 
smallest first interval, and if that is also tied, the one with the smallest 
second interval, and so on. In this example we are already there. 

An easy way of finding a prime form in Python is:

def prime_form(seq):
pcs = sorted(list(set(seq)))
intervals = ([pcs[i + 1] - pcs[i] for i in range(len(pcs) - 1)] +   
[12 + min(pcs) - pcs[-1]])
rotations = [intervals[i:] + intervals[:i] for i in range(len(intervals))]
prime_intervals = min([i for i in rotations if i[-1] == max(intervals)])
return [sum(prime_intervals[:i]) for i in range(len(prime_intervals))]

But I'm looking for a way of generating sequences already in prime form 
without duplication or omission. One promising approach is using a function 
which generates all the (ordered) partitions of a number, and producing the 
multiset permutations of each partition, which gives us all the possible 
interval structures (but many of which are rotationally equivalent):

def full(num):
for part in partitions(num):
for perm in multiset_permutations(part):
yield perm

(The actual functions I'm using for this are at the end of this message.)

To start narrowing it down to prime forms, we can chop off the largest interval 
from the end, permute the rest, and replace it on the end of each permutation:

def full(num):
for part in partitions(num):
if len(part) == 1:
yield part
else:
for perm in multiset_permutations(part[:-1]):
yield perm + part[-1]

but this produces a lot of false positives in cases where there is more than 
one largest interval.

I imagine a solution might work by removing the largest intervals from each 
partition, permuting the remaining intervals, and into each permutation 
inserting the large intervals, one at the end and the others in each possible 
place that satisfies the requirements. And that's where I'm getting lost.

Any clues, suggestions or solutions?

Regards,

John


The functions:

def partitions(num):
if  num == 0:
yield []
return
for part in partitions(num-1):
yield [1] + part
if part and (len(part) < 2 or part[1] > part[0]):
yield [part[0] + 1] + part[1:]

def _reverse(seq, start, end):
"A sub-function for multiset_permutations"
#seq = seq[:start] + reversed(seq[start:end]) + seq[end:]
end -= 1
if end <= start:
return
while True:
seq[start], seq[end] = seq[end], seq[start]
if start == end or start+1 == end:
return
start += 1
end -= 1

def multiset_permutations(seq):
first = 0
last = len(seq)
yield seq
if last == 1:
raise StopIteration
while True:
next = last - 1
while True:
next1 = next
next -= 1
if seq[next] < seq[next1]:
mid = last - 1
while seq[next] >= seq[mid]:
mid -= 1
seq[next], seq[mid] = seq[mid], seq[next]
_reverse(seq, next1, last)
yield seq
break
if next == first:
raise StopIteration
raise StopIteration
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Behaviour-based interface/protocol implementation?

2011-01-28 Thread Alan Franzoni
On Thu, Jan 27, 2011 at 11:41 PM, Daniel Urban  wrote:

> Actually it can. You don't have to modify the object, just check for
> the desired methods/signature/whatever. See for example the
> implementation of collections.Hashable.__subclasshook__ in _abcoll.py
> and the abc.ABCMeta.__instancecheck__ method.

Mmh, I don't get your examples (subclasshook checks for *classes*, not
instances, and ABCMeta is a metaclass whose instance is an ABC), but
after properly looking at the PEP (__instancecheck__ seems to be
poorly documented in python standard docs) I've seen that yes,
__instancecheck__ on an ABC can actually be used in place of
maybe_implemented_by and hooking into isinstance().

Thanks!


-- 
Alan Franzoni
--
contact me at public@[mysurname].eu
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: dictionary error: list assignment index out of range

2011-01-28 Thread Octavian Rasnita
From: Vaduvoiu Tiberiu 
  > Well, to quote firefox: this is embarrassing. I've realized the dictionary 
initialization is wrong, as [] means its a tuple, I should use {}. That's why I 
> don't like working nights..it's only in the morning when you start seeing 
things better. I apologize for the mail. Cheers


  [] is for lists.
  () is for tuples.

  HTH.

  Octavian
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "alex23" 

"Octavian Rasnita"  wrote:

Ok, in this case I understand why WxPython can't be included in stdlib.
I think there was a communication problem because the oldest list members
start with the idea that all the list members know who is who and they
may
be thinking that I don't want to accept the reality or that I have bad
feelings about some list members or something like that.


The only expectation I as a list member have of you is that you maybe
hit the web and do a bit of search & research before starting on an
endless tirade. Implying that it was the responsibility of everyone
here to explain every little aspect of an issue you're supposedly
passionate about makes you seem either lazy or ignorant.



Hi Alex,

You are right, I was lazy and didn't searched on the net to find who are all
the list members that answered to my posts for understanding better their
position, so it's my fault.

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Grant Edwards" 

I think there are a lot of people who think that including a GUI in
the standard library was a mistake and the best solution would be to
get rid of Tkinter and replace it with nothing.  If I were Guido and
thought that, I'd probably keep mum about it as well. :)

[I'm not claiming Guidoe does think that, but there are some pretty
good arguments for not including a GUI at all.]



Fully agree. But you will hear reactions with "batteries" :-)

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Terry Reedy" 

wxPython is the best and most mature cross-platform GUI toolkit, given a
number of constraints. The only reason wxPython isn't the standard
Python GUI toolkit is that Tkinter was there first.
-- Guido van Rossum

(from http://www.wxpython.org/quotes.php)


Of course, that is not the only reason now. Python has moved on to a 21st
century version, while wxpython is still stuck on the 20century version.




I don't say you are not right, but can you say that Tkinter is a 21st
century lib if it doesn't offer even the accessibility features?

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Corey Richardson" 

wxPython is the best and most mature cross-platform GUI toolkit, given a
number of constraints. The only reason wxPython isn't the standard
Python GUI toolkit is that Tkinter was there first.
-- Guido van Rossum




Oh, how can Guido say this about that bad WxPython that gives those errors
under Linux... :-)

Now seriously, this is the kind of opinion that need to change. "First", at
the beginning, there were no screen readers and no accessibility was
possible. But now it is possible and if this possibility requires that kind
of change, *I think* that it would be absolutely normal to be done.
If we would say about everything that "it was first", then we should not
change anything important because of that reason.

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Littlefield, Tyler" 

>Because healthy Linux users ARE NOT equal to handicapped people!
O? I bet I could run circles around RR in the shell, any day. Why are you
trying to promote accessibility for a group of people you consider not
equal to a group of "healthy" people?




What do you mean by equal?
The accessibility features should make the world more equal, but neither the
accessibility is not able to make everything perfect and make us all really
equal.
The word "handicap" implies that there is no an equality of possibilities
and chances, and that's why the accessibility features are needed.

I know that you want to appear as a genius guy that can't detect the light
with his eyes, but that which is absolutely equal to the others without
needing accessibility features, but this is an obvious exageration.

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Littlefield, Tyler" 

what >JAWS 


Tyler, did I used bad words in my posts as you do now?
I didn't, but the other list members told me that my atitude is not good,
that I am not civilized, because I have a different opinion than them.
I am sure *nobody* will tell you that thing even though they can also see
your posts.



1) Because you, your crew, and your group on a specific forum doesn't like
ESpeak doesn't disqualify an entire reader. The eloquence fixes are
illegal to be packaged with NVDA, so you -need- to get a separate patch,
yes. That doesn't mean it can't be done.


Are you hearing yourself? You say that it is illegal, but that it can be
done. Nice.
And by the way, that group I told you about is not my group, but the group
of most active young blind computer users in my country.


As to me being a Linux and Mac user, that doesn't disqualify what I'm
telling you either, because unlike your limitations, I don't just decide
to only use one reader. I use Linux, Mac, and windows (windows more than
both, actually). Yes, I'm giving you what I got from googling, because
that's my way of telling you to do your homework before you start ranting
about a reader you clearly know nothing of. The fact that it appears on
google says a lot. At least to me, maybe it's something you haven't been
able to comprehend.



It also appears on Google an article in which the NVDA developers say why
NVDA doesn't offer support for Eloquence anymore, and if you would have been
such a great Google user you would have seen that NVDA doesn't offer those
features I told you about.

And I see that you continue this useless discussion about screen readers
that you have started just because I gave only JAWS as an example of a
screen reader that can be used to test the inaccessibility of Tkinter, while
Tkinter is inaccessible for other screen readers also anyway.

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Grant Edwards" 

A very important way to help would be to test accessibility features
and post accurate, detailed, bug-reports.




I am willing to do that. I have tested that program made with WxPython and I
have posted here what I found, hoping that there will appear a Tkinter-based
app to test.
For the moment, the accessibility of Tkinter is something like:

- The menus are accessible, at least those at the top of the window, I don't
know about the context menus, because I don't know a Tk-based app that uses
context menus.
- The rest of the widgets are completely inaccessible.

What can I say more?

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Giampaolo Rodolà" 
...

py2exe offers the following installation kits, depending on the Python
version. If you know, please tell me why there are different packages for
different versions of Python?

py2exe-0.6.9.win32-py2.5.exe
py2exe-0.6.9.win32-py2.4.exe
py2exe-0.6.9.win32-py2.3.exe
py2exe-0.6.9.win32-py2.6.exe
py2exe-0.6.9.win32-py2.7.exe


That's a different story: those are pre-compiled binaries which are
generated from a *unique* source code which support all those
versions.
If you have a compiler you can install pywin32 extension by using any
Python version.


Thank you Giampaolo. Now I understand and it is a good thing.

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Terry Reedy" 

For example: pygui pretty much uses native widgets on Windows and OX and
gtk (I believe) on *nix. How is the accessibility of those widget sets *as
accessed through pygui*? Is it different from the 'native' accessibility
of each of those set?



Thank you for telling about this GUI lib!
I have tested the sample apps it offers and the standard dialogs are very
accessible. I hope it is the same in case of the other common controls like
list boxes, list views, check boxes, radio buttons, combo boxes, tree
views...

How complete is this GUI lib compared with others that can be used in Python
apps?
I am asking this, because I read:

"Get the library and its documentation included in the core Python
distribution, so that truly cross-platform GUI applications may be written
that will run on any Python installation, anywhere."

And this would be great!

Octavian


--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Grant Edwards" 

You said that you don't care about convincing anybody either that
accessibility is import or about convincing anybody to do anything
about it.  To me that means you don't care about accessiblity.



And you are wrong. If you don't try to convince someone that Python is a
good language, does that mean that you don't care about Python?
You might be thinking that the people on the list *already know* that Python
is a good language.
And I also think that in the 21st century *every programmer* should know
that the accessibility is important.


People will not separate your personality from the cause you espouse.


Wow! that's really bad.


It's less than ideal, but it the way people are.
Is that a surprise to you?


No, but I am pretending that I don't know, because the those people are not
thinking correctly and it should be a shame for someone to have bad opinions
about a person just because that person has different opinions.
And the world should be ideal. Of course, it will never be, but we should
follow that direction at least and not consider it bad just because that way
require big and uncomfortable changes.


I thought that I might find here people that might have something
against my opinions, that is very normal, that's why we are
discussing, but I didn't think that I will also find people that will
have something against me, just because of my opinions.


That's not what I said.  I said that if you state your opininions in a
rude, insulting, or disrepectful manner, that will turn people against
your opinions regardless of the inherent value of the actual opinions


I have asked for a few times, but nobody answered. From what I said, what
was rude, insulting and disrespectable?


That's not what we're talking about.  We're not talking about your
opinions on some unrelated topic.  We're talking about the manner in
which you express your opinions on this topic.


And again, what's that "manner"?
Do you really think that the opinions of the majority are always more valid
than those of minorities, no matter the consequences?


Again, it's not your beliefs about other tops that are causing
problems for you.  What's causing problems is the manner in which you
are expressing your beliefs about this topic.


My beliefs are that the majority doesn't care about the minority of screen
reader users, because if it would care, it would be promoting accessible
tools.
Don't you agree with this? Or you don't like the atitude of expressing it so
clear and like to hide those sensible things?

Octavian

--
http://mail.python.org/mailman/listinfo/python-list


Re: WxPython versus Tkinter.

2011-01-28 Thread Octavian Rasnita

From: "Grant Edwards" 

So you're saying that you don't see any value in easing communication,
nor presumably in communication itself?


No, I don't want to say that, but I want to say that if it is obviously that
the others don't care about the main issue discussed, then the communication
just for the sake of communication has no value.
If the others do care, but they are just uninformed, then I guess they
wouldn't be upset by a direct communication that just tell them what's
wrong.


If you don't care about communicating with others, then being civil
probably does have no value (except for keeping a job or being
avoiding being beaten up on the playground).  If you want to
communicate (especially if you want somebody else to _do_ something),
then being civil and following normal social rules (etiquette) is
_very_ valuable. Without it the only thing you accomplish is to turn
people against you and whatever you're saying.


How can we talk about etiquette when exactly this etiquette is the one that
needs to be changed?
As you say, the etiquette is in favor of the preferences of the majority,
but how should react someone, what he/she should say in order to make the
others understand that that etiquette is bad because it discriminates some
categories of people?
And those minorities are not minorities because they want, or because they
simply don't want to change their way, but because they can't do that.


There is no inherent "value" in driving on the right side of the road
vs. the left.  However, there is a lot of value in driving on the side
of road that others expect you to.  I'd tell you to try driving on the
other side of the road sometime to see how "easing communication" can
be valuable, but I'm afraid you'd try it...


You are right in that case, but the comparison is not good because yes there
is a value in creating accessible GUIS. Those who drive on the left, the
minority, can adapt to drive on the right. If their cars have the wheels on
the right, there are technical solutions for that problem... they ccan
change their cars. But if an application uses Tk, those minorities that have
problems don't have any technical solution to solve them, because there are
not accessible versions for all the inaccessible apps.

Try to imagine that it will appear an incurable disease for those who drive
on the right. What do you think it will happen? Probably they all would
start driving on the left.
But what it would be happening if only a small minorities of those who drive
on the right will get that disease, say those between 18 and 25? Probably it
won't happen anything and those that are below 25 won't be able to drive a
car, because they are too few and too unimportant, and they would have too
small power to change things in favor of all.
And that would mean discrimination.

The people are free and as someone said, the man is a rational animal, so
the power differences rank the world and not the truth and etiquette,
because the etiquette is also imposed by the majority and about those who
have the power.
And I fully agree with you and others said regarding to this, but what I
said is that all that majority should do what it wants, however it should
always remember at least that it is not doing the right thing.
Yes, I know that this opinion that those who create shortcomings should not
feel good for what they do or even think, is something which is not helpful
for me, and it might not be helpful for those who use a screen reader either
in the present, exactly because of those bad and unfair sentiments, but I
hope that this will change in the future. And here I agree, I am not talking
only about the accessibility to computers, but about all the image that the
blind people have in the healthy's people mind.

Octavian

--
http://mail.python.org/mailman/listinfo/python-list