Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20764
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'lines.': 0.05; 'broken.': 0.07; 'revision': 0.07; 'tab': 0.07; 'used.': 0.07; 'python': 0.08; 'broken,': 0.09; 'disable': 0.09; 'linux.': 0.09; 'enabling': 0.13; '"python': 0.15; 'honor': 0.15; '"extended': 0.16; 'declaration': 0.16; 'editor,': 0.16; 'editors,': 0.16; 'mode.': 0.16; 'cc:addr:python-list': 0.16; "wouldn't": 0.17; 'wrote:': 0.18; 'lines,': 0.18; 'working.': 0.18; 'this?': 0.19; 'cc:no real name:2**0': 0.21; 'pointed': 0.21; "doesn't": 0.22; 'appropriate': 0.22; 'header:In-Reply-To:1': 0.22; 'earlier': 0.23; 'changed': 0.23; 'indentation': 0.23; 'interpreted': 0.23; 'stops': 0.23; 'correctly.': 0.24; 'windows': 0.26; 'cc:2**0': 0.26; 'somebody': 0.28; 'language.': 0.28; 'column': 0.28; 'version,': 0.28; "i'm": 0.28; 'script': 0.28; 'interpret': 0.29; 'cc:addr:python.org': 0.29; 'pm,': 0.29; 'characters,': 0.30; 'key,': 0.30; 'logic': 0.30; "they'll": 0.30; 'least': 0.30; "didn't": 0.30; 'pretty': 0.31; 'actually': 0.31; 'file.': 0.31; 'certainly': 0.32; 'suggested': 0.32; "i've": 0.32; 'there': 0.33; 'this.': 0.33; 'header:User-Agent:1': 0.33; 'it.': 0.33; 'file': 0.34; 'character': 0.34; 'all.': 0.34; 'anything': 0.34; 'none': 0.35; 'trouble': 0.35; 'operating': 0.35; 'issue': 0.37; 'revert': 0.37; 'but': 0.37; 'using': 0.37; 'another': 0.37; 'either': 0.37; 'uses': 0.38; 'received:192': 0.38; 'configured': 0.38; 'could': 0.38; 'some': 0.38; 'format': 0.38; 'should': 0.38; 'problems': 0.38; 'open': 0.38; 'files': 0.39; "i'd": 0.39; 'except': 0.39; 'called': 0.40; 'put': 0.40; 'might': 0.40; 'subject:Please': 0.40; 'easy': 0.60; 'type': 0.61; 'your': 0.61; 'hope': 0.61; 'course,': 0.62; 'reply': 0.64; 'ever': 0.64; 'opened': 0.64; 'day,': 0.65; 'press': 0.69; 'header:Reply-To:1': 0.70; 'care': 0.71; 'reply-to:no real name:2**0': 0.72; 'spaces': 0.73; 'encoding,': 0.84; 'nonsense.': 0.84; 'spaces.': 0.84; 'dozen': 0.91; 'dozens': 0.91; 'utilities,': 0.91; 'subject:!!': 0.93 |
| Date | Thu, 23 Feb 2012 17:43:48 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16 |
| MIME-Version | 1.0 |
| To | Manish Sharma <manish2aug@gmail.com> |
| Subject | Re: Please verify!! |
| References | <724ccbd6-30d1-41bd-bf38-2a5ce82953a1@x19g2000yqh.googlegroups.com> |
| In-Reply-To | <724ccbd6-30d1-41bd-bf38-2a5ce82953a1@x19g2000yqh.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:+2JjVC5acy4OX9tUoLaotorPV6tNtYz8UMfDO4mKXoM dSnm80BlVD0UEO6s//KUik6zyOCkx5JrQygb2UtZ9WNvyacFcM rnSoxouG9Tim+DCbqVw+zq5wTDMQHJ3PY+WNsNV33YSAaSzwFP 2LcEc/aUA5fv/ibYObKKkfqWVHQPhr8e8e8vE2nfIqtHSEDnCm ftgCzQDQMnSongyAB9O/UOls9zO6Y30mz5cScWgXgful013dww SkLmYQUZePEtjTNwDw/DNWG+DbDO4UjBaVpQ51xMn+SBlG7/rg KSUv7gF021SaXrDtgyAqFOL8P1z0xmnQveAUvYfWhZvJqMRRJ4 6op1hOXKTlHk6C0CX0YE= |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | d@davea.name |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.101.1330037037.3037.python-list@python.org> (permalink) |
| Lines | 55 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1330037037 news.xs4all.nl 6863 [2001:888:2000:d::a6]:34949 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:20764 |
Show key headers only | View raw
On 02/23/2012 05:13 PM, Manish Sharma wrote: > Hi I am new to python language. On my first day, somebody told me that > if any python script file is opened with any editor except python > editor, the file is corrupted. Some spacing or indentation is changed > and script stops working. I was opening the script file in Windows > using Notepad++ but I didn't save anything and closed it. Still it was > suggested to never open the python file in any other editor. > > Can anybody please verify this? Can opening a python script in any > editor other than python editor corrupt the script? Did anybody ever > face such type of issue or its just misunderstanding of the concept. > > I hope this group is the best place to ask this. Please reply ! > > :) > Manish That is nonsense. I've used at least a dozen text editors, from Windows Notepad to emacs on Linux. And since I know of no program called "python editor," I'm sure none of them was that one. Of course, there are editors that are broken, or can be configured to be broken. I certainly wouldn't try wordpad, even in text mode. But a good editor with a good configuration can be much nicer to use than Notepad. First thing I'd do is to disable tab logic in the editor. When you press the tab key, there's no excuse for an editor to actually put a tab in the file. It should adjust the column by adding the appropriate number of spaces. The main place you get in trouble is when a file has tabs in some lines, and uses spaces for indenting on other lines. Since tabs are not interpreted the same way in various utilities, it's just better not to use them at all. As Amirouche has pointed out, line endings can be inconsistent between different operating systems, and not all editors can handle the differences. But the python compiler/interpreter doesn't care about which line ending is used. One other issue could be files that have non-ASCII characters. Since a text file has no standard way to indicate what format it uses (utf8, ucs2, or dozens of "extended ASCII" encodings), another editor might not deal with it correctly. There is a standard way to indicate to Python how to interpret non-ascii characters, so if you either 1) always use ASCII1 2) always use the same character encoding, or 3) have your editor look for the declaration and honor it, you'd have no trouble. If these problems do occur, they'll be pretty easy to spot. And you can always revert to an earlier version, by using your revision control system. Enabling one of those is about as important as choosing your editor. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Please verify!! Manish Sharma <manish2aug@gmail.com> - 2012-02-23 14:13 -0800
Re: Please verify!! Ben <bungiman@gmail.com> - 2012-02-23 14:29 -0800
Re: Please verify!! Dave Angel <d@davea.name> - 2012-02-23 17:43 -0500
Re: Please verify!! Joshua Miller <milleja46@gmail.com> - 2012-02-23 20:57 -0500
Re: Please verify!! Andrew Berg <bahamutzero8825@gmail.com> - 2012-02-23 21:45 -0600
Re: Please verify!! Ben Finney <ben+python@benfinney.id.au> - 2012-02-24 19:32 +1100
Re: Please verify!! Andrew Berg <bahamutzero8825@gmail.com> - 2012-02-24 03:18 -0600
Re: Please verify!! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-24 12:20 +0000
Re: Please verify!! Andrew Berg <bahamutzero8825@gmail.com> - 2012-02-24 07:20 -0600
Re: Please verify!! Chris Angelico <rosuav@gmail.com> - 2012-02-25 07:41 +1100
Re: Please verify!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-02-25 00:49 +0000
Re: Please verify!! Chris Angelico <rosuav@gmail.com> - 2012-02-25 12:25 +1100
Re: Please verify!! Dave Angel <d@davea.name> - 2012-02-24 21:36 -0500
Re: Please verify!! Duncan Booth <duncan.booth@invalid.invalid> - 2012-02-24 11:21 +0000
Re: Please verify!! Andrew Berg <bahamutzero8825@gmail.com> - 2012-02-24 05:36 -0600
Re: Please verify!! Andrew Berg <bahamutzero8825@gmail.com> - 2012-02-24 01:26 -0600
Re: Please verify!! Jugurtha Hadjar <jugurtha.hadjar@gmail.com> - 2012-02-24 12:10 +0100
csiph-web