Re: [python-win32] Python 3.11 and pywin32 304

2022-05-11 Thread Mark Hammond

On 12/05/2022 7:23 am, Scorby, Gary via python-win32 wrote:
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


Almost certainly with pythonwin - I opened 
https://github.com/mhammond/pywin32/issues/1877


Thanks,

Mark

___
python-win32 mailing list
python-win32@python.org
https://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
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Using win32com.shell to browse iphone photos | problem with pywebview

2022-05-11 Thread Tim Roberts

Bastian Schnitzler wrote:

I want to use win32com to transfer photos from my iphone to my
computer (I found a code snippet here, that worked for me:
https://gitlab.com/lassi.niemisto/iphone-photo-dump/).
In addition I would like to use pywebview to build a GUI.
...
It is the same, except that the folder for Apple iPhone is missing on
the second go.

Why is the shell behaving differently here? Is this a bug in win32com
or is pywebview influencing it somehow? What can I do to make it work?


Have you tried configuring your app to use a local web server? If you 
don't run your own server, then your pywebview app runs inside the 
browser's process, and that is a highly protected sandbox.  That's 
probably why you don't see external devices.


--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.



smime.p7s
Description: S/MIME Cryptographic Signature
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] Using win32com.shell to browse iphone photos | problem with pywebview

2022-05-11 Thread Bastian Schnitzler
Hello,

I want to use win32com to transfer photos from my iphone to my
computer (I found a code snippet here, that worked for me:
https://gitlab.com/lassi.niemisto/iphone-photo-dump/).
In addition I would like to use pywebview to build a GUI.

Behaviour of the shell listing the resource "My computer" is
unexpected when I access the win32com functions through pywebview as
it is not showing my iphone then.

Here is a minimal working example (you may have to replace the String
== "Dieser PC" according to the language of your windows):

from win32com.shell import shell, shellcon
from webview import create_window, start, windows

class Api():
def listFoldersDieserPC(self):

folder = shell.SHGetDesktopFolder()
for item in folder:
print("loop: ", folder.GetDisplayNameOf(item,
shellcon.SHGDN_NORMAL))
if folder.GetDisplayNameOf(item, shellcon.SHGDN_NORMAL) ==
"Dieser PC":
new_folder = folder.BindToObject(item, None,
shell.IID_IShellFolder)
break

# list folders in Dieser PC/This Computer
for item in new_folder:
print("loop: ", new_folder.GetDisplayNameOf(item,
shellcon.SHGDN_NORMAL))


api = Api()
window = create_window('Test', 'index.html', js_api=api, min_size=(600, 450))
api.listFoldersDieserPC()
print("now from the browser")
start()

With index.html:
List
Folders

The first time I call the function api.listFoldersDieserPC directly
from python, the second time through the button in the pywebview
browser window.

This is the output:

loop: Dieser PC
loop: Downloads
loop: Bilder
loop: Musik
loop: Desktop
loop: Dokumente
loop: Videos
loop: Apple iPhone
loop: Local Disk (C:)

now from the browser

loop: Dieser PC
loop: Downloads
loop: Bilder
loop: Musik
loop: Desktop
loop: Dokumente
loop: Videos
loop: Local Disk (C:)

Process finished with exit code 0

It is the same, except that the folder for Apple iPhone is missing on
the second go.

Why is the shell behaving differently here? Is this a bug in win32com
or is pywebview influencing it somehow? What can I do to make it work?

Kind regards
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32