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

References <5c703f0b-ca70-48be-94e7-bbacedf854e0@googlegroups.com> <af534521-d057-4413-84fc-63a593625765@googlegroups.com>
Date 2014-06-24 07:50 +1000
Subject Re: Adding thread module support to Ubuntu 3 for Python3
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11205.1403560243.18130.python-list@python.org> (permalink)

Show all headers | 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