[python-win32] Sending an event from a python COM server to a VB COM client

2005-11-15 Thread Gary




Hello
I am trying to send an event from a Python COM 
server to a VB (or VB.NET) COM client.
I am a newbe both in VB and in 
python.
Can anyone give me a simple (but complete) 
code example both of the Python server side and the VB client side for raising a 
single event.
 
Any answer would be highly 
appreciated.
Regards
Gary
 
___
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Releasing a Com object

2009-01-20 Thread Gary Scorby
I'm having trouble releasing a com object.  In the past I've always set
the instance to None and life is good, as in the example below.  I'm
currently working with an object I can't release with this method.
Anybody have a different/better way to handle this?

 

Thanks

 

Gary

 

# example

xxx = win32com.client.Dispatch('abcd.XXX')

# to release

xxx = None

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Releasing a Com object

2009-01-20 Thread Gary Scorby
You are correct, it no longer refers to the object.  I should have added
a few more details.  Windows still believes the object is in use, in
this case it's a dll.  Nothing else can be done with the dll until
Python is completely shut down.  None of the other dll com objects I
have used in the past have had this problem.

 

Thanks

 

Gary

 

From: bob gailer [mailto:[email protected]] 
Sent: Tuesday, January 20, 2009 11:05 AM
To: Gary Scorby
Cc: [email protected]
Subject: Re: [python-win32] Releasing a Com object

 

Gary Scorby wrote: 

I'm having trouble releasing a com object.  In the past I've always set
the instance to None and life is good, as in the example below.  I'm
currently working with an object I can't release with this method.
Anybody have a different/better way to handle this?


"can't release" - what does that mean? Certainly xxx no longer refers to
the object.



 

Thanks

 

Gary

 

# example

xxx = win32com.client.Dispatch('abcd.XXX')

# to release

xxx = None

 

-- 
Bob Gailer
Chapel Hill NC
919-636-4239

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Releasing a Com object

2009-01-20 Thread Gary Scorby
That was my original attempt.  No luck with that either.  This sucker
has nine lives.

 

Thanks for your response.

 

Gary

 

From: [email protected]
[mailto:[email protected]] On
Behalf Of Greg Antal
Sent: Tuesday, January 20, 2009 12:59 PM
To: [email protected]
Subject: Re: [python-win32] Releasing a Com object

 

Try
del xxx 

Even when you invoke whatever "stop" or "close" methods that object
offers, you sometimes still have to delete the object to make the
application shut down.

- Greg Antal



Gregory W. Antal
Senior Technical Advisor
ATA Engineering, Inc.
11995 El Camino Real, Suite 200   
San Diego, CA  92130
www.ata-e.com
 
[email protected]
858-480-2072  (Phone)
858-792-8932  (Fax)



bob gailer wrote, On 1/20/2009 11:27 AM: 

Gary Scorby wrote: 

You are correct, it no longer refers to the object.  I should have added
a few more details.  Windows still believes the object is in use, in
this case it's a dll.  Nothing else can be done with the dll until
Python is completely shut down.  None of the other dll com objects I
have used in the past have had this problem.


Excel behaves that way also. One must explicitly tell Excel to quit, as
in excelObj.quit(). Does your dll have an equivalent?

Or take a look at psTools for ways to kill processes.

-- 
Bob Gailer
Chapel Hill NC
919-636-4239

 






 
___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32
  
___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] (no subject)

2009-07-22 Thread Gary Smith
Hi All,

I built a Python com server to solve regular expressions for use in a  VBA
application.  Here's the code:

 

import pythoncom

import re

import string

class reObj:

_public_methods_ = ["re"]

_reg_progid_ = "Python.reObj"

_reg_clsid_ = pythoncom.CreateGuid()

def __init__ (self):

pass

def re(self, pattern, str):

result=''

matchGroup=re.search(pattern,str)

while matchGroup<>None:

(start,end)=matchGroup.span()

result = result + ", " + str[start:end]

str=str.replace(str[start:end],'',1)

matchGroup=re.search(pattern,str)

return result[2:]

def listem(self, list):

for item in list:

print item, r.re(p,item)

 

if __name__ == '__main__':

