Re: Missing modules for python

Discussion in 'Python' started by Jed Smith, Oct 11, 2010.

  1. Jed Smith

    Jed Smith Guest

    On Mon, Oct 11, 2010 at 8:43 AM, Sunil Saggar <> wrote:
    > I was trying to make exe from python program and found the following errors
    >
    > The following modules appear to be missing
    > ['email.FeedParser', 'email.Generator', 'email.Iterators', 'email.Message',
    > 'email.Utils', 'simplejson', 'socks']
    >
    > I am using Python  2.6


    simplejson got merged into the standard library in Python 2.6. In
    libcloud, I wrote this:

    try: import json
    except ImportError, excp: import simplejson as json

    Is your app looking for simplejson? (I didn't look in to the other modules.)

    --
    Jed Smith
    Jed Smith, Oct 11, 2010
    #1
    1. Advertising

  2. On Mon, 11 Oct 2010 10:32:44 -0400, Jed Smith wrote:

    > simplejson got merged into the standard library in Python 2.6. In
    > libcloud, I wrote this:
    >
    > try: import json
    > except ImportError, excp: import simplejson as json


    I'm curious why you bother to bind the exception to the excp when you
    don't actually use it? If this occurs in the top level of a module, it
    just introduces an apparently unneeded and unused global name.



    --
    Steven
    Steven D'Aprano, Oct 12, 2010
    #2
    1. Advertising

  3. Jed Smith

    Jed Smith Guest

    On Mon, Oct 11, 2010 at 7:02 PM, Steven D'Aprano
    <> wrote:
    > On Mon, 11 Oct 2010 10:32:44 -0400, Jed Smith wrote:
    >
    >> simplejson got merged into the standard library in Python 2.6. In
    >> libcloud, I wrote this:
    >>
    >>   try: import json
    >>   except ImportError, excp: import simplejson as json

    >
    > I'm curious why you bother to bind the exception to the excp when you
    > don't actually use it? If this occurs in the top level of a module, it
    > just introduces an apparently unneeded and unused global name.


    Typed from memory, and now that you mention it, I don't think I
    actually did. At any rate, we mandated 2.6 and it's no longer there.

    --
    Jed Smith
    Jed Smith, Oct 12, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Bishop

    The case of the missing modules

    Dan Bishop, Jul 26, 2003, in forum: Python
    Replies:
    0
    Views:
    301
    Dan Bishop
    Jul 26, 2003
  2. Kammy
    Replies:
    0
    Views:
    326
    Kammy
    Oct 22, 2003
  3. Gary Herron
    Replies:
    2
    Views:
    655
    Bruno Desthuilliers
    Jul 4, 2006
  4. Skip Montanaro

    Re: Build Python 2.7.5 - Modules missing

    Skip Montanaro, Jun 10, 2013, in forum: Python
    Replies:
    0
    Views:
    307
    Skip Montanaro
    Jun 10, 2013
  5. rusi
    Replies:
    0
    Views:
    85
Loading...

Share This Page