Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76237
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'subject:Python': 0.06; '(python': 0.07; 'binary': 0.07; 'beginners': 0.09; 'bytes.': 0.09; 'non-text': 0.09; 'parsing': 0.09; 'pil': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'recommends': 0.09; 'works.': 0.09; 'python': 0.11; 'jan': 0.12; 'programs.': 0.14; 'windows': 0.15; "'rb')": 0.16; 'fork': 0.16; 'idle.': 0.16; 'input:': 0.16; 'library),': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:simple': 0.16; 'tab,': 0.16; 'wrote:': 0.18; 'later': 0.20; 'command': 0.22; 'install': 0.23; 'header :User-Agent:1': 0.23; 'byte': 0.24; 'bytes': 0.24; '(or': 0.24; 'options': 0.25; 'script': 0.25; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'compared': 0.30; 'programming.': 0.30; 'easier': 0.31; 'dialog': 0.31; 'file': 0.32; 'run': 0.32; 'text': 0.33; 'open': 0.33; 'url:python': 0.33; 'level.': 0.33; 'plain': 0.33; 'sources': 0.33; 'updated': 0.34; 'editor': 0.35; 'idle': 0.36; 'doing': 0.36; 'useful': 0.36; 'url:org': 0.36; 'example,': 0.37; 'experience,': 0.37; 'seconds': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'anything': 0.39; 'does': 0.39; 'heard': 0.39; 'received:71': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'read': 0.60; 'above,': 0.60; 'url:5': 0.61; 'new': 0.61; 'you.': 0.62; 'back': 0.62; 'email addr:gmail.com': 0.63; 'subject:Need': 0.64; 'linked': 0.65; 'believe': 0.68; 'enjoy': 0.71; 'friendly': 0.72; '(any': 0.84; 'received:fios.verizon.net': 0.84; 'pic': 0.91; 'url:latest': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Terry Reedy <tjreedy@udel.edu> |
| Subject | Re: Need simple Python Script |
| Date | Wed, 13 Aug 2014 17:01:32 -0400 |
| References | <0ec17bee-0ed6-4494-b4ab-2319880315af@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | pool-71-175-90-87.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| In-Reply-To | <0ec17bee-0ed6-4494-b4ab-2319880315af@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12948.1407963727.18130.python-list@python.org> (permalink) |
| Lines | 44 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1407963727 news.xs4all.nl 2895 [2001:888:2000:d::a6]:35715 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:76237 |
Show key headers only | View raw
On 8/13/2014 12:11 PM, taifulsust@gmail.com wrote:
> I am new in Python programming.
> Currently reading the book " Learn Python the Heard Way".
The title is '... Hard Way'. This is literally true. The author 'warns'
beginners to not learn Python 3, which is easier to learn than Python 2,
and works better in many ways.
Even worse, he warns people not to use Idle (or any other IDE) and use a
plain text editor like Notepad++ and a terminal to edit and run
programs. This is definitely the Hard Way compared to edit and run with
Idle. I know from experience, because I started the way he recommends
(editor and command prompt) and put off learning to use Idle. What I
fool I was.
> However i need a python script which will take
> an image file (any standard format) from my windows pc as input.
Python will read any file as input: bytes are bytes. Open non-text
files in binary mode. For example,
pic = open('image.jpg', 'rb') # I believe this is the same in 2.x.
However, this is not useful unless you know the file layout and enjoy
parsing it at the byte level. Better to use a package that does that
for you. For doing anything with images, you might use pillow, a
friendly updated fork of PIL (Python Imaging Library), which works on
2.6-7 and 3.2-4. I just did
C:\Programs\Python34>pip install pillow
(I have been meaning to do this anyway) and a few seconds later it is
installed and 'import PIL' works.
For the docs, I had to go back to
https://pypi.python.org/pypi/Pillow/2.5.2
to find the reference to
http://pillow.readthedocs.org/en/latest/
In Idle I added 'pillow' to the help menu, linked to the url above,
using the options dialog General tab, Additional Help Sources box.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Need simple Python Script taifulsust@gmail.com - 2014-08-13 09:11 -0700 Re: Need simple Python Script Chris Angelico <rosuav@gmail.com> - 2014-08-14 02:17 +1000 Re: Need simple Python Script John Gordon <gordon@panix.com> - 2014-08-13 17:08 +0000 Re: Need simple Python Script Terry Reedy <tjreedy@udel.edu> - 2014-08-13 17:01 -0400
csiph-web