import win32com.server.register

win32com.server.register.UseCommandLine(reObj)

 

The last few lines register the com server, so all that is necessary is to
execute the code.

 

Calling from VBA is:

Dim re As Object

Set reObj = CreateObject("Python.reObj")

Result = reObj(pattern, string)

_

I got the basic idea from something I found on the web.

Cheers, Gary

__

"Even for practical purposes theory generally turns out the most important
thing in the end."  Oliver Wendell Holmes.

 

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Problem registering Python COM object

2009-08-13 Thread Gary Smith
Re:  Problem registering Python COM object (suddenly)

Hi,

I've been volunteering for the Research Dept. of Selby Botanical Gardens
here in Sarasota, FL.  In support of my project I wrote a Python COM server
to extend Python's regular expression capabilities to VB.  (I'm aware of VB
regular expression support, which doesn't include look-behinds.)

The computer I use at the Gardens has XP SP2 and Access 2003.  Two or three
weeks ago I installed Pywin32 (Active State) at the Gardens by downloading
the latest version of 2.5 (build 211?).  At home I run Active State 2.5
211.1.

I believe the software is up-to-date.  When I originally installed my Python
COM object, the Access application ran flawlessly.  However, after a week's
absence, I can't even seem to register the COM object (which has changed).  

The symptoms occur during a query that computes a value using the COM
object.  I get the Access message "Error ??? the object doesn't support that
method".  If I stop the query with a break point in VB, I can see that my
object exists (probably from the DIM statement).  However, it doesn't seem
to be associated with the Python COM object.

Everything works swimmingly at my development computer.  Between last week's
visit and today's visit, things won't work at the Gardens.

The computer there is very low on C: disk space.  Could this have an effect
on win32com's registration of the COM object?

Is there a method for positive validation that the object is registered?
The Tools.References menu item doesn't help, and at my development computer
it doesn't show up as an ActiveX component, although it is obviously
registered and accessible to VB.  Also Application.COMAddins.Item() doesn't
show it on either machine.  This is puzzling.

I've run out of leads.  Any clues, anyone?  The code follows, although I
don't believe it is the code, but rather some external condition of which
I'm unaware.

Here is the Python code:

 

class reObj:

   import pythoncom

   import re

   import string

  _public_methods_ =
["allMatches","substitute","replaceAll","occurs","listem"]

   _reg_progid_ = "Python.reObj"

   _reg_clsid_ = pythoncom.CreateGuid()

   def __init__ (self):

 pass

   def allMatches(self, pattern, str):

 import re

 import string

 result=''

 matchGroup=re.search(pattern,str)

 while matchGroup<>None:

(start,end)=matchGroup.span()

result = result + ", " + str[start:end]

str=str.replace(str[start:end],'',1)

matchGroup=re.search(pattern,str)

 return result[2:]

   def substitute(self,str,pattern,replacement,count=1):

 str=str.replace(pattern,replacement,count)

 return str

   def replaceAll(self,str,pattern,replacement):

 str=str.replace(pattern,replacement)

 return str

   def occurs(self,str,pattern):

 result=''

 matchGroup=re.search(pattern,str)

 count=0

 while matchGroup<>None:

count=count+1

(start,end)=matchGroup.span()

str=str.replace(str[start:end],'',1)

matchGroup=re.search(pattern,str)

 return (count)

 

if __name__ == '__main__':

   import win32com.server.register

   win32com.server.register.UseCommandLine(reObj)

And here is the VB code that calls it:

 

Public Function fLatitude(str As String) As String

Dim degreesPattern As String

Dim minutesPattern As String

Dim secondsPattern As String

Dim degrees As String

Dim minutes As String

Dim seconds As String

Dim s As String

Dim ns As String

Dim r As Object

Set r = CreateObject("Python.reObj")

degreesPattern = "(\d+(\.\d+)?...@])"

minutesPattern = "(\s?\d+(\.\d+)?[!])"

secondsPattern = "(\s?\d+(\.\d+)?[=])"

latitudePattern = "(\d+(\.\d+)?...@!=]\s?)+[NS](?=[\s\.,;]|$)"

