Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109369
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Michael Selik <michael.selik@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: [Q] ImportError by __import__() on Python >= 3.4 |
| Date | Thu, 02 Jun 2016 14:15:45 +0000 |
| Lines | 13 |
| Message-ID | <mailman.96.1464876957.1839.python-list@python.org> (permalink) |
| References | <CAFTm5Rv+K6KFMt2FXfWfZtn5gAnJtf4XawfijRpO4vcJf73h7g@mail.gmail.com> <CAGgTfkPEf3vTWV+WkF8ZZBC=6Oa1NkzhP26tSEX0JNLxHt4DMg@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de K0ekR5NeUACYF0Jn8VQRVwHcUyOW+yNkNYKmQ2zV5hKA== |
| Return-Path | <michael.selik@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.05; 'exit': 0.07; "'w')": 0.09; 'block.': 0.09; 'flush': 0.09; 'thu,': 0.15; '2016': 0.16; '``with``': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'subject:] ': 0.19; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.21; 'file.': 0.22; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'statement': 0.32; 'file': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'question,': 0.35; 'but': 0.36; 'received:209.85': 0.36; "wasn't": 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'received:209.85.220': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'close': 0.61; 'kuwata': 0.84; 'makoto': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=22VezkgrX3+mDiOM034+313cFKVgKHB5tSLoZiAjC5I=; b=LNpUJ4iZKPl9ADhjsO1LD154dQuUKHQB2/7taOnRUXRyF1xsax+fMxdZ/ouDFdhJid MsXfRMXYV9RrlAEyGZVLjTLQUbYYIj+d8JiGauJI0tn3+1JWPUDtaPFupPOe6Z6ZF7m6 lLEZyQs7HqN2ip0U0ae7VH3hOT6guoz1KGjb3ZYwI5T4TYYTxL5Q/lmy2FdcXIHT8r3o ViIBxehTmUmOoXYcNxU/mtY7K9GRRWSytL6Add+iKhGQ1t0HcEtB5jrr2XLMvcrp4Gyx MRgzQLzv+ov4oRdQSBUbK2g3bQOoycJhz6sMrE/h28KU/eGsbQKkvRgMNVeNqIehT6As K8zg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=22VezkgrX3+mDiOM034+313cFKVgKHB5tSLoZiAjC5I=; b=C+kW6EmgYza/9K4jVQcX7UgZYRR0nDaK8TnEMZ2vi/vfsLu6ppvE7lRIw6QqphntXG 49uVXKh6t4a/1NxEAs9SCm+T+XHJ5G8GoQIPkDAco6ih5yBcTLf7Oq1kFVrFmMAd2aK3 yk60JpV7ROZN+Q0S8PqJqnzVePK/U4fu71GyxfKqPLD5mhSJgX3L2XunwO7hyW23e1pb RTtpmtt6bZp7IrXRHJPeignNW//HotEA1DCa6EKhalms3Vm9pN6VQ+13FLYcBn+rNPfJ eZfUaNCpKSGdpKkjHZ8zjmgoX0Kq4cA+e/vACwOUvUasORjXoFaxJx++CQhXgG+AJOks 4peQ== |
| X-Gm-Message-State | ALyK8tKttjtOGeP4RW5l9qjsbR+incd9WxVU/Va9glMrTRobC/GSt3IQjvIhPtGr4EiksQc3I2eiIJB5fcmRyw== |
| X-Received | by 10.55.151.199 with SMTP id z190mr42035519qkd.172.1464876954926; Thu, 02 Jun 2016 07:15:54 -0700 (PDT) |
| In-Reply-To | <CAFTm5Rv+K6KFMt2FXfWfZtn5gAnJtf4XawfijRpO4vcJf73h7g@mail.gmail.com> |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.22 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| 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> |
| X-Mailman-Original-Message-ID | <CAGgTfkPEf3vTWV+WkF8ZZBC=6Oa1NkzhP26tSEX0JNLxHt4DMg@mail.gmail.com> |
| X-Mailman-Original-References | <CAFTm5Rv+K6KFMt2FXfWfZtn5gAnJtf4XawfijRpO4vcJf73h7g@mail.gmail.com> |
| Xref | csiph.com comp.lang.python:109369 |
Show key headers only | View raw
On Thu, Jun 2, 2016 at 10:06 AM Makoto Kuwata <kwa@kuwata-lab.com> wrote:
> os.mkdir(name)
> with open(name + "/__init__.py", 'w') as f:
> f.write("X=1")
> f.flush()
>
> Please give me any advices or hints.
>
This wasn't your question, but you don't need to flush the file. The
``with`` statement will automatically flush and close your file for you
after you exit the block.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [Q] ImportError by __import__() on Python >= 3.4 Michael Selik <michael.selik@gmail.com> - 2016-06-02 14:15 +0000
csiph-web