tkinter

2013-06-23 Thread JK

Nazdar mládenci,

měl bych zájem dokončit překlad Tkinteru 
(http://tkinter.programujte.com/index.htm), na kterém před šesti lety 
pracovali zejména Pavel Kosina a Jakub Vojáček.


Poslal jsem jim mejla ale nehlásí se mi. Poradíte mi?

Před několika dny jsem přeložil pěkné texty o Tkinteru 
(http://www.python-course.eu/python_tkinter.php). Překlad jsem zatím 
odložil na https://bitbucket.org/tovim/tkinter-klein-cs, odkud si jej 
případně

můžete stáhnout a prohlédnout.
Budu jej ještě se svolením autora editovat.

Zdravím, Tovim
--
http://mail.python.org/mailman/listinfo/python-list


Python documentation too difficult for beginners

2010-11-02 Thread jk
Hi,

I've been coding in PHP and Java for years, and their documentation is
concise, well structured and easy to scan.

Others have mentioned this apparently for years (see:
http://stackoverflow.com/questions/4046166/easy-to-navigate-online-python-reference-manual/4070851
and http://www.russellbeattie.com/blog/python-library-docs-still-suck
and http://xahlee.org/perl-python/xlali_skami_cukta.html).

Compare for instance the differences in ease of use, and speed of use,
of these:

http://docs.python.org/library/functions.html#open
http://uk.php.net/manual/en/function.fopen.php

The former is difficult to find (try searching for 'open' in the
search box and see what you get). It is simply a collection of
paragraphs without strong enough contrast to differentiate the
different parts - parameters, parameter values, return types,
exceptions and related functions. It is slow to read and doesn't allow
easy visual scanning.

The latter has clearly delineated, standardised content areas for each
of these without excessive text. It uses tables which are easy to scan
for possible opening modes and allows users to contribute their own
examples.

Sadly, the use of restructured text by python doesn't allow a new
document generator to be written - all existing documentation would
need updating with docblocks or something similar.

Has anyone else struggled while trying to learn the language? The
whole documentation system seems geared towards people who already
know what they're looking for and is close to useless for beginners.
I'm not the only one who finds google an easier way to find
documentation about python.

Is there much chance that the Python maintainers will change their
documentation system to make it more like Java or PHP? How would I go
about trying to make that happen?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking
about.

Why aren't the official docs like this, and why has it taken me 2 days
of searching? All this needs is a search engine behind it and it'd be
perfect.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
On Nov 2, 11:49 am, Tim Golden  wrote:
> But why do you imagine that the core
> Python documentation -- developed and maintained by a group of people
> who clearly have some idea what they're doing -- should change to a
> format which happens to suit you?

It's not just me who's found the current documentation frustrating.
And sure, the developers know how to code, but they probably can't see
the project with the eyes of a beginner any more.

Making a change to how code is documented to allow more javadoc-style
documentation to be produced could help people migrate from a java
background and ease the learning curve for them, leading to wider
adoption of the language. It wouldn't necessarily mean that the
current documentation style would need to change either.

> In short, please feel free to contribute directly to the core
> documentation effort, or to produce alternatives yourself

I may well do that.

@Tim Wintle
> Personally I use Google, e.g.
> "list site:docs.python.org"
> to bring up documentation about the list type.

Surely you shouldn't have to go to google though? Or the interpreter?
Maybe it's just what you're used to, but I'd expect the language's web
site to provide enough of a reference in itself, while using google
for examples.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
On Nov 2, 1:42 pm, Steven D'Aprano  wrote:
> It's always difficult to know how much information is too much. The PHP
> docs seem to take an "everything including the kitchen sink" approach.
> Given that approach, it makes sense to divide everything into
> subsections, one page per function. But with Python's minimalist
> approach, it would just be annoying. Compare the four lines of:
>
> http://docs.python.org/library/functions.html#id
>
> with this re-write in the PHP fashion:
>
> =
> id
> =
> (Python 1.x, Python 2.x, Python 3.x)
>
> id -- id of an object
>
> Description
> ---
>
> id(object)
>
> id returns the numeric "identity" of an object, which is guaranteed to be
> unique and constant for this object during its lifetime.
>
> Note: two objects with non-overlapping lifetimes may have the same id()
> value.
>
> Note: CPython implementation detail: This is the address of the object.
>
> Parameters
> --
>
> * object
>
>   Any object.
>
>   Note: all data in Python are objects, even ints and strings.
>
>   Note: there are no undefined objects in Python. If you call
>   id(variable) on an unbound variable name, Python will raise an
>   exception.
>
> Return values
> -
>
> Returns an integer or long integer object representing the ID of the
> argument.
>
> Errors/exceptions
> -
>
> If the argument to id() is a named variable rather than a literal, and
> that name is not bound to any object, then a NameError will be raised.
> Otherwise every call to id() must succeed.
>
> Note: if the call to id() is inside a function, the exception may be a
> subclass of NameError such as UnboundLocalError.
>
> Note: literals are not guaranteed to always refer to the same object.
>
> Changelog
> -
>
>   0.9  First version added (I think).
>
> Examples
> 
>
>    id(x)
>    id(alist[1])
>    id(instance.attribute)
>    id(module.name.attribute['key'].method(arg1, arg2).seq[2])
>
> Notes
> -
>
>    If you're still reading, I admire your persistence.
>
> See also
> 
>
>    Python's object model
>    Exceptions
>
> Steven

You're right in that the python docs in this case are less lines, but
that's one of the problems. It doesn't mention anywhere the extra
detail you've added regarding exceptions thrown. That's the kind of
thing that probably comes through experience or some kind of
convention which isn't obvious to beginners. Having things split into
sections - parameters, return types, exceptions, etc - lets me find
what I'm looking for quickly.

As for the 9 paragraphs statement, there's a usability book that
applies here - it's called "Don't make me think". I shouldn't have to
go through freeform text to find what I'm looking for when a list
would make that information easier to find. And splitting the docs
into sections would allow me to skip to what I'm looking for. I really
would be much happier with your example documentation.

I think the key difference is that I don't want to have to *read* the
python docs - I want to be able to scan for what I'm looking for and
find it easily. That makes me productive.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python documentation too difficult for beginners

2010-11-03 Thread jk
On Nov 2, 11:06 pm, Lawrence D'Oliveiro  wrote:
> In message
> , jk
> wrote:
>
> > This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking
> > about.
>
> Framesets? Is that really your idea of well-laid-out documentation? Using a
> feature which has been derided (and dropped in HTML5) because of its effect
> on usability and accessibility?

No, the framesets suck, and I agree that Javadoc isn't perfect.
Actually, I do think the PHP docs are the best I've found as a
reference. Javadocs just need a few tweaks and they'd be better (an
index at the top so you don't have to scroll down, no framesets, a
search engine). Still think they're better than the python docs though.
-- 
http://mail.python.org/mailman/listinfo/python-list


How can I copy one excel file data to another excel file by excluding hidden rows content using Python

2016-10-19 Thread Kishore JK
I need to copy one excel file data into another excel file by excluding rows 
which were hidden in source excel file.

https://i.stack.imgur.com/NPUK6.png

As shown in the image, from the source excel file, I need to copy the data of 
row numbers 116,135 and 139 and exclude all the remaining rows which were 
hidden because of not matching the criteria.

I have tried below code, but this is copying entire data into new excel sheet.
wb = openpyxl.load_workbook('sourcefile.xlsx')
sheet = wb.active
sheet.title = 'Sheet1'
wb.save('destinationfile.xlsx')
-- 
https://mail.python.org/mailman/listinfo/python-list