Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree
// Show stack and dereferenced values using Graphviz (DOT) | |
// (c) Victor Dorneanu | |
digraph G { | |
// Define layout | |
graph [pad=".75", ranksep="0.95", nodesep="0.05"]; | |
rankdir=LR; | |
node [shape="record"]; | |
rank=same; |
package main | |
import ( | |
"flag" | |
"fmt" | |
"html/template" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" |
# Make sure you authorize your access token to be used with SAML | |
# https://help.github.com/articles/authorizing-a-personal-access-token-for-use-with-a-saml-single-sign-on-organization/ | |
# | |
# Run: | |
# python list_all_repos.py <org> | |
import github3 | |
import os | |
GITHUB_ACCESS_TOKEN = os.environ["GITHUB_ACCESS_TOKEN"] |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
""" Simple demo of using multiprocessing when parsing files """ | |
import sys | |
import os | |
import codecs | |
from multiprocessing import Pool, Process, Queue, cpu_count |
Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).
This is my solution:
$ tree