Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!
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
Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (6.1 kB) Copy SHA256 Checksum SHA256 Source Aug 21, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting