mhammond / pywin32 Goto Github PK
View Code? Open in Web Editor NEWPython for Windows (pywin32) Extensions
Python for Windows (pywin32) Extensions
I have patched some source files in
the ./pywin32/pythonwin directory to add the support for
the new Wizard97 style.
including these:
pythonppage.cpp pythonppage.h
pythonpsheet.cpp pythonpsheet.h
win32prop.cpp win32prop.h
win32uimodule.cpp
also below because of some bugs found in these files:
win32assoc.cpp
win32bitmap.cpp win32bitmap.h
win32ctlList.h
attached is the diff file.
Reported by: qinlj
Original Ticket: "pywin32/patches/4":https://sourceforge.net/p/pywin32/patches/4
In order to get enum working with .NET wrapped enum, I
had to modify the code of __getitem__ from class
CDispatch in dynamic.py.
Indeed the "for" loop tries to access all index until it gets
an IndexError but when trying to access an non-existent
index under .NET, I got this error from mscorlib:
(-2147352567, "Une exception s'est produite.",
(0, 'mscorlib', "L'index \xe9tait hors limites. Il ne doit pas
\xeatre n\xe9gatif et doit \xeatre inf\xe9rieur \xe0 la taille
de la collection.\r\nNom du param\xe8tre\xa0: index",
None, 0, -2146233086), None)
The error message translated is: "index out of bounds. It
must not be negative or less than the collection size.
Parameter name: index"
In order to get the for loop working, I modified the code
to raise an IndexError and it works.
Hope it will help
Reported by: marcengel
Original Ticket: "pywin32/patches/1":https://sourceforge.net/p/pywin32/patches/1
I usually run PythonWin with the debugger tool bar
present. However, there does not seem to be any way of
enabling it when PythonWin is loaded. (I.e., the View |
Toolbars | Debugging can not be selected by default.)
Somewhat related is an inconsistency in the
documentation that is embedded in the default.cfg file. It
says that I can define my own .cfg file and using the
Tools | Options | Editor set PythonWin to start with my
configuration file. There is no place that I can set the
startup configuration file in the Editor page.
That said, the product is terrific! Thanks.
Reg. Charney
[email protected]
Reported by: rcharney
Original Ticket: "pywin32/bugs/14":https://sourceforge.net/p/pywin32/bugs/14
ctrl-v does not work in Help (manuals and reference). I
think it should. I certainly want it to. The only way
to copy selected text is rt-click -> copy.
Reported by: ramrom
Original Ticket: "pywin32/bugs/32":https://sourceforge.net/p/pywin32/bugs/32
In function that converts security descriptor to absolute
format, minium amount of memory for ACL's and Sid's
was allocated, but if SACL, DACL, owner sid or group
sid was not present it was never freed.
Reported by: rupole
Original Ticket: "pywin32/patches/3":https://sourceforge.net/p/pywin32/patches/3
Attempting to set a breakpoint on a line added at the
end of a file is rejected (line blahblah does not
exist) at bottom of file after adding lines. One must
first save the file. This is counterintuitive and
counterproductive.
Reported by: ramrom
Original Ticket: "pywin32/bugs/30":https://sourceforge.net/p/pywin32/bugs/30
On windows XP, the installation fails if the user installing the
package is not administrator. This is because the
installation tries to modify some keys in the registry which
cannot be modified by a normal user.
It would be good if the installation could be updated to allow
a normal user to install the package (the python package
allows this)
Reported by: khadrin
Original Ticket: "pywin32/feature-requests/3":https://sourceforge.net/p/pywin32/feature-requests/3
In build 152 pywin.debugger.brk() is not working,
because Debugger is without isInitialBreakpoint attribute.
import pywin.debugger
g = pywin.debugger.GetDebugger()
if not hasattr(g, 'isInitialBreakpoint'):
g.isInitialBreakpoint = None
pywin.debugger.brk()
print '1'
print '2'
print '3'
Reported by: janezj
Original Ticket: "pywin32/bugs/16":https://sourceforge.net/p/pywin32/bugs/16
Hi,
The registry handling methods in win32api seem to have
problems with
the Python exception handling. It took me some time,
but I have
managed to isolate the problem to a simple program. But
the problem is
more severe in more complicated situations, and there
it seems to
happen with most (or all) registry methods
(win32api.Reg...()).
The methods of _winreg module do not exhibit this
problem. For now, I
am using _winreg. However, it would be nice if the
problem could be
tracked down inside the win32api's source code and be
fixed.
regards,
Hung Jung Lu
#----------------------------------------------------------------------
# OS used: Windows XP
#
# Python 2.1
# program works correctly: correct exception
message displayed
#
# Python 2.2.2 (win32all build 152)
# (a) In Pythonwin intractive window, you get
# SystemError: error return without exception set
# (b) When running with python.exe, it crashes
#
# Python 2.3b1 (win32all build 153)
# (a) In Pythonwin intractive window, you get
# SystemError: error return without exception set
# (b) When running with python.exe, program exits
silently,
# which is not the correct behavior
#
# Comments:
# (a) equivalent _winreg module methods do not have
problem.
# (b) problem seems to happen with most, or all,
win32api.Reg...()
# methods, not in this particular example, but
in more
# complicated programs (involving classes)
#
import win32con
import win32api
def reg_operation():
hkey =
win32api.RegCreateKey(win32con.HKEY_CURRENT_USER,
r'Software\Spam')
x = 3/0 # or a statement like: raise 'error'
try: reg_operation()
except: x = 5/0 # or a statement like: raise 'error'
Reported by: mhammond
Original Ticket: "pywin32/bugs/13":https://sourceforge.net/p/pywin32/bugs/13
Hope this is not a silly request. I wonder if a way of
implementing Explorer Shell Extensions could be provided
so that they could be built with Python without having
to resort to C/C++.
For background on this request, you can look at the first
hit on a search on comp.lang.python for "shell
extension".
Your work and help is much apreciated.
Reported by: rrm1
Original Ticket: "pywin32/feature-requests/7":https://sourceforge.net/p/pywin32/feature-requests/7
Line 195 of dynamic.py imports util, but this isn't found
(well, here!) unless this is replaced with "from win32com
import util".
I can't seem to access anon cvs from sf at the moment,
so can't check more recent that this. Apologies if you
already have fixed this.
Reported by: anadelonbrin
Original Ticket: "pywin32/bugs/27":https://sourceforge.net/p/pywin32/bugs/27
The following code crashes -
import odbc
db = odbc.odbc('frank/Adminstrator')
def update():
c = db.cursor()
try:
c.execute("insect into fmtest values ('rubbish')")
return ['success']
except:
return ['fail']
print update()
The update routine tries to insert a record into the
database. If it fails (it will in the example as the
command is invalid), MSW pops up a box with the
message "Python.exe has generated errors and will be
closed by Windows", and the dos box displays the
message "<refcnt 0 at ....>".
The error only occurs if the return type is a list, and if
the function returns from the "except" clause.
Reported by: chagford
Original Ticket: "pywin32/bugs/26":https://sourceforge.net/p/pywin32/bugs/26
GetObject fails to retrieve an instance of an object when
a moniker is used.
For example, when working with WMI the following
will fail :-
>>> import win32com.client
>>> o = win32com.client.GetObject("winmgmts:")
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python23\lib\site-
packages\win32com\client\__init__.py", line 73, in
GetObject
return Moniker(Pathname, clsctx)
File "C:\Python23\lib\site-
packages\win32com\client\__init__.py", line 88, in
Moniker
moniker, i, bindCtx =
pythoncom.MkParseDisplayName(Pathname)
com_error: (-2147221020, 'Invalid syntax', None, None)
I believe there is a bug in the implementation of
MkParseDisplayName - possible corruption of passed
moniker string.
Reported by: aka_kool
Original Ticket: "pywin32/bugs/21":https://sourceforge.net/p/pywin32/bugs/21
Summary:
A minor typographical / naming convention error removal
of the Win32 extensions.
Problem:
The installer mistakenly copies the installation log into
Python23\Lib\site-packages\W32INST.LOG instead of
INSTALL.LOG which causes it to fail when attempting
to uninstall the Win32 extensions.
Potential Fix:
Either the location of the install log or the call to the
uninstaller placed in the registry should be modified to
correct this, or potentially both.
Reported by: nobody
Original Ticket: "pywin32/bugs/4":https://sourceforge.net/p/pywin32/bugs/4
Reported by a few people, but to repro:
* Paste "# ça ne va pas" into pywin (or any other
string with extended char)
* Move to the ç
* Press Backspace
Some other character appears. This will be related to
pywin.idle not being mult-character aware.
Reported by: mhammond
Original Ticket: "pywin32/bugs/1":https://sourceforge.net/p/pywin32/bugs/1
This code is in PyHANDLE.cpp:
/*static*/ void PyHANDLE::deallocFunc(PyObject *ob)
{
// Call virtual method Close
((PyHANDLE *)ob)->Close();
PyErr_Clear(); // can not leave pending exceptions
in destructors.
delete (PyHANDLE *)ob;
}
If this is called because an unrelated exception
occurred, it incorrectly clears the exception.
For example, suppose I have Python code that calls a
Python function f1(). This function successfully
creates a PyHANDLE, stores it in a local varaible, and
then raises an unrelated exception. The caller, f2(),
catches the exception. At this point, the PyHANDLE
still exists because the traceback object has a
reference to it (indirectly). Now suppose f2() throws
an exception. The previous traceback object is now
released (replaced by the new traceback). The PyHANDLE
object is decref'd and freed. PyHANDLE::deallocFunc()
is called. The exception that f2() threw is now cleared.
This results in a SystemError. The attached test case
reproduces it.
I think it should be
if (!((PyHANDLE *)ob)->Close())
PyErr_Clear();
but I'm not sure.
Reported by: jorend
Original Ticket: "pywin32/bugs/9":https://sourceforge.net/p/pywin32/bugs/9
Not always repeatable: make changes in an edit window.
click the close box. Say Yes to Save Changes? Result
Traceback (most recent call last):
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\framework\editor\document.py",
line 83, in OnSaveDocument
self._DocumentStateChanged()
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\framework\editor\document.py",
line 175, in _DocumentStateChanged
pywin.debugger.currentDebugger.UpdateDocumentLineStates(self)
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\debugger\debugger.py",
line 880, in UpdateDocumentLineStates
doc.MarkerDeleteAll( MARKER_BREAKPOINT )
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\scintilla\document.py",
line 117, in MarkerDeleteAll
self.GetEditorView().SCIMarkerDeleteAll(marker)
AttributeError: SCIMarkerDeleteAll
win32ui: OnSaveDocument() virtual handler (<bound
method SyntEditDocument.OnSaveDocument of
<pywin.framework.editor.color.coloreditor.SyntEditDocument
instance at 0x01885A68>>) raised an exception
Traceback (most recent call last):
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\framework\dbgcommands.py",
line 140, in OnUpdateAddBreakpoints
cmdui.SetCheck(doc.MarkerAtLine(lineNo,
pywin.framework.editor.color.coloreditor.MARKER_BREAKPOINT)
!= 0)
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\scintilla\document.py",
line 121, in MarkerAtLine
markerState =
self.GetEditorView().SCIMarkerGet(lineNo-1)Traceback
(most recent call last):
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\framework\dbgcommands.py",
line 108, in OnAdd
rc = d.set_break(pathName, lineNo)
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\debugger\debugger.py",
line 519, in set_break
self.SetLineState(filename, lineno,
LINESTATE_BREAKPOINT)
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\debugger\debugger.py",
line 867, in SetLineState
if not doc.MarkerCheck(lineNo, marker):
File
"P:\Python22\\lib\site-packages\Pythonwin\pywin\scintilla\document.py",
line 105, in MarkerCheck
markerState = v.SCIMarkerGet(lineNo)
AttributeError: SCIMarkerGet
win32ui: Error in Command Message handler for command
ID 16004, Code 0
then loops endlessly back to the last Traceback...
Reported by: ramrom
Original Ticket: "pywin32/bugs/34":https://sourceforge.net/p/pywin32/bugs/34
With pane divider about 2/3 way down, cursor in top
pane, I hit F9 and a breakpoint is set in the first
line of the bottom pane. Top pane is showing lines
157-196; bottom 75-89.
Reported by: ramrom
Original Ticket: "pywin32/bugs/36":https://sourceforge.net/p/pywin32/bugs/36
Insert* a date before 1970-01-01 00:00:00.000 GMT
into a database and try reading it from Python using the
odbc driver.
* This will probably require using something other than
Python. I haven't tested inserting such dates, only
reading them.
The bug probably exists because mktime returns -1 for
dates that it can't represent. I whipped up the following
untested patch which will turn all unrepresentable dates
into the epoch. This is much better than returning
random data from memory.
I don't know enough about the driver to suggest a
better way to do this.
diff -ur win32-orig/src/odbc.cpp win32/src/odbc.cpp
--- win32-orig/src/odbc.cpp 1997-06-13
10:37:06.000000000 -0500
+++ win32/src/odbc.cpp 2003-06-28
17:00:06.000000000 -0500
@@ -427,7 +427,11 @@
gt.tm_hour = dt->hour;
gt.tm_min = dt->minute;
gt.tm_sec = dt->second;
- return dbiMakeDate(PyInt_FromLong(mktime(&gt)));
+ time_t t = mktime(&gt);
+ // Set dates outside of time_t's range to the epoch.
+ if (t == (time_t)-1)
+ t = 0;
+ return dbiMakeDate(PyInt_FromLong(t)));
}
static PyObject *rawCopy(const void *v, int sz)
Reported by: rlaager
Original Ticket: "pywin32/bugs/29":https://sourceforge.net/p/pywin32/bugs/29
Due to the fact that the installation failed in the case
where the target directory contained a space, I now
have a half-installed copy of the Win32 extensions and
no installation log available for uninstallation.
Please provide me with the correct procedure for manual
uninstallation of this broken version of the utility such
that I may avoid future registry corruption.
Reported by: nobody
Original Ticket: "pywin32/feature-requests/1":https://sourceforge.net/p/pywin32/feature-requests/1
In previous versions of PythonWin I could left click,
then right click on a result line in a grep window and
choose to edit the file. In the current (win32all build
152) right click in grep always displays the same menu
(Try Again, Cut, Copy, Paste, Select all, Save tesults.)
BTW it also bugged me that I had to left click first to
select the line, then right click.
Reported by: mhammond
Original Ticket: "pywin32/bugs/2":https://sourceforge.net/p/pywin32/bugs/2
python version: 2.2.2
win32all version: 152
platform: win2k server with WSH 5.6
description:
I have a pythoncom server (using DynamicPolicy) with a
function that takes a single parameter. Calling that
function from VB/VBScript using "Call" (ignoring the
return value) causes the passed parameter to be set to
the return value of that function. If I assign the return
value to a VB variable the parameter's value doesn't
change:
'Python COM server
class Object:
def _dynamic_(self, name, lcid, wFlags, args):
return getattr( self, string.lower(name) )(*args)
def func1(self, S1):
pass
'Called From VBScript
Call obj.func1(param) 'Bad, param gets set to Null
rval = obj.func1(param) 'OK, param retains its value
I'm at a loss as to why this is. The only difference I can
see at the policy level is wFlags, with one style it's 3
(DISPATCH_METHOD | DISPATCH_PROPERTYGET)
and the other it's 1 (DISPATCH_METHOD)
Attached is a zip containing a pythoncom server, a
VBScript test file and a batch (cmd) file to run the test.
Please let me know if I've done something incorrectly.
Reported by: ryangroe
Original Ticket: "pywin32/bugs/15":https://sourceforge.net/p/pywin32/bugs/15
file win32com\server\policy.py
class BasicWrapPolicy:
def _CreateInstance_(self, clsid, reqIID)
this function brings some danger in case of
win32api.error raise from server initialization routine.
I'd suggest to move except statement some rows above to
except only CLSID/PythonCom key reading failure.
Reported by: shiyanovsky
Original Ticket: "pywin32/bugs/20":https://sourceforge.net/p/pywin32/bugs/20
When PythonWin is executing a TKInter script and
something goes wrong, things apparently get left in
queue for the next (correct) execution. This causes
weirdness in the GUI interaction eventually leading
PythonWin to crash.
Not 100% sure it's PyWin and not TkInter's problem,
but I started with the more likely suspect IMO.
TO REPRODUCE:
1. start PythonWin
2. New python script
3. Paste in Example 3.1 from
<http://www.pythonware.com/library/tkinter/introducti
on/hello-again.htm> (a TkInter "Hello World" example).
4. Add some line that's guaranteed to error,
like "import dummy", BEFORE the call to root.mainloop
()
5. Save the file somewhere not in the Python path, e.g.
under a subdir of My Documents .
6. Run with an <F5>
OBSERVE: normal exception message in interactive
window.
6. Fix the "problem" by deleting the bogus import line.
7. Run again with <F5>
ACTUAL RESULT: Now you get two TKInter dialog
boxes! Pressing Quit on the 2nd one doesn't really
quit, and pressing a few more buttons (e.g. Quit on
the first, Hello on the second, Quit on the second -- I
think that was my order) will cause an error:
Runtime Error!
Program <path to pythonwin> PYTHONWIN.EXE
abnormal program termination
EXPECTED RESULT: PythonWin should be robust
enough to handle this. I think. :-)
If possible, it should clear out the queue of windows so
the first dialog never gets displayed. Certainly they
shouldn't both display at the same time.
Reported by: philipreed
Original Ticket: "pywin32/bugs/22":https://sourceforge.net/p/pywin32/bugs/22
Includes a patch and discussion.
Reported by: mhammond
Original Ticket: "pywin32/feature-requests/4":https://sourceforge.net/p/pywin32/feature-requests/4
Uses PyObject_AsReadBuffer as per the suggestion in
the bug report. However, this may not be backward
compatible with 1.5, the docs say this function was
added in 1.6.
Reported by: rupole
Original Ticket: "pywin32/patches/5":https://sourceforge.net/p/pywin32/patches/5
Not sure that it will be easy, but there are w32api
package...
Reported by: dubnerm
Original Ticket: "pywin32/feature-requests/5":https://sourceforge.net/p/pywin32/feature-requests/5
There is a memory leak associated with events delivered
through the IConnectionPoint interface. The leak
occurs when a ByRef VARIANT parameter is passed
through the interface as an inout parameter.
The culprit appears to be oleargs.cpp, specifically the
routine PythonOleArgHelper::MakeObjToVariant, which
is called to replace the original VARIANT with the
returned one. In the case VT_VARIANT | VT_BYREF,
with bCreateBuffers as false, the routine calls
VariantClear(var), which only clears the referencing
VARIANT and not the referenced one. This call should
be VariantClear(V_VARIANTREF(var)), which will clear
memory held by the referenced VARIANT before the
subsequent call to PyCom_VariantFromPyObject
simply overwrites that VARIANT.
The code as written depends on V_VARIANTREF(var) to
remain valid after calling VariantClear(var), which seems
a dangerous assumption.
Note that this repair follows the same logic as is used in
the existing code for the VT_BSTR | VT_BYREF case,
in which SysFreeString(*V_BSTRREF(var)) is called, for
the reason that VariantClear(var) wouldn't free the
indirectly referenced BSTR.
Reported by: shacktoms
Original Ticket: "pywin32/bugs/17":https://sourceforge.net/p/pywin32/bugs/17
Help for win32all-152 misses entries for
AppendMenu, InsertMenu, InsertMenuItem
possibly for other items too... somebody should check
Reported by: dubnerm
Original Ticket: "pywin32/bugs/24":https://sourceforge.net/p/pywin32/bugs/24
Problem experimented using win32all build 152, Python
2.2.2.
The attached .zip file contains:
A) TestServer.tlb that defines the IPippo interface
B) CPippo.py that implements IPippo referring the typelib
using _com_interfaces and _typelib_guid_ attributes
C) PyPippo.py that implements IPippo using
_public_method_ attribute
D) CTest.py that reproduce the problem using CPippo
E) PyTest.py that is the same as CTest.py but use
PyPippo and doesn't have the leak
F) universal.py as modified by me to reduce the size of
the leak. My changes are only a workaround to reduce
the leak in my specific use (only one interface for
object, no lcid and typelib version support). Moreover I
think that with this change the performances are
improved as well.
The steps to reproduce the problem are:
1. COM registrations
1.1 python regtlb.py TestServer.tlb
1.2 python CPippo.py
1.3 python CTest.py
2. Test to highlight the leak (it use CPippo class)
2.1 python CTest.py
Reported by: ababini
Original Ticket: "pywin32/bugs/25":https://sourceforge.net/p/pywin32/bugs/25
Just wanted to alert you to a small problem with the
win32all 152 binary build for Python 2.2. The Windows
version information appears to be incorrect or at least
inconsistent with win32all 150 for Python 2.2. The 150
binaries are versioned 2.2.0.150, but the 152 binaries
are versioned 2.1.0.152. This caused my installation
of 152 over 150 to NOT replace the binaries, since they
appear to be older from a versioning perspective. All
of the win32 binaries appear to be affected.
Reported by: mhammond
Original Ticket: "pywin32/bugs/18":https://sourceforge.net/p/pywin32/bugs/18
Seems win32-extentions can't find my python 2.2.3
installation, it says python 2.2.3 isn't installed.
when i run the setup i got the screen that has two
buttons and a warning (no python installation found).
When i run python from commandline it displays 2.2.3 so
i guess the error is not correct.
Anyway... there are two buttons called "Continue
anyway" and "exit". So normally i just can click continue
anyway, but that doesn't work out, the button just
doesn't do a damned thing and just stays on screen as
it is. So i guess this is a bug ?
Best Regards,
Patrick Bielen
Reported by: pbielen
Original Ticket: "pywin32/bugs/23":https://sourceforge.net/p/pywin32/bugs/23
GetUserNameEx() would make life easier in an ADSI
environment.
Reported by: mhammond
Original Ticket: "pywin32/feature-requests/2":https://sourceforge.net/p/pywin32/feature-requests/2
Click in the immediate window, and drag down. Selection
extends until the bottom, then wraps to the top.
It should stop at the bottom.
Reported by: ramrom
Original Ticket: "pywin32/bugs/35":https://sourceforge.net/p/pywin32/bugs/35
Windows XP Professional SP1 - English
.NET framework not installed
python-2.2.3
win32all-152
Open an interactive python session, then execute the
following import statement:
import win32com.client
This causes the python interpreter to crash
with "memory could not be read" error (system error
dialog appears).
Google search: +"import win32com.client" +crash
Tons of error reports can be found. Strange, sometimes
unpredictable behaviour reported. This bug (?) broke
significant part of existing win32all codebase. Some
forum posts suggested, that win32all-150 with python-
2.2.2 did not crash (this is a "workaround", but should
be tested).
- Complex -
Reported by: complex
Original Ticket: "pywin32/bugs/31":https://sourceforge.net/p/pywin32/bugs/31
win32pipe.popen and win32api.Reg* should be removed
from the source-tree, and dynamically load the versions
in Python itself. This way bugs fixed in the core are
reflected here magically. Eg, see
https://sourceforge.net/tracker/index.php?func=detail&amp;aid=722413&amp;group\_id=5470&amp;atid=105470
I would rather spend the effort aliasing _winreg than
duplicating the fix in win32api. However, this will
almost certainly mean win32api.error should subclass
os.WindowsError.
Reported by: mhammond
Original Ticket: "pywin32/bugs/8":https://sourceforge.net/p/pywin32/bugs/8
Under certain conditions, win32api.SearchPath() is
called on a service's _exe_name_.
This returns a tuple, not a string.
Patch attached.
And a feature request for _exe_args_!
Can supply a patch if needed.
Reported by: theller
Original Ticket: "pywin32/patches/2":https://sourceforge.net/p/pywin32/patches/2
help does not remember favorites.
Reported by: ramrom
Original Ticket: "pywin32/bugs/33":https://sourceforge.net/p/pywin32/bugs/33
Just to let you know, I installed Python 2.2 with the
advanced non-admin install option, which puts some dlls
in the Python subtree instead of in the Windows system
folder, and the Win32 Extensions install program gave
me an error because it could not find a dll.
I reinstalled Python 2.2 with the regular admin
install, and the Win32 Extensions installed just fine.
Reported by: mhammond
Original Ticket: "pywin32/bugs/19":https://sourceforge.net/p/pywin32/bugs/19
win32clipboard.GetClipboardData was returning a string
representation of a c struct for CF_HDROP. which was
pretty much useless. Instead it now returns a list of
names of files that were copied to the clipboard.
Reported by: rupole
Original Ticket: "pywin32/patches/7":https://sourceforge.net/p/pywin32/patches/7
View -> Options -> Tabs & Whitespace. Click Keep Tabs.
Type a tab or click enter to start an indented line -
editor puts spaces in instead of tabs.
Reported by: ramrom
Original Ticket: "pywin32/bugs/11":https://sourceforge.net/p/pywin32/bugs/11
In some strange cases (including dual monitor setups),
Pythonwin may restore a position that is wholly or
partially off the screen. It should handle this better.
Reported by: mhammond
Original Ticket: "pywin32/bugs/5":https://sourceforge.net/p/pywin32/bugs/5
win32api.GetProcAddress() should be either removed or
has some counterpart that will allow to call arbitrary
functions with specified parameter types.
Reported by: dubnerm
Original Ticket: "pywin32/feature-requests/6":https://sourceforge.net/p/pywin32/feature-requests/6
I have a .NET assembly that generates an Event.
The event name is Started. I got the following exception:
com_error: (-2147352567, 'Exception occurred.',
(0, '', 'Unknown name.', None, 0, -2147352570), None)
The problem is that when calling MakePy on the TLB, it
generates the event name as"OnStarted" and
not "Started" in _dispid_to_func_
If the event name in C# assembly event interface
is "OnStarted" than everything works fine.
I don't know if this is specific to .NET interoperabilty or
not.
I never noticed it with COM connection points
Reported by: marcengel
Original Ticket: "pywin32/bugs/28":https://sourceforge.net/p/pywin32/bugs/28
If a typelib registry key is protected from the logged
on user, makepy aborts:
File
"E:\Python22\lib\site-packages\win32com\client\selecttlb.py",
line 68, in EnumTlbs
key2 =
win32api.RegOpenKey(win32con.HKEY_CLASSES_ROOT,
"Typelib\%s" % (iid))
error: (5, 'RegOpenKeyEx', 'Access is denied.')
This happened on Win NT 4 logged on as administrator. A
simple modification to the code to ignore such keys
will allow the user to get a list of permitted keys
instead of aborting. See attachment. I added lines 75
(try) and 118 (except) to ignore protected keys
Reported by: ramrom
Original Ticket: "pywin32/bugs/10":https://sourceforge.net/p/pywin32/bugs/10
From email:
Anyone else seeing this?
PythonWin 2.1.1 / win32all 1.5.1 / Win 2k Server
*** Script 1 ***
<%@language="Python"%>
Before End
<%
Response.End()
%>
After End
*** Output ***
Before End After End
*** Script 2 ***
<%@language="Python"%>
Before End
<%
Response.end()
%>
After End
*** Output ***
Before End
*** Script 3 ***
<%@language="Python"%>
<%
Response.end()
%>
After End
*** Output ***
HTTP/1.1 500 Server Error
--
Yes, I too have found it to be the case in the past
(haven't checked
recently) that Response.End() does not in fact end the
response in
python under asp.
Reported by: mhammond
Original Ticket: "pywin32/bugs/7":https://sourceforge.net/p/pywin32/bugs/7
MkParseDisplayName was encoding the input string using
Py_FileSystemDefaultEncoding, and it was getting
garbled in the process.
Reported by: rupole
Original Ticket: "pywin32/patches/6":https://sourceforge.net/p/pywin32/patches/6
The procedure "InstallService" in "win32serviceutil.py" has
a parameter "bRunInteractive" meant to allow an installed
service the ability to interact with the screen. This
parameter is not handled correctly, and moreover, there is
no commandline access to the parameter.
At the very least, a true value for the parameter should
cause SERVICE_INTERACTIVE_PROCES to be or'ed into
the *service* type not the *startup* type (as the current
code does). This can be found in MS's documentation of
CreateService.
I've included a patch (on the version of win32serviceutil.py
in Python2.2) which does the above as well as adds a
simular parameter to ChangeServiceConfig. Moreover it
introcudes a new command line arg --interactive which
allows a command line option to set the flag on both
service installation and update.
I hope you find it useful.
Gary Herron
Reported by: herron
Original Ticket: "pywin32/bugs/12":https://sourceforge.net/p/pywin32/bugs/12
Consider the following:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class crasher(object): pass
...
>>> obj = crasher()
>>> import win32clipboard
>>> win32clipboard.OpenClipboard()
>>> win32clipboard.EmptyClipboard()
>>> win32clipboard.SetClipboardData(0, obj)
(Python Crashes -- same thing happens under 2.3a2).
The problem appears to be the assumption (in py_set_clipboard_data) that a non-NULL tp_as_buffer implies a valid bf_getreadbuffer. This is not true; in particular, tp_as_buffer is always non-NULL for new-style classes.
I'd suggest using PyObject_AsReadBuffer instead of directly manipulating tp_as_buffer.
Reported by: glchapman
Original Ticket: "pywin32/bugs/6":https://sourceforge.net/p/pywin32/bugs/6
Summary:
Using the win32all-153.exe installer on Windows XP
SP1 to install the extensions when the base version of
Python resides in a directory path containing spaces
results in an Access Violation.
Testing Methodology / Error Reproduction:
The installer crashed while attempting to register some
of the COM components it installs when I attempted to
use the installer to add the Win32 components when
Python was installed into "C:\Program Files\python23"
but functioned perfectly when Python was installed
in "C:\python23".
Possible Cause:
I have observed that various Windows installer utilites
perform improper conversion between LFN and non-LFN
versions of file and path names used during installation.
Perhaps a defective filename string causes the COM
component registration procedures to fail. I would first
attempt installing patches and updates for the installer
generation utility to see if the errors in its LFN handling
improve. It can with a high surety be stated that said
upgrade would likely result in a resolution of the issue.
Reported by: nobody
Original Ticket: "pywin32/bugs/3":https://sourceforge.net/p/pywin32/bugs/3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.