forked from public/pyceo
Reorganize namespace
There were too many packages with only a couple of modules in them. It took minimum four tab completes to find an interesting file. This halves that.
This commit is contained in:
parent
9a56175919
commit
b8be0f8149
4
bin/ceo
4
bin/ceo
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
import csc.apps.urwid.main
|
||||
csc.apps.urwid.main.start()
|
||||
import ceo.urwid.main
|
||||
ceo.urwid.main.start()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
ceoquery - a script to lookup member and account information
|
||||
"""
|
||||
import os, sys
|
||||
from csc.adm import members, terms
|
||||
from ceo import members, terms
|
||||
|
||||
try:
|
||||
members.connect()
|
||||
|
|
|
@ -9,8 +9,8 @@ When run from an unprivileged account, authentication will be performed
|
|||
before the account information is changed.
|
||||
"""
|
||||
import os, sys, pwd, getopt, PAM
|
||||
from csc.common.excep import InvalidArgument
|
||||
from csc.adm import accounts
|
||||
from ceo import accounts
|
||||
from ceo.excep import InvalidArgument
|
||||
|
||||
progname = os.path.basename(sys.argv[0])
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ When run from an unprivileged account, authentication will be performed
|
|||
before the shell is changed, and the new shell must be listed in /etc/shells.
|
||||
"""
|
||||
import os, sys, pwd, getopt, PAM
|
||||
from csc.common.excep import InvalidArgument
|
||||
from csc.adm import accounts
|
||||
from ceo import accounts
|
||||
from ceo.excep import InvalidArgument
|
||||
|
||||
progname = os.path.basename(sys.argv[0])
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
"""CSC Electronic Office"""
|
|
@ -10,9 +10,8 @@ Future changes to the members database that need to be atomic
|
|||
must also be moved into this module.
|
||||
"""
|
||||
import re, subprocess, ldap
|
||||
from csc.common import conf
|
||||
from csc.common.excep import InvalidArgument
|
||||
from csc.backends import ldapi
|
||||
from ceo import conf, excep, ldapi
|
||||
from ceo.excep import InvalidArgument
|
||||
|
||||
|
||||
### Configuration ###
|
|
@ -233,7 +233,7 @@ def next_unregistered(registered):
|
|||
|
||||
if __name__ == '__main__':
|
||||
|
||||
from csc.common.test import *
|
||||
from ceo.test import test, assert_equal, success
|
||||
|
||||
test(parse); assert_equal(110, parse('f2006')); success()
|
||||
test(generate); assert_equal('f2006', generate(110)); success()
|
|
@ -0,0 +1 @@
|
|||
"""Urwid User Interface"""
|
|
@ -1,10 +1,9 @@
|
|||
import urwid, pwd, grp
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
import csc.apps.urwid.search as search
|
||||
|
||||
from csc.adm import members
|
||||
from csc.common.excep import InvalidArgument
|
||||
import urwid
|
||||
from ceo import members
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid import search
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
def menu_items(items):
|
||||
return [ urwid.AttrWrap( ButtonText( cb, data, txt ), 'menu', 'selected') for (txt, cb, data) in items ]
|
|
@ -1,10 +1,8 @@
|
|||
import urwid
|
||||
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
||||
from csc.adm import members
|
||||
from csc.common.excep import InvalidArgument
|
||||
from ceo import members
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
class InfoPage(WizardPanel):
|
||||
def init_widgets(self):
|
|
@ -1,16 +1,9 @@
|
|||
import random, ldap, urwid.curses_display
|
||||
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
import csc.apps.urwid.newmember as newmember
|
||||
import csc.apps.urwid.renew as renew
|
||||
import csc.apps.urwid.info as info
|
||||
import csc.apps.urwid.search as search
|
||||
import csc.apps.urwid.positions as positions
|
||||
import csc.apps.urwid.groups as groups
|
||||
|
||||
from csc.adm import members, terms
|
||||
from csc.common.excep import InvalidArgument
|
||||
from ceo import members, terms
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
from ceo.urwid import newmember, renew, info, search, positions, groups
|
||||
|
||||
ui = urwid.curses_display.Screen()
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
import urwid
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
||||
from csc.adm import members, terms
|
||||
from csc.common.excep import InvalidArgument
|
||||
from ceo import members, terms
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
class IntroPage(WizardPanel):
|
||||
def init_widgets(self):
|
|
@ -1,9 +1,8 @@
|
|||
import urwid
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
||||
from csc.adm import members
|
||||
from csc.common.excep import InvalidArgument
|
||||
from ceo import members
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
position_data = [
|
||||
('president', 'President'),
|
|
@ -1,9 +1,7 @@
|
|||
import urwid
|
||||
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
||||
from csc.adm import members, terms
|
||||
from ceo import members, terms
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
class IntroPage(WizardPanel):
|
||||
def init_widgets(self):
|
|
@ -1,10 +1,8 @@
|
|||
import urwid
|
||||
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
||||
from csc.adm import members, terms
|
||||
from csc.common.excep import InvalidArgument
|
||||
from ceo import members, terms
|
||||
from ceo.excep import InvalidArgument
|
||||
from ceo.urwid.widgets import *
|
||||
from ceo.urwid.window import *
|
||||
|
||||
class TermPage(WizardPanel):
|
||||
def init_widgets(self):
|
|
@ -1,6 +1,6 @@
|
|||
import urwid
|
||||
from csc.apps.urwid.ldapfilter import *
|
||||
from csc.apps.urwid.window import raise_back, push_window
|
||||
from ceo.urwid.ldapfilter import *
|
||||
from ceo.urwid.window import raise_back, push_window
|
||||
|
||||
def push_wizard(name, pages, dimensions=(50, 10)):
|
||||
state = {}
|
|
@ -1,5 +0,0 @@
|
|||
"""
|
||||
Computer Science Club Python Modules
|
||||
|
||||
The csc module is a container for all CSC-specific Python modules.
|
||||
"""
|
|
@ -1,8 +0,0 @@
|
|||
"""
|
||||
CSC Administrative Modules
|
||||
|
||||
This module provides member and account management modules.
|
||||
|
||||
members - member registration management functions
|
||||
terms - helper routines for manipulating terms
|
||||
"""
|
|
@ -1,8 +0,0 @@
|
|||
"""
|
||||
Application-style User Interfaces
|
||||
|
||||
This module contains large frontends with many functions
|
||||
and fancy graphical user interfaces.
|
||||
|
||||
legacy - aims to reproduce the curses UI of the previous CEO
|
||||
"""
|
|
@ -1,3 +0,0 @@
|
|||
"""
|
||||
Urwid User Interface
|
||||
"""
|
|
@ -1,7 +0,0 @@
|
|||
"""
|
||||
Backend Modules
|
||||
|
||||
This module contains backend interfaces and related modules.
|
||||
|
||||
ldapi - LDAP interface for UNIX account attribute administration
|
||||
"""
|
|
@ -1,7 +0,0 @@
|
|||
"""
|
||||
Generally Useful Common Modules
|
||||
|
||||
conf - simple configuration file reader
|
||||
excep - generally useful exceptions
|
||||
test - test suite utility routines
|
||||
"""
|
3
setup.py
3
setup.py
|
@ -5,8 +5,7 @@ from distutils.core import setup
|
|||
setup(
|
||||
name='ceo',
|
||||
description='CSC Electronic Office',
|
||||
packages=[ 'csc', 'csc.common', 'csc.adm', 'csc.backends', 'csc.apps', 'csc.apps.urwid' ],
|
||||
package_dir = {'': 'pylib'},
|
||||
packages=[ 'ceo', 'ceo.urwid' ],
|
||||
scripts=['bin/ceo', 'bin/ceoquery', 'bin/csc-chfn', 'bin/csc-chsh'],
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue