Hi Yvonne!

* yvonne thomson <[EMAIL PROTECTED]> wrote:
> As a result, writing a code cleaner for python would be quite hard,  
> since there'd be no easy way to tell what started and ended where.

Well, assume that we don't have any indenting at the beginning of a python
code file, there is at least a way to determine, whether a new code block is
reached or not, for new code blocks are marked with ":" aren't they? Still we
would face the problem, that we can't say where a block ends :-(
So I guess you are right. Anyways it was interesting to think about it :-)

I can imagine another way of handling the whole problem, if my previous
assumptions are correct. We could write sort of pre-python-code, which is
manipulated by our code cleaner script afterwards. Inside this code we could
write normal python code and mark the endings of code blocks syntactically
with 'end' as in pascal for instance. Just a hack, but perhaps that works.

But I really think it would be better to write an applescript which determines
the number of blank characters and spits them out using via voice.

Any ideas how to get the displayed string of the line where the cursor or
something similar is located from within an editor?
Do you know how to count bpossible blank characters at the beginning of the
line?
Which line of applescript-code hands over a new string containing the
information about the number of blank characters to voice over?
And how is it possible to disable the default behaviour of reading lines
and enable the code of our non-existing applescript temporarily?
Maybe someone knows the answers to these questions or knows someone who knows
them :-)
Perhaps I forgot something or made a mistake while thinking about it.

For those of you who have some programming experience, it shouldn't be too
hard to find a lot of information about how to applescript from the web.
Furthermore there should be a lot of documentation on your mac machines.
Would be interesting to see the community solving it's problems alone.

Regards and happy hacking ;-)
Christian


Reply via email to