FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
plotdevice/plotdevice/gui/__init__.py at main · plotdevice/plotdevice · GitHub
plotdevice
plotdevice
Repository navigation
Code
Issues
10
(10)
Pull requests
4
(4)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
plotdevice
/
plotdevice
/
gui
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (24 loc) · 1.24 KB
Breadcrumbs
plotdevice
/
plotdevice
/
gui
/
__init__.py
Copy path
File metadata and controls
27 lines (24 loc) · 1.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
def
bundle_path
(
subpath
=
None
,
rsrc
=
None
,
fmwk
=
None
):
"""Find the path to the main NSBundle (or an optional subpath within it)"""
from
os
.
path
import
join
from
Foundation
import
NSBundle
bundle
=
NSBundle
.
mainBundle
().
bundlePath
()
if
rsrc
:
return
join
(
bundle
,
"Contents"
,
"Resources"
,
rsrc
)
if
fmwk
:
return
join
(
bundle
,
"Contents"
,
"Frameworks"
,
'%s.framework'
%
fmwk
)
if
subpath
:
return
join
(
bundle
,
subpath
)
return
bundle
from
Foundation
import
NSTimer
,
NSRunLoop
,
NSRunLoopCommonModes
def
set_timeout
(
target
,
sel
,
delay
,
info
=
None
,
repeat
=
False
):
timer
=
NSTimer
.
timerWithTimeInterval_target_selector_userInfo_repeats_
(
delay
,
target
,
sel
,
info
,
repeat
)
NSRunLoop
.
mainRunLoop
().
addTimer_forMode_
(
timer
,
NSRunLoopCommonModes
)
return
timer
def
next_tick
(
target
,
sel
):
timer
=
NSTimer
.
timerWithTimeInterval_target_selector_userInfo_repeats_
(
0
,
target
,
sel
,
None
,
False
)
NSRunLoop
.
mainRunLoop
().
addTimer_forMode_
(
timer
,
NSRunLoopCommonModes
)
from
.
document
import
PlotDeviceDocument
,
PythonScriptDocument
,
ScriptController
from
.
app
import
PlotDeviceAppDelegate
from
.
views
import
GraphicsBackdrop
,
GraphicsView
,
FullscreenView
from
.
widgets
import
StatusView
,
DashboardController
,
ExportSheet
Back
|
FazBrowse Home
|
New Git URL