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 5969141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:11:18+00:00 2026-05-22T20:11:18+00:00

A proper header format in python is described here . Using either VIM or

  • 0

A proper header format in python is described here .

Using either VIM or a shell script, I would like to have the usual metadata (like __author__, __authors__, __contact__, __copyright__, __license__, __deprecated__, __date__ and __version__) added to the file header. SVN keywords would also be nice. Adding it to new files is the most relevant. Adding it to existing files is a bonus.

Ruslan’s Blog has a solution for Emacs. But I was unable to find a solution for Python.

Where has this been done for python without Emacs? VIM can copy text from one file to another like so , but maybe there is a nicer way.

  • 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-22T20:11:18+00:00Added an answer on May 22, 2026 at 8:11 pm

    I highly recommend the snipMate plugin. You can easily add new snips per file type, and they’re triggered by just typing a keyword and hitting tab, so for example you could just hit

    header<TAB>
    

    and all the fields would be added, and you can easily tab through any that require being filled out on a per-file basis. There is even already a snippet called docs in the built-in python snippets (vimfiles/snippets/python.snippets) that looks like it fills out similar metadata for docstrings which you could easily modify for your purposes, here it is as an example of the snip format:

    # Module Docstring
    snippet docs
        '''
        File: ${1:`Filename('$1.py', 'foo.py')`}
        Author: ${2:`g:snips_author`}
        Description: ${3}
        '''
    

    Dynamic entries are supported using backticks in your snip (Filename and g:snips_author as the default for tabbable entries 1 and 2 above). The date could be added with:

    `system("date +%Y-%m-%d")`
    

    (from the snipMate help doc).

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

Sidebar

Related Questions

How would one sign an outgoing email using PHP? The proper header I am
I'm trying to build up the proper data structure using a pseudo tcp header,
I have included the proper Header Files , Header Gard but i cannot instantiate
I'm trying to create proper header files which don't include too many other files
What is the proper technique to have ThreadA signal ThreadB of some event, without
I have a file format (.STL, stereo lithography, the structure is standard and can
Can't find proper documentation for it. It's used inside E-tag header. For what purpose?
I am interested in generating a C++ header using Apache Avro's code generation tool
I have the following in header file. namespace silc{ class pattern_token_map { /* Contents
What is the most proper way to sending email of minimal 1000 or more

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.