Metadata-Version: 1.1
Name: replace_me
Version: 0.1.2
Summary: Modify your own source code with this piece of Python black magic
Home-page: https://github.com/boppreh/replace_me
Author: BoppreH
Author-email: boppreh@gmail.com
License: MIT
Description: replace\_me

        ===========

        

        Description

        -----------

        

        Modify your own source code with this piece of Python black magic.

        

        When a piece of code calls ``replace_me(value)``, that line will be

        replaced with the given ``value``. If you want to insert a comment and

        keep the line that inserted it, use ``insert_comment(value)``.

        

        **ATTENTION**: Calling these functions will modify your source code.

        Keep backups.

        

        Example

        -------

        

        \`\`\` from replace\_me import replace\_me, insert\_comment

        

        If you run this program, this source code will change.

        ======================================================

        

        These two lines will become the same:

        =====================================

        

        Hello World

        ===========

        

        replace\_me("Hello World", as\_comment=True)

        

        Code generation. Creates a hard coded list of 100 numbers.

        ==========================================================

        

        replace\_me('numbers = ' + str(list(range(100))))

        

        import random # The next comment will be replaced with a random number.

        insert\_comment(random.randint(1, 10)) # ??

        

        Pseudo-quine, replaces the line with itself.

        ============================================

        

        quine = 'replace\_me(quine)' replace\_me(quine)

        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
