Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Standalone Package Generator

Project Description
AdHoc Standalone Python Script Generator
########################################

The *AdHoc* compiler can be used as a program (see `Script Usage`_)
as well as a module (see :class:`adhoc.AdHoc`).

Since the *AdHoc* compiler itself is installed as a compiled *AdHoc*
script, it serves as its own usage example.

After installation of the *adhoc.py* script, the full source can be
obtained in directory ``__adhoc__``, by executing::

adhoc.py --explode

Purpose
=======

*AdHoc* provides python scripts with

- template facilities
- default file generation
- standalone module inclusion

*AdHoc* has been designed to provide an implode/explode cycle:

======== ======= ========= ======= =========
source_0 xsource_0
source_1 implode explode xsource_1
... ------> script.py ------> ...
source_n xsource_n
======== ======= ========= ======= =========

where ``xsource_i === source_i``. I.e., ``diff source_i xsource_i``
does not produce any output.

Quickstart
==========

module.py:

# -*- coding: utf-8 -*-
mvar = 'value'

script.py:

# -*- coding: utf-8 -*-
# @:adhoc_run_time:@
import module # @:adhoc:@
print('mvar: ' + module.mvar)

Compilation::

adhoc.py --compile script.py >/tmp/script-compiled.py

Execution outside source directory::

cd /tmp && python script-compiled.py

shows::

mvar: value

Decompilation::

cd /tmp && \
mkdir -p __adhoc__ && \
adhoc.py --decompile <script-compiled.py >__adhoc__/script.py
Release History

Release History

This version
History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.0

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

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
AdHoc-0.3.2.tar.gz (118.8 kB) Copy SHA256 Checksum SHA256 Source Aug 24, 2013

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