Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

No project description provided

Project description

Sometimes when we need to reference other project’s settings to do something, we can use execfile to parse file get variable inside. But a few things can make it difficult:

  1. Dependency package(s) are not installed
  2. Relative module(s) not in sys.path
  3. Local module name confused due to scoping.

Use pylookwhat to solve these

import pylookwhat

what = {}
lookwhat = [ 'A', 'B'  ]
filename = ''
pylookwhat.lookwhat( filename, what, lookwhat  )

print what

A = { "Hello": "World" }
B = [ 1, 2, 3 ]


Modify variables in script. Backup file will be named with datetime.

python -m pylookwhat patch false


A = "Hello World"


A = "Hello World"
Fix missing text when patch with dict variables

Project details

Download files

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

Files for pylookwhat, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page