PyPrototype

version:0.0.2
published:March 29, 2016

Overview

PyPrototype is a model layout for a Python project in a GitHub repository. It is planned that the project will be made available through the Python Packaging Index (PyPI) and the documentation published at ReadTheDocs.org.

To build your own Python project using this project as a template, see the section How to use PyPrototype.

Contents:

README: PyPrototype

prototype repository of a Python project

author:Pete R. Jemian
email:jemian@anl.gov
copyright:2005-2016, UChicago Argonne, LLC
license:ANL OPEN SOURCE LICENSE (see LICENSE)
docs:http://PyPrototype.readthedocs.org
git:https://github.com/prjemian/PyPrototype.git
PyPI:https://pypi.python.org/pypi/PyPrototype
TODO list:https://github.com/prjemian/PyPrototype/issues

How to use PyPrototype

-tba-

How to Install PyPrototype

The basic installation procedure:

  1. install Python 2.7
  2. install PyPrototype

Background

This program requires Python 2.7 (not ready for Python 3 yet) and several additional packages. Most of the package dependencies are met by using a Python distribution (provides Python, the basic package suite, and other popular packages).

The major package requirements are:

  • PyQt4 : provides the graphical user interface widgets

Python

It is suggested to use the Anaconda Python 2.7 distribution [1] as it contains most of the packages used by this program.

  1. use a web browser and visit: https://www.continuum.io/downloads
  2. select the distribution for your operating system
  3. make sure to follow links for Python 2.7
  4. download the installer file
  5. follow the instructions to install on your computer
[1]Anaconda Python 2.7: https://www.continuum.io

PyPrototype

Install this program from the Python Package Index (PyPI) using the pip command:

pip install pyRestTable
pip install --no-deps PyPrototype

The --no-deps option tells pip not to download and attempt to build newer versions of other required packages such as lxml.

It may be necessary to install the lxml package if your distribution does not already have it installed. You can view all the installed packages using this command:

pip list

The list may have dozens or more items. To install lxml:

pip install lxml
Updating PyPrototype

To update to a newer version of PyPrototype, use this command:

pip install -U --no-deps PyPrototype

The -U option tells pip to search for and install the latest package update.

Alternative Installation steps

It is possible to install PyPrototype using steps common to Python developers, such as:

pip install https://github.com/prjemian/PyPrototype

or:

git clone install https://github.com/prjemian/PyPrototype.git
cd pyprototype
python ./setup.py install

Working from a GitHub clone is not recommended for regular use.

module: main

Main code runs the command-line program.

usage:

python main.py [input_file]
PyPrototype.main.main()[source]

start the program

PyPrototype.main.process_command_line()[source]

support command-line options such as `--help` and `--version`

module: main_gui

main_gui.Main code runs the GUI.

usage:

python main_gui.py [input_file]
class PyPrototype.main_gui.MyGui(message, filename)[source]

Bases: PyPrototype.mock_PyQt4.QtGui.QWidget

Creates a Qt widget in a window

PyPrototype.main_gui.main()[source]

start the program

PyPrototype.main_gui.process_command_line()[source]

support command-line options such as `--help` and `--version`

History of Source Code Changes

0.0.2:initial setup
0.0.1:concept verbalized

Source Code License

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Copyright (c) 2011-2016, UChicago Argonne, LLC

All Rights Reserved

PyPrototype

Advanced Photon Source, Argonne National Laboratory


OPEN SOURCE LICENSE

Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, 
   this list of conditions and the following disclaimer.  Software changes, 
   modifications, or derivative works, should be noted with comments and 
   the author and organization's name.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation 
   and/or other materials provided with the distribution.

3. Neither the names of UChicago Argonne, LLC or the Department of Energy 
   nor the names of its contributors may be used to endorse or promote 
   products derived from this software without specific prior written 
   permission.

4. The software and the end-user documentation included with the 
   redistribution, if any, must include the following acknowledgment:

   "This product includes software produced by UChicago Argonne, LLC 
   under Contract No. DE-AC02-06CH11357 with the Department of Energy."

****************************************************************************

DISCLAIMER

THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND.

Neither the United States GOVERNMENT, nor the United States Department 
of Energy, NOR UChicago Argonne, LLC, nor any of their employees, makes 
any warranty, express or implied, or assumes any legal liability or 
responsibility for the accuracy, completeness, or usefulness of any 
information, data, apparatus, product, or process disclosed, or 
represents that its use would not infringe privately owned rights.

****************************************************************************

Indices and tables