Pythonwin: Red squiggley underline and syntax error

B

Brent W. Hughes

I copied and pasted some text into my Python code and then Pythowin put a
red squiggley underline under the two tabs at the beginning of the line.
What does that mean? I've tried various things including deleting the white
space in front of the line and reinserting the tabs. I've also tried
retyping the entire line. Sometimes, I can get the red line to go away but
when I try to run the program, it gives me a syntax error on the line that
had the red underline. Help!

Brent
 
S

Steven Bethard

Brent said:
I copied and pasted some text into my Python code and then Pythowin put a
red squiggley underline under the two tabs at the beginning of the line.
What does that mean? I've tried various things including deleting the white
space in front of the line and reinserting the tabs. I've also tried
retyping the entire line. Sometimes, I can get the red line to go away but
when I try to run the program, it gives me a syntax error on the line that
had the red underline. Help!

You've probably mixed tabs with spaces in your indentation somewhere.
Either replace all tabs with spaces or replace all spaces with tabs.

STeVe
 
C

Colin J. Williams

Steven said:
You've probably mixed tabs with spaces in your indentation somewhere.
Either replace all tabs with spaces or replace all spaces with tabs.

STeVe
The former is generally recommended.

Colin W.
 
N

Neil Hodgson

Steven Bethard:
You've probably mixed tabs with spaces in your indentation somewhere.
Either replace all tabs with spaces or replace all spaces with tabs.

You can see what characters are being used with the View | Whitespace
command which shows tabs as arrows and spaces as centred dots.

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Invalid syntax error 6
Image links underline not 3
Regular expression syntax error 1
Syntax error 4
Python 3 syntax error question 8
strange syntax error 1
syntax error 5
Syntax Error - Dreamweaver 0

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top