Mailinglist Archive: opensuse (1473 mails)

< Previous Next >
Re: [opensuse] editor that does not eat out TAB characters
  • From: Maura Monville <mauede@xxxxxxxxx>
  • Date: Mon, 15 Jun 2009 21:01:16 +0000 (GMT)
  • Message-id: <854438.63892.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Personally I do hate Windows. Although, in certain environments the development
platform, and even the tools, are imposed ... take irt or leave it.

My current problem stems from my ignorance about python. On top of that I have
to use the undocumented python code written by an Ms. student who decided to
leave the Computer Science program when he was just a couple of weeks from
defending his thesis. A crazy behaviour that nobody expected.
By trial and error I succeeded in getting the python script run to completion
without any error. But the oputut it generates is not what was expected.
Basically the python script is supposed to extract automatically some data from
the miRecords data base which is public and available in form of structurated
HTML web pages.
I understand where the python script gets the raw data (miRecords). But I
cannot understand where it stores the information it is supposed to extract. It
looks like the script is trying to store the info into a local database that
might be
MySql or SQLight. Since I cannot see any call or link to either databases, I
tried to run the python script step-by-step.
Since python is a scripting language I would expect to be able to accomplish
that just copying llines from the script and pasting them onto a python
terminal shell. But, regardless of which editor I use, python interpreter
prints out plenty of "indentation error " messages.
I tried an interactive graphic debug session by typing #ddd pbd ... which
brought up a nice GUI expecting an executable to be uploaded (sigh !).
I did not install pydbg as no rpm file is provided (as far as I know) and its
installation procedure from source code is not clear to me. I do not know
whether the standard steps (configure, make, make install) can be applyed to a
scripting language.
I am appalled at a modern object-oriented language that is built on a suyntax
which is sensistive to indentation !

I hope I won't irritate anyone if I post some excerpts of my pdb debugging
attempts ... maybe they will be meaningful for
pythons experienced users.


Thank you very much for your patience.
Maura



----- Messaggio originale -----
Da: Anton Aylward <anton.aylward@xxxxxxxxxx>
A: OS-EN <opensuse@xxxxxxxxxxxx>
Inviato: Lunedì 15 giugno 2009, 18:10:13
Oggetto: Re: [opensuse] editor that does not eat out TAB characters

Maura Monville said the following on 06/15/2009 11:39 AM:
whatever editor I use .. I have not found a way to see the unprintable
characters (Tab).

Help us here.
Why do you need to see the tab as a specific marker rather than as
expanded spaces? If I recall, python only needs the indenting, it
doesn't care what's shown on the screen for you so long as its
consistent, and VI (and I would presume Emacs) will expand tabs on
screen to how ever many display spaces your sweet heart desires.

So what really is your problem here?

Is it that you've grown up in Windows with an editor that shows tabs as
an arrow rather than expanding spaces so you can see the indenting being
aligned? Or what? If so, VI can be configured to show tabs as "^I",
but then you don't see the alignment of the indents. I thought you
wanted to work in Python, so why not use VI's Python mode. Perhaps I'm
an oddball, but I'd rather see the tabs expanded on screen.

Does Python care whether the indenting is via tabs or spaces so long as
its consistent?

What are you really asking here?
People have offered a number of solutions but you seem to be playing a
"Yes-but" game.



--
"Necessity is the mother of invention" is a silly proverb.
"Necessity is the mother of futile dodges" is much nearer the truth.
- Alfred North Whitehead
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >