Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73522

Re: Adding thread module support to Ubuntu 3 for Python3

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:support': 0.07; 'versions.': 0.07; 'subject:Python3': 0.09; 'subject:module': 0.09; 'underscore': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'thread': 0.14; '23,': 0.16; '24,': 0.16; 'docstring': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hint': 0.16; "module's": 0.16; 'python3.': 0.16; 'subject:Adding': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; "shouldn't": 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'says': 0.33; 'running': 0.33; 'monday,': 0.33; 'received:google.com': 0.35; 'module.': 0.36; 'ubuntu': 0.36; 'should': 0.36; 'changed': 0.39; 'email addr:gmail.com': 0.63; 'actually,': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=l+mDPqemGGZzpjfRgthI2N2cpp8I6iMy3fFYA5xX6CA=; b=dEeP7m3GnovqpPscfQE5g5zaYmz6mSQFovmfAKJsa+zgKXHPyTpU3BW/zD+iDEKyIS RFLgvMd/UXE2QpL/PBkjcOsXmZ8fvwT9KM7S5wubho+OY+aEHbzXtYKb8y+Rh5tUiYA+ WUUjsTZFTOJLuEPLbVUJYMmS9UlBXolQweIYeXvDzTPwA4RA0kA0JMEex/dRKBE3gel/ /ouOvp/6cDUKV49Y+uaMQoDjzEVxo3HaChzkGOnByJtQCu2bGchEBhxlQr2LFtG6wFAZ aslMrkmE15m63YKssh3gfZy6Tzwrc2BwLpSGvxzWc1magDBjTrbop7VjVfVo/qxIQMQe tVPw==
MIME-Version 1.0
X-Received by 10.58.162.10 with SMTP id xw10mr21455967veb.25.1403560235415; Mon, 23 Jun 2014 14:50:35 -0700 (PDT)
In-Reply-To <af534521-d057-4413-84fc-63a593625765@googlegroups.com>
References <5c703f0b-ca70-48be-94e7-bbacedf854e0@googlegroups.com> <af534521-d057-4413-84fc-63a593625765@googlegroups.com>
Date Tue, 24 Jun 2014 07:50:35 +1000
Subject Re: Adding thread module support to Ubuntu 3 for Python3
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.11205.1403560243.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1403560243 news.xs4all.nl 2874 [2001:888:2000:d::a6]:32985
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73522

Show key headers only | View raw


On Tue, Jun 24, 2014 at 6:34 AM,  <kenakahn@gmail.com> wrote:
> On Monday, June 23, 2014 4:12:34 PM UTC-4, kena...@gmail.com wrote:
>> What package do I need to install to get thread support (import thread) for Python 3 running under ubuntu 3?
>
> Found it.  The import statement changed to "import _thread" for python3.

Actually, that should give you a strong hint that you shouldn't be
using that module. The leading underscore says that the module is
private/internal. The thread module's docstring under Python 2
suggests that you should instead be using "import threading", which
works on both versions.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Adding thread module support to Ubuntu 3 for Python3 kenakahn@gmail.com - 2014-06-23 13:12 -0700
  Re: Adding thread module support to Ubuntu 3 for Python3 kenakahn@gmail.com - 2014-06-23 13:34 -0700
    Re: Adding thread module support to Ubuntu 3 for Python3 Chris Angelico <rosuav@gmail.com> - 2014-06-24 07:50 +1000
  Re: Adding thread module support to Ubuntu 3 for Python3 Larry Hudson <orgnut@yahoo.com> - 2014-06-23 19:40 -0700
    Re: Adding thread module support to Ubuntu 3 for Python3 Chris Angelico <rosuav@gmail.com> - 2014-06-24 13:25 +1000
    Re: Adding thread module support to Ubuntu 3 for Python3 alister <alister.nospam.ware@ntlworld.com> - 2014-06-24 08:13 +0000

csiph-web