简体   繁体   中英

Python program written in Notepad++, error in TextWrangler

So I wrote a program in python using NotePad++ in Windows, but then when I opened the file in Mac computer using TextWrangler or any text editor in it and after compiling it, there was an error message regarding indentation. How can I easily fix this?

Here is something to do with your file via Notepad++:

Edit -> Blank Operations -> TAB to Space

If this won't help (and most likely it won't) you will need to check indents manually. I can suggest View -> Show Symbol -> Show Indent Guide for convenience.

It is a good and safe style to use only spaces. Not to face this problem in your future projects configure Notepad++: Settings -> Tab Settings -> Replace by space . You will still be able to use tabs, but they will be changed to defined number of spaces (4 for me). Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM