Changeset c8c3208


Ignore:
Timestamp:
Jul 9, 2012 8:39:13 AM (7 years ago)
Author:
Ted Faber <faber@…>
Branches:
abac0-leak, abac0-mei, compt_changes, master, mei-id, mei-rt0-n, mei_rt0, tvf-new-xml
Children:
2579c1a
Parents:
08f776a
Message:

Command line file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/suggest/suggest.py

    r08f776a rc8c3208  
    77import Creddy
    88
    9 import os
     9import sys, os
    1010import re
    1111import copy
     
    137137        md.destroy()
    138138
    139     def __init__(self):
     139    def __init__(self, fn):
    140140        '''
    141141        Initialize all the GTK hooks for menus, put the various TreeViews up
     
    186186
    187187        self.add(vb)
     188        if fn is not None:
     189            self.read_proofs(fn)
     190            # XXX multiple proofs
     191            self.get_child().add(self.interpret_proof(self.proofs[0]))
    188192        self.show_all()
    189193   
     
    356360            pl = []
    357361            for g in sg:
     362                if g in attrs:
     363                    continue
    358364                if g.count('.') == 2:
    359365                    # linking role
    360366                    pr, rr, lr = g.split('.')
    361367                    if lr in direct_roles:
    362                         pl.append('add %s.%s to %s' % (pr, rr, direct_roles[lr]))
     368                        pl.append('add %s to %s' % (direct_roles[lr], rr))
    363369                    else:
    364370                        pl.append('someone with %s.%s must delegate %s to %s' % \
     
    390396        return vb
    391397
    392 w = window()
     398if len(sys.argv) > 1:
     399    fn = sys.argv[1]
     400else:
     401    fn = None
     402w = window(fn)
    393403gtk.main()
Note: See TracChangeset for help on using the changeset viewer.