|
Revision 2549, 1.2 kB
(checked in by fperez, 3 years ago)
|
API cleanup and name changes.
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
import os |
|---|
| 3 |
|
|---|
| 4 |
import tctst; reload(tctst) |
|---|
| 5 |
from tctst import * |
|---|
| 6 |
|
|---|
| 7 |
import mplconfig; reload(mplconfig) |
|---|
| 8 |
from mplconfig import MPLConfig |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
mconf = 'mplrc.conf' |
|---|
| 12 |
mplconf = TConfigManager(MPLConfig, mconf, filePriority=True) |
|---|
| 13 |
mplconf.tconf.backend.use = 'Qt4Agg' |
|---|
| 14 |
mplconf.write() |
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
if 0: |
|---|
| 18 |
mplrc = mplconf.tconf |
|---|
| 19 |
mplrc.nonsense = 1 |
|---|
| 20 |
print mplrc |
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
mpc = MPLConfig() |
|---|
| 25 |
print repr(mpc) |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
tconf2File(mpc,'mplrc_default.conf',force=True) |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
os.system('cp mplrc2.conf mplrc2_copy.conf') |
|---|
| 33 |
|
|---|
| 34 |
mconf2 = 'mplrc2_copy.conf' |
|---|
| 35 |
mplconf2 = TConfigManager(MPLConfig,mconf2) |
|---|
| 36 |
|
|---|
| 37 |
print '-'*80 |
|---|
| 38 |
print 'You can modify the object mplconf2.tconf interactively either' |
|---|
| 39 |
print 'at the command line, or if you started ipython with -wthread support,' |
|---|
| 40 |
print 'by typing:' |
|---|
| 41 |
print 'mplconf2.tconf.edit_traits()' |
|---|
| 42 |
print 'When finshed, you can save the object to disk via' |
|---|
| 43 |
print 'mplconf2.write()' |
|---|
| 44 |
print 'The file it writes is:',mconf2 |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|