agn = fAgnosticLatLong(str)

s = r.allMatches(latitudePattern, agn)

If Len(s) = 0 Then

fLatitude = ""

Exit Function

End If

ns = Right(s, 1)

degrees = r.allMatches(degreesPattern, s)

minutes = r.allMatches(minutesPattern, s)

seconds = r.allMatches(secondsPattern, s)

degrees = r.replaceAll(degrees, "@", "*")

minutes = r.replaceAll(minutes, "!", "'")

seconds = r.replaceAll(seconds, "=", """")

fLatitude = degrees & minutes & seconds & ns

Set r = Nothi

Re: [python-win32] Problem registering Python COM object

2009-08-18 Thread Gary Smith
Mark,
Thanks for helping. Of course your answers bring more questions.
You wrote:
>>Assuming you *can* register it [the COM server] but just fail to use it
Do you mean it's registered, but I'm accessing it wrong, so not at all?  I
can see that possibility.  Also, I think it's a fault to use
Pythoncom.CreateGuid each and every time I register the object.  Perhaps I
should reuse the guid.
You wrote:
>>you may like to google for using --debug when registering, then using the
win32trace 
I was unaware of win32trace, so thanks for that. Can it be that win32trace
causes the Python error to be elevated to VB's awareness -- that's where I
now see details of a Python com server failure -- rather than in the Python
trace collector?  That's clever.
Thank you for your suggestions.  You've given me a couple of new lines of
attack.
Cheers, Gary Smith

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Accessing a dictionary like object using WebServices from Win32

2010-11-22 Thread Gary Hubbard
Hi

I am trying to communicate with a vendor's WebService, using PyWin32.  I am 
successful using most of the methods, but I don't know how to interpret those 
returning a dictionary like object.

Obfuscating the vendor name with XXX everywhere, to avoid checking on whether 
it 
is acceptable to communicate about this, the code looks like

    sc = win32com.client.Dispatch("MSSOAP.SoapClient")
    sc.mssoapinit("http://localhost:1024/wsdl/IXXXWebService";)
    sc.connect()
    ret = sc.ReadMeasureDataParam(paramName)

Under C# or VB, ret would be a dictionary like object with 6 different keys, 
such as LongName and ShortName, accessed as ret.LongName, etc.  Using that 
under 
PyWin32 gives an attribute error, but I can index with the [0] to [5].  
Unfortunately, doing that still returns an object I don't know how to interpret.

There are several other functions that have the same issue, but I think the 
basic problem is identical.

The relevant XML code follows.  I manually chopped the code apart, eliminating 
what I though was unnecessary. 

Thanks,


XML Code follows:


http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; name="IXXXWebServiceservice" 
targetNamespace="http://tempuri.org/"; xmlns:tns="http://tempuri.org/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:ns1="urn:XXXWebServiceIntf">
  
    
  
    
  
  
  
  
  
  
    
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    http://schemas.xmlsoap.org/soap/http"/>
    
  
  
    http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:XXXWebServiceIntf-IXXXWebService"/>
  
  
    http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:XXXWebServiceIntf-IXXXWebService"/>
  
    
  
  
    
  http://172.31.234.44:1024/soap/IXXXWebService"/>
    
  

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Compiler info

2014-12-27 Thread Gary Scorby
What version of Visual Studio is used to compile the current 219 download for 
Python 2.7?

Thank you

Gary Scorby
[cid:[email protected]]
FINANCIAL TECHNOLOGIES. SOLUTIONS FOR PEOPLE.TM


___
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] COM server with events

2005-11-10 Thread Gary Kshepitzki



HiI am trying to implement a COM server in 
python that supports events.I went over the available documentation, I 
looked in the example in win32com/demos/connect.py (which mixes client and 
server too much) and still I find it hard to understand what I need to do.I 
am looking for a complete, straight forward example (templatish if you will) 
that shows how to implement a full COM server with an event interface and an 
event.
In particular I don't understand how to define 
an EventInterface in my server that can be retrived by 
FindConnectionPoint()
and getting mixed up on what needs to be 
implemented for supporting the ConnectionPointContainer and ConnectionPoint 
interfaces.
 
Anyone can point me to something?RegardsG.
 
___
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] VB Com object problem

2006-03-14 Thread Gary Scorby




I have a visual basic com object I am trying to use, so 
far unsuccessfully.  I am happily VB ignorant but will do my best to 
describe the problem.
 
>>> import 
win32com.client>>> biff = win32com.client.Dispatch("OBName.Main")>>> 
biff.LoggedIn0>>> biff.TelLogin("Login", "Password", -1, 
App)
 
The "TelLogin" 
method is where things blow up.  I need to send the following 4 required 
parameters-
1) Login 
ID
2) 
Password
3) A VB True, which 
they tell me is equivalent to -1
4) The VB App 
keyword which is suppose to identify the calling application, in this case 
Python.  This is where things blow up.
 
Below is a 
description from the vendor about the App keyword and how it is used.  
Looks very VB specific to me.  I have been all over the web trying to find 
an equivalent of what to send in Python.  I have had no luck.  What in 
the name of Python, if anything, can I use in the 4th parameter?  I have 
successfully used other VB com objects with Python, but never with an App 
requirement.
 
Thanks for any 
assistance.
 
Gary 
Scorby
 
This is the 
description from the vendor-
-
 
The 
App object is a VB keyword. What we use it for in BPUTIL is to determine 
properties of the application that is sending the message. Here is how we use 
it.


We define a global 
variable:
 Public 
myApp    As Object
(Object Data Type: 
Object variables are stored as 32-bit (4-byte) addresses that refer to objects. 
Using the Set statement, a variable declared as an Object can have any object 
reference assigned to it.)
 In the TelLogin routine 
we set myApp to the App object parameter passed to the 
routine:
Public Sub 
TelLogin(sUsr As String, sPW As String, GetIni As Integer, oApp As Object, 
Optional sBank As String, Optional sSIP As String)
Set myApp = 
oApp 
From there on we can 
look at the ‘App’ properties such as:
myApp.EXEName
This property would 
tell us the executable name that BPUTIL is bound 
to.
Here is a link to the 
App property: http://msdn.microsoft.com/library/default.asp?url="">
---
___
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Exposing a Java bean in Python

2008-01-24 Thread Gary Scorby
I have a Java bean and I don't know what to do with it.   Has anyone
exposed a Java bean in Python?  I'm sending the questions to this group
because win-32 does what I need for com objects.  Similar goal so I'm
hoping someone else has had this need for a Java bean.  Any help would
be appreciated.  If there is a different group that this question is
better suited for please let me know.  I've put in a bit of time
searching the web and haven't found anything useful.

 

Thanks

 

Gary

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Login dialog user ID restriction?

2018-11-16 Thread Scorby, Gary
We have been using the login dialog that comes with pywin32 for over a decade.  
Works great.

[cid:[email protected]]

We have a client who until recently required a 4 character max user ID.  Now 
they want an option for up to a 19 character user ID.  I told them no problem, 
that should work.  One of their user decided to go for it and set their 
password to 19 characters on their server, then tried to log in via the login 
box.  They claimed only 14 characters will fit in the User ID entry window.  
Really?

So I ran some tests.  I held down the 'a' key for user ID and 'b' key for 
password.  Result:

('aa', 'b')

User ID - 14 characters
PW - 21 characters

Then I decided to go skinny and held the i key for both.  Result:

('ii', 'i')

User ID - 42 characters
PW - 21 characters

I'm a data mover and very seldom work with dialogs.  The restriction appears to 
be entry window size based on character width.  I assumed if there was any kind 
of a restriction it would be x number of characters.  I've looked at how I send 
could parameters to alter this behavior but don't see anything.  Feel free to 
verbally abuse me if I'm missing the obvious, but can anyone tell me how to 
expand the number of characters I can send for a user ID?

Thank you

Gary

"FINASTRA" is the trade name of the FINASTRA group of companies. This email and 
any attachments have been scanned for known viruses using multiple scanners. 
This email message is intended for the named recipient only. It may be 
privileged and/or confidential. If you are not the named recipient of this 
email please notify us immediately and do not copy it or use it for any 
purpose, nor disclose its contents to any other person. This email does not 
constitute the commencement of legal relations between you and FINASTRA. Please 
refer to the executed contract between you and the relevant member of the 
FINASTRA group for the identity of the contracting party with which you are 
dealing.
___
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Login dialog user ID restriction?

2018-11-19 Thread Scorby, Gary
Thanks for the response.  I can hold the key down for 10 seconds or 2 minutes. 
The result returned when clicking OK is always the same.  Also tried individual 
characters (like ‘12345…’ to confirm.  When the window is full, no more 
characters are accepted.

Gary

From: python-win32  On 
Behalf Of Glenn Linderman
Sent: Friday, November 16, 2018 10:29 PM
To: [email protected]
Subject: Re: [python-win32] Login dialog user ID restriction?

   CAUTION: This email originated from an external source. If you suspect a 
potential phishing email, report it to 
[email protected]<mailto:[email protected]>

On 11/16/2018 12:32 PM, Scorby, Gary wrote:
We have been using the login dialog that comes with pywin32 for over a decade.  
Works great.

[cid:[email protected]]

We have a client who until recently required a 4 character max user ID.  Now 
they want an option for up to a 19 character user ID.  I told them no problem, 
that should work.  One of their user decided to go for it and set their 
password to 19 characters on their server, then tried to log in via the login 
box.  They claimed only 14 characters will fit in the User ID entry window.  
Really?

So I ran some tests.  I held down the ‘a’ key for user ID and ‘b’ key for 
password.  Result:

('aa', 'b')

User ID – 14 characters
PW – 21 characters

Then I decided to go skinny and held the i key for both.  Result:

('ii', 'i')

User ID – 42 characters
PW – 21 characters

I’m a data mover and very seldom work with dialogs.  The restriction appears to 
be entry window size based on character width.  I assumed if there was any kind 
of a restriction it would be x number of characters.  I’ve looked at how I send 
could parameters to alter this behavior but don’t see anything.  Feel free to 
verbally abuse me if I’m missing the obvious, but can anyone tell me how to 
expand the number of characters I can send for a user ID?

Thank you

Gary

One thing that might be semi-obvious is that while you can _see_ a different 
number of characters depending on their size, it might not be the case that 
only 14 characters can be accepted in the box...  I'm speculating you just 
might have to scroll (with the cursor key) to see them all.  When you do the 
same character, that is not so obvious that there is scrolling going on. If you 
use different characters, I'm thinking you might see them scroll. Your user 
might have stopped because the end of the box was reached, and not tried to 
type the last 5 characters?

Anyway, something to think about and experiment with.  I've no idea if it is 
possible to make that dialog box wider, so that more characters can be seen.

Glenn
"FINASTRA" is the trade name of the FINASTRA group of companies. This email and 
any attachments have been scanned for known viruses using multiple scanners. 
This email message is intended for the named recipient only. It may be 
privileged and/or confidential. If you are not the named recipient of this 
email please notify us immediately and do not copy it or use it for any 
purpose, nor disclose its contents to any other person. This email does not 
constitute the commencement of legal relations between you and FINASTRA. Please 
refer to the executed contract between you and the relevant member of the 
FINASTRA group for the identity of the contracting party with which you are 
dealing.
___
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] Python 3.9 and win32ui.pyd

2020-05-21 Thread Scorby, Gary
I have a few extra hours this week so I installed the first beta of Python 3.9 
and added pywin32.  Trying to get an early look to see if we are going to make 
any major changes for the 3.9 release. Running on Windows 10.

Followed these steps:

Downloaded and installed the Python 3.9 beta.
pip pywin32
Ran the pywin32 post install script.
Added the path.

These are the same steps as when I do a fresh 3.8 install.  First thing I tried 
is starting pythonwin.exe, get this

[cid:[email protected]]

I've seen that in the past if I don't do the post install.  I tried starting up 
python.exe and importing win32ui.  Get this

Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed while importing win32ui: A dynamic link library 
(DLL) initialization routine failed.

I used Process Monitor to watch what is happening and there no problem finding 
and accessing win32ui.pyd.  Guessing something it needs isn't there, but I can 
identify what.  I've tried this on three different Win 10 machines with the 
same result.  Has anyone else run into this?

Thank you in advance.

Gary

"FINASTRA" is the trade name of the FINASTRA group of companies. This email and 
any attachments have been scanned for known viruses using multiple scanners. 
This email message is intended for the named recipient only. It may be 
privileged and/or confidential. If you are not the named recipient of this 
email please notify us immediately and do not copy it or use it for any 
purpose, nor disclose its contents to any other person. This email does not 
constitute the commencement of legal relations between you and FINASTRA. Please 
refer to the executed contract between you and the relevant member of the 
FINASTRA group for the identity of the contracting party with which you are 
dealing.
___
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] odbc under windows 7?

2011-01-22 Thread Gary L Smith
Dear Pythoners,

 

I need to access data in an MS Access 2003 database using Python 2.5 or 2.6
running in Windows7.  Windows7 doesn't seem to have appropriate drivers for
ODBC.  My error messages consistently contain the phrase, "Data source name
not found and no default driver specified."

 

While I see that others have run into the same problem, my web searches have
only deepened my confusion - questions are routinely answered with
suggestions that turn out to not work in Windows7.  

 

Suggestions such as SQL Alchemy or pyODBC don't solve the problem, because
it still boils down to the missing drivers. 

 

This is a volunteer effort, so even the Egenix product, mxODBC, at $69 is a
little much.

 

Are there suitable open-source codes to get at Access 2003 data in Windows7?
Please point me in a productive direction, or, it it's just not possible,
put me out of my misery.

 

Cheers, Gary Smith

___
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Python 3.11 and pywin32 304

2022-05-11 Thread Scorby, Gary via python-win32
I've looked to see if anyone else is having this issue.  I haven't found 
anything.  When trying to call a function in the interactive window I get what 
you see below.  Appears to be trying to access a deprecated method.  I'd like 
to start testing with 3.11.  The error occurs when I type the left parenthesis 
after the function name.  Is there actually a problem with pywin32, or with me? 
- Thanks, Gary


PythonWin 3.11.0b1 (main, May  7 2022, 22:58:47) [MSC v.1931 64 bit (AMD64)] on 
win32.
Portions Copyright 1994-2018 Mark Hammond - see 'Help/About PythonWin' for 
further copyright information.
>>> def biff(a, b):
...   print(a + b)
...
>>> biffFailed to format the args
Traceback (most recent call last):
  File "C:\Python311-64\Lib\site-packages\pythonwin\pywin\idle\CallTips.py", 
line 135, in get_arg_text
arg_getter = getattr(inspect, "getfullargspec", inspect.getargspec)
^^
AttributeError: module 'inspect' has no attribute 'getargspec'
"FINASTRA" is the trade name of the FINASTRA group of companies. This email and 
any attachments have been scanned for known viruses using multiple scanners. 
This email message is intended for the named recipient only. It may be 
privileged and/or confidential. If you are not the named recipient of this 
email please notify us immediately and do not copy it or use it for any 
purpose, nor disclose its contents to any other person. This email does not 
constitute the commencement of legal relations between you and FINASTRA. Please 
refer to the executed contract between you and the relevant member of the 
FINASTRA group for the identity of the contracting party with which you are 
dealing.
___
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] [EXT] [ANN] pywin32 build 305 released

2022-11-07 Thread Scorby, Gary via python-win32
The error I reported in 304 still exists in the interactive window for Python 
3.11.  Is this scheduled to be fixed?

Create the function below.  Goes bad when you try to call the function.

>>> def biff(x):
... x = x + 1
...
>>> biffFailed to format the args
Traceback (most recent call last):
  File "C:\Python311-32\Lib\site-packages\pythonwin\pywin\idle\CallTips.py", 
line 133, in get_arg_text
argText = inspect.formatargspec(*inspect.getfullargspec(fob))
  ^
AttributeError: module 'inspect' has no attribute 'formatargspec'
(

-Original Message-
From: python-win32  On 
Behalf Of Mark Hammond
Sent: Sunday, November 6, 2022 12:52 AM
To: [email protected]
Subject: [EXT] [python-win32] [ANN] pywin32 build 305 released

Hi all,
   I'm happy to announce the release of pywin32 build 305.

This release has quite a few changes under the hood, updating our use of older 
deprecated Python functions etc - so there's some risk of unintended 
consequences.

Another unintended change is that .exe installers are deprecated, because the 
upstream support for building them is deprecated. Anyone still using them 
should start moving to pip:

   python -m pip install --upgrade pywin32

But while .exe files exist:

   
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmhammond%2Fpywin32%2Freleases%2Ftag%2Fb305&data=05%7C01%7Cgary.scorby%40finastra.com%7Cbbed47aa19c84221edd208dabfcbe483%7C0b9b90da3fe1457ab340f1b67e1024fb%7C0%7C0%7C638033179682788914%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bOvV7xam09Bg4mv%2BdWZaJpTkXUBZR17CQtopv1r0Iyg%3D&reserved=0

For initial support (eg, to ask questions about the release etc), please 
contact this mailing-list ([email protected]).  If you want to report a 
bug, please do so at 
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmhammond%2Fpywin32%2Fissues&data=05%7C01%7Cgary.scorby%40finastra.com%7Cbbed47aa19c84221edd208dabfcbe483%7C0b9b90da3fe1457ab340f1b67e1024fb%7C0%7C0%7C638033179682788914%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YUvKzL024GAvhS7Vz5qx8ElfZC%2FB8I%2FO1S56jOoONR0%3D&reserved=0

As always, thanks to everyone who contributed to this release, both in terms of 
code and reporting bugs.

Cheers,

Mark.

Changes:

* Installation .exe files were deprecated.

* @kxrob put a lot of work towards removing use of the deprecated
   Unicode API so we can build on Python 3.12. This should be largely
   invisible, but please report any unintended consequences.

* odbc: Handle `varchar(max)`/`nvarchar(max)` column sizes (#1954)

* win32api.GetTickCount() now returns an unsigned 64bit integer (@kxrob,
   #1946)

* win32pipe.GetNamedPipeHandleState() now takes a 3rd optional param
   indicating whether the username should be returned, and related
   constants added. (@kxrob, #1946)

* Added win32gui.GetTopWindow() and win32gui.GetAncestor() (@CristiFati,
   #1928)

* Tweaks to how pywintypes searches for DLLs to better support
   virtualenvs created with --system-site-packages. (@saaketp, #1933)

* Added win32event.CreateWaitableTimerExW (#1945, @zar9003)

* Changes in PARAM handling. Some functions which returned a WPARAM or
   LPARAM allowed you to return a pointer to a Python buffer object or a
   PyUnicode. These functions now only accept a Python long to be
   returned. Note that this DOES NOT apply to functions with accept
   WPARAM or LPARAM as arguments, only when they are being returned.
   Impacted functions are `OnNotify` handler, LV_ITEM/TV_ITEM objects,
   PyIContextMenu3::HandleMenuMsg2, and the result of a WNDPROC/DLGPROC
   (#1927).

* service registration had an overhaul, avoiding a complicated, and
   ultimately unnecessary "single globally registered service runner"
   concept. Now, when registering a service, the host pythonservice.exe
   runner will be copied to `sys.exec_prefix`, along with possibly
   `pywintypesXX.dll` and run from there. (#1908)

* Dropped support for allowing a bytes object to be passed where a COM
   BSTR is expected - this support was accidental on the path from
   2.x->3.x.

* win32crypt's PyCERTSTORE.CertCloseStore()'s `Flags` argument has been
   deprecated as it is likely to crash the process if
   `CERT_CLOSE_STORE_FORCE_FLAG` is specified. The underlying function is
   now always called with `CERT_CLOSE_STORE_CHECK_FLAG`, and support for
   this param will be dropped at some point in the future.

* Fix a bug where win32crypt.CryptQueryObject() would return a
   PyCTL_CONTEXT object instead of a PyCERT_CONTEXT for base64 encoded
   certificates (#1859)

* win32crypt.CryptQueryObject() is now able to return PyCTL_CONTEXT
   objects. This is technically a breaking change as previously it would
   return the address in memory of the object, but this address wasn't
   practically usabl