Skip to main content

Combine that all your python files in your project sequential into one by the relationship of import statement.

Project description

The logic of PyCombiner

parser files to get 3 Parts of each .py file

  • import … sentence

  • from … import sentence

  • Remaining lines of code to be imported.

image0

How it deals with import

statements summarize introduce of it simply, It is render “import …” to [“import … “, “codeLines”] There are some instances:

# 1. local module totally
# TODO: dont know that How process it
import utils
res1 = []

# 2. lib module
# just keep the import statement
import os
res2 = [['import os'], []]

# 3.  local module totally import
from service import *  #
res3 = [[], ['def ...', '...', 'def ...', '...']]

# 4.1 local module partially import
# TODO: cant process it
from echo import showWelcome
res4 = [[], ['def showWelcome():', '...']]
# 4.2 partially import but use other function
from src import showRests

TODO

  • Can’t process the “as …” statements

from src import showString as s

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyCombiner-0.0.2.tar.gz (6.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page