Re: Import redirects

Discussion in 'Python' started by Mark Lawrence, Feb 11, 2013.

  1. On 11/02/2013 06:50, Isaac To wrote:
    > I have a package (say "foo") that I want to rename (say, to "bar"), and
    > for compatibility reasons I want to be able to use the old package name
    > to refer to the new package.


    My apologies for the over engineering, but this is the best I could come
    up with.

    import bar as foo

    --
    Cheers.

    Mark Lawrence
    Mark Lawrence, Feb 11, 2013
    #1
    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. Mark
    Replies:
    0
    Views:
    304
  2. Isaac To

    Import redirects

    Isaac To, Feb 11, 2013, in forum: Python
    Replies:
    0
    Views:
    112
    Isaac To
    Feb 11, 2013
  3. Chris Angelico

    Re: Import redirects

    Chris Angelico, Feb 11, 2013, in forum: Python
    Replies:
    0
    Views:
    101
    Chris Angelico
    Feb 11, 2013
  4. Oscar Benjamin

    Re: Import redirects

    Oscar Benjamin, Feb 11, 2013, in forum: Python
    Replies:
    0
    Views:
    122
    Oscar Benjamin
    Feb 11, 2013
  5. Isaac To

    Re: Import redirects

    Isaac To, Feb 12, 2013, in forum: Python
    Replies:
    0
    Views:
    88
    Isaac To
    Feb 12, 2013
Loading...

Share This Page