Pyrfecter logo Pyrfecter

Python linter, formatter, and modernizer to make your code positively perfect!

Input
# Drop Python file(s) here

Output

Linting & Analysis

🧑‍💻 Learning Python? Check out these great resources:

Cover image for Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming by Eric MatthesCover image for Automate the Boring Stuff with Python, 3rd Edition, by Al SweigartCover image for Think Python: How to Think Like a Computer Scientist, 3rd Edition, by Allen Downey

Combine multiple Python files into one

Combining two or more Python files into one is easy with Pyrfecter. Simply drag-and-drop Python files anywhere in this window and Pyrfecter will combine them into a single file. Then, with the click of a button, your new file will be fully linted, formatted, organized, and modernized.

Features

Limitations

The combined files may need to be tidied a little to remove duplicate variables.

For example, if we have two files named say_hi.py and say_bye.py:

# say_hi.py
import logging

logger = logging.getLogger(__name__)

def say_hi(name):
    logger.debug("Saying hi")
    print(f"Hi, {name}!")
# say_bye.py
import logging

logger = logging.getLogger(__name__)

def say_bye(name):
    logger.debug("Saying bye")
    print(f"Bye, {name}!")

The logger variable will appear twice in the output:

import logging

logger = logging.getLogger(__name__)


def say_bye(name):
    logger.debug("Saying bye")
    print(f"Bye, {name}!")


logger = logging.getLogger(__name__)


def say_hi(name):
    logger.debug("Saying hi")
    print(f"Hi, {name}!")