Skip to content

Commit 8bb010e

Browse files
committed
s/task.py/console.py/
1 parent 6812c99 commit 8bb010e

6 files changed

Lines changed: 16 additions & 18 deletions

File tree

PlotDevice.xcodeproj/project.pbxproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
2A15C45618A48770006BDFF0 /* autocomplete.css in Copy web ui assets */ = {isa = PBXBuildFile; fileRef = 2A15C45418A48765006BDFF0 /* autocomplete.css */; };
2929
2A26314B188E1A3A000B792A /* doc in Resources */ = {isa = PBXBuildFile; fileRef = 2A26314A188E1A3A000B792A /* doc */; };
3030
2A294461185E54F600E9F650 /* export.py in Copy plotdevice.run */ = {isa = PBXBuildFile; fileRef = 2A294459185E539400E9F650 /* export.py */; };
31-
2A294462185E54F900E9F650 /* task.py in Copy plotdevice.run */ = {isa = PBXBuildFile; fileRef = 2A29445A185E539400E9F650 /* task.py */; };
31+
2A294462185E54F900E9F650 /* console.py in Copy plotdevice.run */ = {isa = PBXBuildFile; fileRef = 2A29445A185E539400E9F650 /* console.py */; };
3232
2A294463185E550400E9F650 /* __init__.py in Copy plotdevice.run */ = {isa = PBXBuildFile; fileRef = 2A294458185E539400E9F650 /* __init__.py */; };
3333
2A294474185E578300E9F650 /* __init__.py in Copy plotdevice.gui */ = {isa = PBXBuildFile; fileRef = 2A294464185E575F00E9F650 /* __init__.py */; };
3434
2A294477185E578300E9F650 /* document.py in Copy plotdevice.gui */ = {isa = PBXBuildFile; fileRef = 2A294467185E575F00E9F650 /* document.py */; };
@@ -125,7 +125,7 @@
125125
files = (
126126
2A294463185E550400E9F650 /* __init__.py in Copy plotdevice.run */,
127127
2AC5188118636CAF007FB066 /* sandbox.py in Copy plotdevice.run */,
128-
2A294462185E54F900E9F650 /* task.py in Copy plotdevice.run */,
128+
2A294462185E54F900E9F650 /* console.py in Copy plotdevice.run */,
129129
2A294461185E54F600E9F650 /* export.py in Copy plotdevice.run */,
130130
);
131131
name = "Copy plotdevice.run";
@@ -246,7 +246,7 @@
246246
2A26314A188E1A3A000B792A /* doc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = doc; sourceTree = "<group>"; };
247247
2A294458185E539400E9F650 /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = "<group>"; };
248248
2A294459185E539400E9F650 /* export.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = export.py; sourceTree = "<group>"; };
249-
2A29445A185E539400E9F650 /* task.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = task.py; sourceTree = "<group>"; };
249+
2A29445A185E539400E9F650 /* console.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = console.py; sourceTree = "<group>"; };
250250
2A294464185E575F00E9F650 /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = "<group>"; };
251251
2A294467185E575F00E9F650 /* document.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = document.py; sourceTree = "<group>"; };
252252
2A294468185E575F00E9F650 /* preferences.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = preferences.py; sourceTree = "<group>"; };
@@ -290,7 +290,6 @@
290290
2AD0A9B6186E552700D1F6DE /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/PlotDeviceScript.xib; sourceTree = "<group>"; };
291291
2AE5AD291862366300CCDD45 /* editor.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = editor.py; sourceTree = "<group>"; };
292292
2AE5AD2C1862386400CCDD45 /* widgets.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = widgets.py; sourceTree = "<group>"; };
293-
2AE5AD7E186249E100CCDD45 /* listener.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = listener.py; sourceTree = "<group>"; };
294293
2AEE843A18B3285600CF91D4 /* foundry.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = foundry.py; sourceTree = "<group>"; };
295294
2AEE843D18B5603900CF91D4 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
296295
2AEE846318BEC25B00CF91D4 /* iglob.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = iglob.py; sourceTree = "<group>"; };
@@ -378,8 +377,7 @@
378377
2A294458185E539400E9F650 /* __init__.py */,
379378
2AC5187F18636C9F007FB066 /* sandbox.py */,
380379
2A294459185E539400E9F650 /* export.py */,
381-
2A29445A185E539400E9F650 /* task.py */,
382-
2AE5AD7E186249E100CCDD45 /* listener.py */,
380+
2A29445A185E539400E9F650 /* console.py */,
383381
);
384382
path = run;
385383
sourceTree = "<group>";

