[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Tabnanny errors when Migrating Python 2.4 code to 2.5

Mike Driscoll

1/4/2008 4:57:00 PM

Hi,

When Python 2.5 first came out, I eagerly downloaded it and
immediately had issues with getting it to run my 2.4 code. So I just
stuck to 2.4. However, I decided this week that I really should try to
get 2.5 to work. Does anyone know why code that works perfectly for
months in a 2.4 environment throws indentation errors in 2.5?

And why does 2.5 default to indenting 8 characters instead of 4 in
IDLE? That's just weird. When I did a select all and did a Tabify
region, it indented everything 8 characters then too.

I haven't changed the configuration at all. Any ideas?

Thanks,

Mike
3 Answers

John Machin

1/4/2008 8:07:00 PM

0

On Jan 5, 3:56 am, kyoso...@gmail.com wrote:
> Hi,
>
> When Python 2.5 first came out, I eagerly downloaded it and
> immediately had issues with getting it to run my 2.4 code. So I just
> stuck to 2.4. However, I decided this week that I really should try to
> get 2.5 to work. Does anyone know why code that works perfectly for
> months in a 2.4 environment throws indentation errors in 2.5?

No, not until you go to the bother of reproducing the problem with a
small file, tell us what platform you are on, how you are running this
code (IDLE, shell prompt, ...), how you installed Python 2.5
(2.5.1?), ...

Mike Driscoll

1/4/2008 9:06:00 PM

0

On Jan 4, 2:06 pm, John Machin <sjmac...@lexicon.net> wrote:
> On Jan 5, 3:56 am, kyoso...@gmail.com wrote:
>
> > Hi,
>
> > When Python 2.5 first came out, I eagerly downloaded it and
> > immediately had issues with getting it to run my 2.4 code. So I just
> > stuck to 2.4. However, I decided this week that I really should try to
> > get 2.5 to work. Does anyone know why code that works perfectly for
> > months in a 2.4 environment throws indentation errors in 2.5?
>
> No, not until you go to the bother of reproducing the problem with a
> small file, tell us what platform you are on, how you are running this
> code (IDLE, shell prompt, ...), how you installed Python 2.5
> (2.5.1?), ...


I'm using Windows XP, using IDLE (which was mentioned already) and I
downloaded the 2.5.1 exe/msi file from python.org to install it.

I have yet to find a simple one which exhibits the issue to post. It
seems to happen to my complex files, not the simple ones.

Sorry to bother you.

Mike

John Machin

1/4/2008 10:28:00 PM

0

On Jan 5, 8:05 am, kyoso...@gmail.com wrote:
> On Jan 4, 2:06 pm, John Machin <sjmac...@lexicon.net> wrote:
>
> > On Jan 5, 3:56 am, kyoso...@gmail.com wrote:
>
> > > Hi,
>
> > > When Python 2.5 first came out, I eagerly downloaded it and
> > > immediately had issues with getting it to run my 2.4 code. So I just
> > > stuck to 2.4. However, I decided this week that I really should try to
> > > get 2.5 to work. Does anyone know why code that works perfectly for
> > > months in a 2.4 environment throws indentation errors in 2.5?
>
> > No, not until you go to the bother of reproducing the problem with a
> > small file, tell us what platform you are on, how you are running this
> > code (IDLE, shell prompt, ...), how you installed Python 2.5
> > (2.5.1?), ...
>
> I'm using Windows XP, using IDLE (which was mentioned already)

in the context of editing/displaying code, not executing it. Does the
problem occur before or after you edit a file with IDLE?

> and I
> downloaded the 2.5.1 exe/msi file from python.org to install it.

What you downloaded doesn't answer the question about how you
installed it. Do you still have your 2.4 installation?

>
> I have yet to find a simple one which exhibits the issue to post. It
> seems to happen to my complex files, not the simple ones.

So chop up a complex file ...
Have you inspected the failing files using a text editor that can
display tabs and spaces (e.g. PythonWin, TextPad)?

>
> Sorry to bother you.

You didn't bother me. You are bothering yourself by asking questions
without enough information to get reasonable answers.