Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6082509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:17:51+00:00 2026-05-23T11:17:51+00:00

So, the following is an example. Here’s a module (called feedy.py) in let’s say,

  • 0

So, the following is an example. Here’s a module (called feedy.py) in let’s say, the core directory:

import feedparser

feed = feedparser.parse("http://site.com/feed")
[...]

A bad example, but anyway: my problem is in the main script (parent dir), I have to do

import feedparser

as well as

from core import feedy

However, is there a way to eliminate the need to import feedparser, since it’s already imported in feedy.py?

Hope you understand,
Fike.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:17:51+00:00Added an answer on May 23, 2026 at 11:17 am

    In principle, yes. However, it’s not usually a good idea.

    When you import a module, you effectively declare a local variable which is a reference to that module. So in feedy you have an object called feedparser, which happens to be the module feedparser, although you could at any time reassign it to be any other Python object.

    When you import feedy, you can refer to any of feedy‘s exported variables as feedy.name. So in this case, feedy.feedparser is the module feedparser.

    However, if you change the way feedy is implemented, so that it doesn’t import (or export) feedparser, this will break your main script. In general you don’t want to export everything you have defined, although it’s fine for a quick hack.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me use the following example to explain my question: public string ExampleFunction(string Variable)
In the following example should I expect that values.size() will be called every time
I am trying to load a bitmap into the canvas following the example here.
I have the following code (which largely follows the first example here: http://www.boost.org/doc/libs/1_42_0/libs/multi_index/doc/examples.html )).
I am curious about a scenario set up like the following example: Here is
I saw the following example disccussed here previously, where the goal was to return
I'm following the example here of binding a MenuItem to a data object. <Menu
I'm following the example code here: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/output-example_8c-source.html My code is as follows: fmt =
Consider the following example: ( live demo here ) HTML: <label>Name</label> CSS: label {
Following the example here On deploying a sample resource using the Grizzly container. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.