etc/plotdevice

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,25 +144,25 @@ def module_path():
144144
raise ImportError
145145

146146
def invocation():
147-
"""Find the path of task.py within the plotdevice module and update PYTHONPATH if needed"""
147+
"""Find the path of console.py within the plotdevice module and update PYTHONPATH if needed"""
148148
script_path = None
149149
py_path = filter(None, os.getenv('PYTHONPATH','').split(':')) # BUG: should it be unfiltered?
150150

151151
try:
152152
# running from a virtualenv
153153
module = module_path()
154-
script_path = join(module, 'run/task.py')
154+
script_path = join(module, 'run/console.py')
155155
py_path.append(dirname(module)) # append the site-packages dir
156156
except ImportError:
157157
if app_path():
158158
# running from the app bundle
159159
dist_path = join(app_path(), 'Contents/Resources/python')
160-
script_path = join(dist_path, 'plotdevice/run/task.py')
160+
script_path = join(dist_path, 'plotdevice/run/console.py')
161161
py_path.append(dist_path) # append the site-packages dir
162162
else:
163163
# running from the source dist
164164
dist_path = abspath('%s/..'%dirname(__file__))
165-
script_path = "%s/plotdevice/run/task.py"%dist_path
165+
script_path = "%s/plotdevice/run/console.py"%dist_path
166166
py_path.append(dist_path) # add the plotdevice dir to the path
167167
py_path.append('%s/build/lib.macosx-10.9-intel-2.7'%dist_path) # add the .so files
168168

plotdevice/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ def get_version():
77
class DeviceError(Exception):
88
pass
99

10-
# note whether the module is being used within the .app, via task.py, or from the repl
10+
# note whether the module is being used within the .app, via console.py, or from the repl
1111
import sys, re
1212
called_from = getattr(sys.modules['__main__'], '__file__', '<interactive>')
13-
is_windowed = bool(re.search(r'plotdevice(-app|/run/task)\.py$', called_from))
13+
is_windowed = bool(re.search(r'plotdevice(-app|/run/console)\.py$', called_from))
1414
app = bool(called_from=='plotdevice-app.py') if is_windowed else None
1515

1616
# add the Extras directory to sys.path since every module depends on PyObjC and friends

plotdevice/gui/document.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def awakeFromNib(self):
186186
win.contentView().superview().addSubview_(self.statusView)
187187
self.statusView.setFrame_( ((frame.size.width-24,frame.size.height-22), (22,22)) )
188188

189-
# sign up for autoresume on quit-and-relaunch (but only if this isn't task.py)
189+
# sign up for autoresume on quit-and-relaunch (but only if this isn't console.py)
190190
if self.editorView:
191191
win.setRestorable_(True)
192192

@@ -196,7 +196,7 @@ def awakeFromNib(self):
196196
## WindowController duties
197197

198198
def windowDidLoad(self):
199-
# the editor might not exist if we're being opened in task.py
199+
# the editor might not exist if we're being opened in console.py
200200
if self.editorView:
201201
# pass the editor a reference to the undomanager so it can sync up with the
202202
# menus and the file's dirty-state
@@ -507,7 +507,7 @@ def exportProgress(self, written, total, cancelled):
507507
"""Update the progress meter in the StatusView (invoked by self.vm.session)"""
508508

509509
# everything in this method talks to gui objects.
510-
# if we're running in task.py, there's nothing to do
510+
# if we're running in console.py, there's nothing to do
511511
if not self.window():
512512
return
513513

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python
22
# encoding: utf-8
33
"""
4-
task.py
4+
console.py
55
6-
Simple renderer for command line scripts when run from the module rather than an app bundle.
6+
Simple renderer for `.pv' scripts when run from the console rather than in-app.
77
88
This is the back-end of the `plotdevice` command line script in the 'etc' subdir of the source
99
distribution (or the bin directory of your virtualenv once installed). It expects the parsed args

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def run(self):
252252
self.copy_file("%s/etc/plotdevice"%TOP, BIN)
253253

254254
# put the module and .so files in a known location (primarily so the
255-
# tool can find task.py)
255+
# tool can find console.py)
256256
self.copy_tree('%s/plotdevice'%TOP, '%s/python/plotdevice'%RSRC)
257257
# self.copy_tree('%s/lib/python2.7/lib-dynload'%RSRC, '%s/python/plotdevice/ext'%RSRC)
258258
self.spawn(['/usr/bin/ditto', '%s/build/ext'%TOP, '%s/python/plotdevice/lib'%RSRC])

0 commit comments

Comments
 (0)