id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
171,864 | import win32api
import win32ui
def SaveDebuggerOptions(opts):
for key, val in opts.items():
win32ui.WriteProfileVal("Debugger Options", key, val) | null |
171,865 | import bdb
import os
import pdb
import string
import sys
import traceback
import types
import commctrl
import pywin.docking.DockingBar
import win32api
import win32con
import win32ui
from pywin.framework import app, editor, interact, scriptutils
from pywin.framework.editor.color.coloreditor import MARKER_BREAKPOINT, MAR... | null |
171,866 | import bdb
import os
import pdb
import string
import sys
import traceback
import types
import commctrl
import pywin.docking.DockingBar
import win32api
import win32con
import win32ui
from pywin.framework import app, editor, interact, scriptutils
from pywin.framework.editor.color.coloreditor import MARKER_BREAKPOINT, MAR... | null |
171,867 | import bdb
import os
import pdb
import string
import sys
import traceback
import types
import commctrl
import pywin.docking.DockingBar
import win32api
import win32con
import win32ui
from pywin.framework import app, editor, interact, scriptutils
from pywin.framework.editor.color.coloreditor import MARKER_BREAKPOINT, MAR... | null |
171,868 | import sys
import time
import pywin.debugger
def b():
b = 1
pywin.debugger.set_trace()
# After importing or running this module, you are likely to be
# sitting at the next line. This is because we explicitely
# broke into the debugger using the "set_trace() function
# "pywin.debugger.brk()" is ... | null |
171,869 | import threading
import time
import win32api
import win32con
import win32ui
from pywin.mfc import dialog
from pywin.mfc.thread import WinThread
def MakeProgressDlgTemplate(caption, staticText=""):
style = (
win32con.DS_MODALFRAME
| win32con.WS_POPUP
| win32con.WS_VISIBLE
| win32con.... | null |
171,870 | import threading
import time
import win32api
import win32con
import win32ui
from pywin.mfc import dialog
from pywin.mfc.thread import WinThread
def StatusProgressDialog(title, msg="", maxticks=100, parent=None):
def demo():
d = StatusProgressDialog("A Demo", "Doing something...")
import win32api
for i in ... | null |
171,871 | import threading
import time
import win32api
import win32con
import win32ui
from pywin.mfc import dialog
from pywin.mfc.thread import WinThread
def ThreadedStatusProgressDialog(title, msg="", maxticks=100):
t = ProgressThread(title, msg, maxticks)
t.CreateThread()
# Need to run a basic "PumpWaitingMessages"... | null |
171,872 | import win32api
import win32con
import win32ui
from pywin.mfc import dialog
def MakeLoginDlgTemplate(title):
style = (
win32con.DS_MODALFRAME
| win32con.WS_POPUP
| win32con.WS_VISIBLE
| win32con.WS_CAPTION
| win32con.WS_SYSMENU
| win32con.DS_SETFONT
)
cs = wi... | null |
171,873 | import win32api
import win32con
import win32ui
from pywin.mfc import dialog
def MakePasswordDlgTemplate(title):
style = (
win32con.DS_MODALFRAME
| win32con.WS_POPUP
| win32con.WS_VISIBLE
| win32con.WS_CAPTION
| win32con.WS_SYSMENU
| win32con.DS_SETFONT
)
cs =... | null |
171,874 | import win32api
import win32con
import win32ui
from pywin.mfc import dialog
class LoginDlg(dialog.Dialog):
def __init__(self, title):
def GetLogin(title="Login", userid="", password=""):
d = LoginDlg(title)
d["userid"] = userid
d["password"] = password
if d.DoModal() != win32con.IDOK:
retu... | null |
171,875 | import win32api
import win32con
import win32ui
from pywin.mfc import dialog
class PasswordDlg(dialog.Dialog):
def __init__(self, title):
dialog.Dialog.__init__(self, MakePasswordDlgTemplate(title))
self.AddDDX(win32ui.IDC_EDIT1, "password")
def GetPassword(title="Password", password=""):
d = Pa... | null |
171,876 | import commctrl
import win32api
import win32con
import win32ui
from pywin.mfc import dialog
class ListDialog(dialog.Dialog):
def __init__(self, title, list):
def _maketemplate(self, title):
def FillList(self):
def OnListClick(self, id, code):
def OnListItemChange(self, std, extra):
def OnI... | null |
171,877 | import inspect
import string
import sys
import traceback
def _find_constructor(class_ob):
# Given a class object, return a function object used for the
# constructor (ie, __init__() ) or None if we can't find one.
try:
return class_ob.__init__
except AttributeError:
for base in class_ob.... | null |
171,878 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t1` function. Write a Python function `def t1()` to solve the following problem:
()
Here is the function:
def t1():
"()" | () |
171,879 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t2` function. Write a Python function `def t2(a, b=None)` to solve the following problem:
(a, b=None)
Here is the function:
def t2(a, b=None):
"(a, b=None)" | (a, b=None) |
171,880 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t3` function. Write a Python function `def t3(a, *args)` to solve the following problem:
(a, *args)
Here is the function:
def t3(a, *args):
"(a, *args)" | (a, *args) |
171,881 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t4` function. Write a Python function `def t4(*args)` to solve the following problem:
(*args)
Here is the function:
def t4(*args):
"(*args)" | (*args) |
171,882 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t5` function. Write a Python function `def t5(a, *args)` to solve the following problem:
(a, *args)
Here is the function:
def t5(a, *args):
"(a, *args)" | (a, *args) |
171,883 | import inspect
import string
import sys
import traceback
The provided code snippet includes necessary dependencies for implementing the `t6` function. Write a Python function `def t6(a, b=None, *args, **kw)` to solve the following problem:
(a, b=None, *args, **kw)
Here is the function:
def t6(a, b=None, *args, **kw)... | (a, b=None, *args, **kw) |
171,884 | import re
def is_all_white(line):
return re.match(r"^\s*$", line) is not None
def get_comment_header(line):
m = re.match(r"^(\s*#*)", line)
if m is None:
return ""
return m.group(1)
def find_paragraph(text, mark):
lineno, col = list(map(int, mark.split(".")))
line = text.get("%d.0" % li... | null |
171,885 | import re
def is_all_white(line):
return re.match(r"^\s*$", line) is not None
def get_indent(line):
return re.match(r"^(\s*)", line).group()
def reformat_paragraph(data, limit=70):
lines = data.split("\n")
i = 0
n = len(lines)
while i < n and is_all_white(lines[i]):
i = i + 1
if i >... | null |
171,886 | import sys
import tokenize
from pywin import default_scintilla_encoding
from . import PyParse
def index2line(index):
return int(float(index)) | null |
171,887 | import sys
import tokenize
from pywin import default_scintilla_encoding
from . import PyParse
def classifyws(s, tabwidth):
raw = effective = 0
for ch in s:
if ch == " ":
raw = raw + 1
effective = effective + 1
elif ch == "\t":
raw = raw + 1
effect... | null |
171,888 | import re
import string
import sys
def dump(*stuff):
sys.__stdout__.write(" ".join(map(str, stuff)) + "\n") | null |
171,889 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
class TextError(Exception):
def GetIDLEModule(module):
try:
# First get it from Pythonwin it is exists.
modname = "pywin.idle." + module
... | null |
171,890 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
default_scintilla_encoding = "utf-8"
def fast_readline(self):
if self.finished:
val = ""
else:
if "_scint_lines" not in self.__dict__... | null |
171,891 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
def TkOffsetToIndex(offset, edit):
lineoff = 0
# May be 1 > actual end if we pretended there was a trailing '\n'
offset = min(offset, edit.GetText... | null |
171,892 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
def TkIndexToOffset(bm, edit, marks):
base, nextTokPos = _NextTok(bm, 0)
if base is None:
raise ValueError("Empty bookmark ID!")
if base.fi... | null |
171,893 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
def TestGet(fr, to, t, expected):
got = t.get(fr, to)
if got != expected:
print(
"ERROR: get(%s, %s) expected %s, but got %s"
... | null |
171,894 | import string
import sys
import win32api
import win32con
import win32ui
from pywin import default_scintilla_encoding
from pywin.mfc.dialog import GetSimpleInput
class TextError(Exception): # When a TclError would normally be raised.
pass
class TkText:
def __init__(self, edit):
self.calltips = None
... | null |
171,895 | import afxres
import win32api
import win32con
import win32ui
from pywin.framework import scriptutils
from pywin.mfc import dialog
def _ShowDialog(dlgClass):
global curDialog
if curDialog is not None:
if curDialog.__class__ != dlgClass:
curDialog.DestroyWindow()
curDialog = None
... | null |
171,896 | import afxres
import win32api
import win32con
import win32ui
from pywin.framework import scriptutils
from pywin.mfc import dialog
FOUND_NOTHING = 0
lastSearch = defaultSearch = SearchParams()
def FindNext():
params = SearchParams(lastSearch)
params.sel = (-1, -1)
if not params.findText:
ShowFindDial... | null |
171,897 | import array
import os
import re
import string
import struct
import sys
import __main__
import afxres
import win32con
import win32ui
from pywin.mfc import dialog, docview
from . import IDLEenvironment
from . import bindings, control, keycodes, scintillacon
_event_commands = [
# File menu
"win32ui.ID_FILE_LOCA... | null |
171,898 | import array
import os
import re
import string
import struct
import sys
import __main__
import afxres
import win32con
import win32ui
from pywin.mfc import dialog, docview
from . import IDLEenvironment
from . import bindings, control, keycodes, scintillacon
def DoBraceMatch(control):
curPos = control.SCIGetCurren... | null |
171,899 | import array
import os
import re
import string
import struct
import sys
import __main__
import afxres
import win32con
import win32ui
from pywin.mfc import dialog, docview
from . import IDLEenvironment
from . import bindings, control, keycodes, scintillacon
def _get_class_attributes(ob):
# Recurse into base class... | null |
171,900 | import array
import os
import re
import string
import struct
import sys
import __main__
import afxres
import win32con
import win32ui
from pywin.mfc import dialog, docview
from . import IDLEenvironment
from . import bindings, control, keycodes, scintillacon
configManager = None
class ConfigManager:
def __init__(s... | null |
171,901 | import glob
import importlib.util
import marshal
import os
import stat
import sys
import traceback
import types
import pywin
import win32api
from . import keycodes
def trace(*args):
sys.stderr.write(" ".join(map(str, args)) + "\n") | null |
171,902 | import glob
import importlib.util
import marshal
import os
import stat
import sys
import traceback
import types
import pywin
import win32api
from . import keycodes
def split_line(line, lineno):
comment_pos = line.find("#")
if comment_pos >= 0:
line = line[:comment_pos]
sep_pos = line.rfind("=")
... | null |
171,903 | import glob
import importlib.util
import marshal
import os
import stat
import sys
import traceback
import types
import pywin
import win32api
from . import keycodes
def get_section_header(line):
# Returns the section if the line is a section header, else None
if line[0] == "[":
end = line.find("]")
... | null |
171,904 | import glob
import importlib.util
import marshal
import os
import stat
import sys
import traceback
import types
import pywin
import win32api
from . import keycodes
def find_config_file(f):
return os.path.join(pywin.__path__[0], f + ".cfg") | null |
171,905 | import glob
import importlib.util
import marshal
import os
import stat
import sys
import traceback
import types
import pywin
import win32api
from . import keycodes
def find_config_files():
return [
os.path.split(x)[1]
for x in [
os.path.splitext(x)[0]
for x in glob.glob(os.p... | null |
171,906 | import traceback
import win32api
import win32con
import win32ui
from . import IDLEenvironment, keycodes
next_id = 5000
event_to_commands = {}
command_to_events = {}
def assign_command_id(event, id=0):
global next_id
if id == 0:
id = event_to_commands.get(event, 0)
if id == 0:
id = ... | null |
171,907 | import win32api
import win32con
import win32ui
key_name_to_vk = {}
key_code_to_name = {}
_better_names = {
"escape": "esc",
"return": "enter",
"back": "pgup",
"next": "pgdn",
}
def _fillvkmap():
# Pull the VK_names from win32con
names = [entry for entry in win32con.__dict__ if entry.startswith(... | null |
171,908 | import win32api
import win32con
import win32ui
def _psc(char):
def test1():
for ch in """aA0/?[{}];:'"`~_-+=\\|,<.>/?""":
_psc(ch)
for code in ["Home", "End", "Left", "Right", "Up", "Down", "Menu", "Next"]:
_psc(code) | null |
171,909 | import win32api
import win32con
import win32ui
def _pkn(n):
vk, flags = parse_key_name(n)
print("%s -> %s,%s -> %s" % (n, vk, flags, make_key_name(vk, flags)))
def test2():
_pkn("ctrl+alt-shift+x")
_pkn("ctrl-home")
_pkn("Shift-+")
_pkn("Shift--")
_pkn("Shift+-")
_pkn("Shift++")
_pk... | null |
171,910 |
def HandleToUlong(h):
return HandleToULong(h) | null |
171,911 |
def UlongToHandle(ul):
return ULongToHandle(ul) | null |
171,912 |
def UlongToPtr(ul):
return ULongToPtr(ul) | null |
171,913 |
def UintToPtr(ui):
return UIntToPtr(ui) | null |
171,914 | import array
import string
import win32api
import win32con
import win32ui
from . import scintillacon
from win32con import CLR_INVALID
from keyword import iskeyword, kwlist
def trace(*args):
win32trace.write(" ".join(map(str, args)) + "\n") | null |
171,915 | import _thread
import sys
import traceback
import win32api
from pywin.framework import winout
def Test():
num = 1
while num < 1000:
print("Hello there no " + str(num))
win32api.Sleep(50)
num = num + 1 | null |
171,916 | import _thread
import sys
import traceback
import win32api
from pywin.framework import winout
class flags:
def ServerThread(myout, cmd, title, bCloseOnEnd):
def StartServer(cmd, title=None, bCloseOnEnd=0, serverFlags=flags.SERVER_BEST):
out = winout.WindowOutput(title, None, winout.flags.WQ_IDLE)
if not title:... | null |
171,917 | import commctrl
import fontdemo
import win32ui
from pywin.mfc import docview, window
class SampleTemplate(docview.DocTemplate):
def __init__(self):
docview.DocTemplate.__init__(
self, win32ui.IDR_PYTHONTYPE, None, SplitterFrame, None
)
def InitialUpdateFrame(self, frame, doc, makeVis... | null |
171,918 | import win32con
import win32ui
from pywin.mfc import dialog
class MyDialog(dialog.Dialog):
"""
Example using simple controls
"""
_dialogstyle = (
win32con.WS_MINIMIZEBOX
| win32con.WS_DLGFRAME
| win32con.DS_MODALFRAME
| win32con.WS_POPUP
| win32con.WS_VISIBLE
... | null |
171,919 | import win32api
import win32con
import win32ui
from pywin.mfc import dialog, window
def MakeDlgTemplate():
class TestPieDialog(dialog.Dialog):
def OnInitDialog(self):
def demo(modal=0):
d = TestPieDialog(MakeDlgTemplate())
if modal:
d.DoModal()
else:
d.CreateWindow() | null |
171,920 | import win32ui
from pywin.mfc import docview
class object_template(docview.DocTemplate):
def __init__(self):
def OpenObject(self, object):
def demo():
t = object_template()
d = t.OpenObject(win32ui)
return (t, d) | null |
171,921 | import sys
import __main__
import regutil
import win32api
import win32ui
demos = [ # ('Font', 'import fontdemo;fontdemo.FontDemo()'),
("Open GL Demo", "import openGLDemo;openGLDemo.test()"),
("Threaded GUI", "import threadedgui;threadedgui.ThreadedDemo()"),
("Tree View Demo", "import hiertest;hiertest.dem... | null |
171,922 | import sys
import win32api
import win32con
import win32ui
NotScriptMsg = """\
This demo program is not designed to be run as a Script, but is
probably used by some other test program. Please try another demo.
"""
from pywin.framework.app import HaveGoodGUI
def NotAScript():
import win32ui
win32ui.MessageBox(... | null |
171,923 | import sys
import win32api
import win32con
import win32ui
NeedGUIMsg = """\
This demo program can only be run from inside of Pythonwin
You must start Pythonwin, and select 'Run' from the toolbar or File menu
"""
from pywin.framework.app import HaveGoodGUI
def HaveGoodGUI():
"""Returns true if we currently have a g... | null |
171,924 | import sys
import win32api
import win32con
import win32ui
NeedAppMsg = """\
This demo program is a 'Pythonwin Application'.
It is more demo code than an example of Pythonwin's capabilities.
To run it, you must execute the command:
pythonwin.exe /app "%s"
Would you like to execute it now?
"""
from pywin.framework.app im... | null |
171,925 | import timer
import win32api
import win32con
import win32ui
from pywin.mfc import docview, thread, window
from pywin.mfc.thread import WinThread
class FontFrame(window.MDIChildWnd):
def __init__(self):
pass # Dont call base class doc/view version...
def Create(self, title, rect=None, parent=None):
... | null |
171,926 | import timer
import win32api
import win32con
import win32ui
from pywin.mfc import docview, thread, window
from pywin.mfc.thread import WinThread
class FontFrame(window.MDIChildWnd):
def __init__(self):
def Create(self, title, rect=None, parent=None):
class ThreadedFontFrame(window.MDIChildWnd):
def __ini... | null |
171,927 | import sys
import time
import timer
import win32api
import win32con
import win32ui
from pywin.framework import app, cmdline, dlgappcore
def DoDemoWork():
print("Doing the work...")
print("About to connect")
win32api.MessageBeep(win32con.MB_ICONASTERISK)
win32api.Sleep(2000)
print("Doing something e... | null |
171,928 | import sys
import time
import timer
import win32api
import win32con
import win32ui
from pywin.framework import app, cmdline, dlgappcore
class TimerAppDialog(dlgappcore.AppDialog):
softspace = 1
def __init__(self, appName=""):
dlgappcore.AppDialog.__init__(self, win32ui.IDD_GENERAL_STATUS)
self.t... | null |
171,929 | import sys
import win32api
import win32con
import win32ui
NotScriptMsg = """\
This demo program is not designed to be run as a Script, but is
probably used by some other test program. Please try another demo.
"""
def NotAScript():
import win32ui
win32ui.MessageBox(NotScriptMsg, "Demos") | null |
171,930 | import sys
import win32api
import win32con
import win32ui
NeedGUIMsg = """\
This demo program can only be run from inside of Pythonwin
You must start Pythonwin, and select 'Run' from the toolbar or File menu
"""
def HaveGoodGUI():
"""Returns true if we currently have a good gui available."""
return "pywin.fram... | null |
171,931 | import sys
import win32api
import win32con
import win32ui
NeedAppMsg = """\
This demo program is a 'Pythonwin Application'.
It is more demo code than an example of Pythonwin's capabilities.
To run it, you must execute the command:
pythonwin.exe /app "%s"
Would you like to execute it now?
"""
import sys
if sys.ver... | null |
171,932 | import win32api
import win32con
import win32ui
from pywin.framework import app, dlgappcore
class DoJobAppDialog(dlgappcore.AppDialog):
softspace = 1
def __init__(self, appName=""):
self.appName = appName
dlgappcore.AppDialog.__init__(self, win32ui.IDD_GENERAL_STATUS)
def PreDoModal(self):
... | null |
171,933 | import sys
from pywin.mfc import docview
import timer
import win32api
import win32con
import win32ui
threeto8 = [0, 73 >> 1, 146 >> 1, 219 >> 1, 292 >> 1, 365 >> 1, 438 >> 1, 255]
twoto8 = [0, 0x55, 0xAA, 0xFF]
oneto8 = [0, 255]
def ComponentFromIndex(i, nbits, shift):
# val = (unsigned char) (i >> shift);
val... | null |
171,934 | import sys
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import activex, window
from win32com.client import gencache
class BrowserFrame(window.MDIChildWnd):
def __init__(self, url=None):
if url is None:
self.url = regutil.GetRegisteredHelpFile("Main Python Document... | null |
171,935 | import sys
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import activex, window
from win32com.client import gencache
class BrowserFrame(window.MDIChildWnd):
def __init__(self, url=None):
if url is None:
self.url = regutil.GetRegisteredHelpFile("Main Python Document... | null |
171,937 | import sys
import win32api
import win32con
import win32ui
NeedGUIMsg = """\
This demo program can only be run from inside of Pythonwin
You must start Pythonwin, and select 'Run' from the toolbar or File menu
"""
from pywin.framework.app import HaveGoodGUI
def HaveGoodGUI():
def NeedGoodGUI():
from pywin.framework... | null |
171,939 | import regutil
import win32con
import win32ui
import win32uiole
from pywin.mfc import activex, docview, object, window
from win32com.client import gencache
class OleTemplate(docview.DocTemplate):
def __init__(
self, resourceId=None, MakeDocument=None, MakeFrame=None, MakeView=None
):
if MakeDocu... | null |
171,940 | import win32api
import win32con
import win32ui
from pywin.mfc import docview
class FontView(docview.ScrollView):
def __init__(
self, doc, text="Python Rules!", font_spec={"name": "Arial", "height": 42}
):
docview.ScrollView.__init__(self, doc)
self.font = win32ui.CreateFont(font_spec)
... | null |
171,941 | import win32con
import win32ui
from pywin.mfc import dialog
def MakeDlgTemplate():
style = (
win32con.DS_MODALFRAME
| win32con.WS_POPUP
| win32con.WS_VISIBLE
| win32con.WS_CAPTION
| win32con.WS_SYSMENU
| win32con.DS_SETFONT
)
cs = win32con.WS_CHILD | win32con.... | null |
171,942 | import win32con
import win32ui
from pywin.mfc import dialog, window
def test1():
win32ui.CreateDialogIndirect(MakeDlgTemplate()).DoModal()
def test2():
dialog.Dialog(MakeDlgTemplate()).DoModal()
def test3():
dlg = win32ui.LoadDialogResource(win32ui.IDD_SET_TABSTOPS)
dlg[0][0] = "New Dialog Title"
dl... | null |
171,944 | import win32con
import win32ui
from pywin.mfc import window
The provided code snippet includes necessary dependencies for implementing the `dllFromDll` function. Write a Python function `def dllFromDll(dllid)` to solve the following problem:
given a 'dll' (maybe a dll, filename, etc), return a DLL object
Here is the ... | given a 'dll' (maybe a dll, filename, etc), return a DLL object |
171,945 | import win32ui
import win32uiole
from . import window
def MakeControlClass(controlClass, name=None):
"""Given a CoClass in a generated .py file, this function will return a Class
object which can be used as an OCX control.
This function is used when you do not want to handle any events from the OCX
cont... | As for MakeControlClass(), but returns an instance of the class. |
171,946 | import struct
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, window
def CenterPoint(rect):
width = rect[2] - rect[0]
height = rect[3] - rect[1]
return rect[0] + width // 2, rect[1] + height // 2 | null |
171,947 | import struct
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, window
def OffsetRect(rect, point):
(x, y) = point
return rect[0] + x, rect[1] + y, rect[2] + x, rect[3] + y | null |
171,948 | import struct
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, window
def DeflateRect(rect, point):
(x, y) = point
return rect[0] + x, rect[1] + y, rect[2] - x, rect[3] - y | null |
171,949 | import struct
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, window
def PtInRect(rect, pt):
return rect[0] <= pt[0] < rect[2] and rect[1] <= pt[1] < rect[3] | null |
171,950 | import struct
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, window
def EditCreator(parent):
d = win32ui.CreateEdit()
es = (
win32con.WS_CHILD
| win32con.WS_VISIBLE
| win32con.WS_BORDER
| win32con.ES_MULTILINE
| win32con.ES_WANTRETURN
)
... | null |
171,951 | import re
import regex
import win32api
import win32con
import win32ui
from pywin.framework.editor import (
GetEditorFontOption,
GetEditorOption,
SetEditorFontOption,
SetEditorOption,
defaultCharacterFormat,
)
from pywin.mfc import afxres, dialog, docview
from .document import EditorDocumentBase
from... | null |
171,952 | import pywin.scintilla.config
import win32api
import win32con
import win32ui
from pywin.framework.editor import (
DeleteEditorOption,
GetEditorFontOption,
GetEditorOption,
SetEditorFontOption,
SetEditorOption,
defaultCharacterFormat,
editorTemplate,
)
from pywin.mfc import dialog
from . impo... | null |
171,953 | import os
import sys
import traceback
import win32api
import win32ui
g_sourceSafe = None
def FindVssProjectInfo(fullfname):
"""Looks up the file system for an INI file describing the project.
Looking up the tree is for ni style packages.
Returns (projectName, pathToFileName) where pathToFileName contains
... | null |
171,954 | import string
import sys
import win32ui
The provided code snippet includes necessary dependencies for implementing the `FixArgFileName` function. Write a Python function `def FixArgFileName(fileName)` to solve the following problem:
Convert a filename on the commandline to something useful. Given an automatic filename... | Convert a filename on the commandline to something useful. Given an automatic filename on the commandline, turn it a python module name, with the path added to sys.path. |
171,955 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | null |
171,956 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | null |
171,957 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | Create some sort of interactive window if the user's preference say we should. |
171,958 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | Destroy the interactive window. This is different to Closing the window, which may automatically re-appear. Once destroyed, it can never be recreated, and a complete new instance must be created (which the various other helper functions will then do after making this call |
171,959 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | If the interactive window is visible, hide it, otherwise show it. |
171,960 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | Shows (or creates if necessary) an interactive window |
171,961 | import array
import code
import os
import string
import sys
import traceback
import __main__
import afxres
import pywin.framework.app
import pywin.scintilla.control
import pywin.scintilla.formatter
import pywin.scintilla.IDLEenvironment
import win32api
import win32clipboard
import win32con
import win32ui
import re
from... | null |
171,962 | import glob
import os
import re
import sys
import time
import win32api
import win32con
import win32ui
from pywin.mfc import dialog, docview, window
from . import scriptutils
def getsubdirs(d):
dlist = []
flist = glob.glob(d + "\\*")
for f in flist:
if os.path.isdir(f):
dlist.append(f)
... | null |
171,963 | import os
import sys
import traceback
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, dialog, window
from pywin.mfc.thread import WinApp
from . import scriptutils
def AddIdleHandler(handler):
print(
"app.AddIdleHandler is deprecated - please use win32ui.GetApp().... | null |
171,964 | import os
import sys
import traceback
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, dialog, window
from pywin.mfc.thread import WinApp
from . import scriptutils
def DeleteIdleHandler(handler):
print(
"app.DeleteIdleHandler is deprecated - please use win32ui.Get... | null |
171,965 | import os
import sys
import traceback
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, dialog, window
from pywin.mfc.thread import WinApp
from . import scriptutils
The provided code snippet includes necessary dependencies for implementing the `SaveWindowSize` function. Write ... | Writes a rectangle to an INI file Args: section = section name in the applications INI file rect = a rectangle in a (cy, cx, y, x) tuple (same format as CREATESTRUCT position tuples). |
171,966 | import os
import sys
import traceback
import regutil
import win32api
import win32con
import win32ui
from pywin.mfc import afxres, dialog, window
from pywin.mfc.thread import WinApp
from . import scriptutils
The provided code snippet includes necessary dependencies for implementing the `LoadWindowSize` function. Write ... | Loads a section from an INI file, and returns a rect in a tuple (see SaveWindowSize) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.