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

  • Home
  • SEARCH
  • 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 6123067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:58:20+00:00 2026-05-23T15:58:20+00:00

I want to put all the parameters of my code in a parameter file

  • 0

I want to put all the parameters of my code in a parameter file (parms.py), so that everything I may need to tweak later will be at the same place. What would be the best way to import just the parameters I want, to save some work?

I was thinking of grouping my parameters in dictionaries; is that the Pythonic way? I think the code will look funny, using the parameters like: parms_dict('parameter1')

from parms.py import * # import lots of useless parameters (should I worry about that?)

or

from parms.py import parameter1, parameter2, parameter3, parameter4, parameter5, parameter6, parameter7 # That way can get very long and ugly (should I worry about that?)

Any better suggestions/comments?

  • 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-23T15:58:21+00:00Added an answer on May 23, 2026 at 3:58 pm

    Just import the module and access the parameters you want using their fully-qualiifed names:

    import parms
    
    parms.foo
    parms.bar
    parms.baz
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often have call hierarchies in that all methods need the same parameters. If
I want to put all the requirements of a repoze Zope2 install in a
I have information spread out across a few databases and want to put all
We have multiple vb projects.We want to put error handlers in all functions, and
I want to find all img tags in a string of text and put
I have a page layout for my MOSS '07 site that I want put
I've put all of my user-authentication code in one place, namely lib/auth.rb. It looks
I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
I want to execute some code right before the layout is rendered, after all
can i somehow find all functions/macros that take a specific type of parameter ?

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.