[nvda-addons] Re: Using external python modules

  • From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
  • To: <nvda-addons@xxxxxxxxxxxxx>
  • Date: Sun, 17 Jul 2016 22:10:48 +0530

Hi all,

I need to use the following module in my add-on.
win32com.server.register

I have used the add-on template. My add-on's *.py file is in
D:\progs\python\gesM\add-on\globalPlugins

Where should I put the win32com.server.register files? There is a package called
win32com which I have copied into 
D:\progs\python\gesM\add-on\globalPlugins  

Is this the right approach? 

Pranav
-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx [mailto:nvda-addons-bounce@xxxxxxxxxxxxx]
On Behalf Of James Teh
Sent: Monday, January 04, 2016 4:21 AM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Using external python modules

You don't need to include your own copy of subprocess. NVDA already bundles it.

If you want to include your own modules, you'll need to include them in a
different directory and tweak sys.path. We might have a better way to do this in
future, but it absolutely won't work unless you use the proper add-on layout.
Using %appdata%\nvda\globalPlugins is deprecated and will probably go away at
some point.

Jamie

On 25/12/2015 2:18 PM, Pranav Lal wrote:

Hi all,

I remain confused about how to use external modules from python in NVDA
add-ons.
I am using the subprocess module to find the process id of a process. 
I am still testing so the *.py file is in my 
C:\Users\user\AppData\Roaming\nvda\globalPlugins
Folder. Where should I copy subprocess.py and subprocess.pyc?
I have tried copying them to the
C:\Users\user\AppData\Roaming\nvda\globalPlugins folder but that has not
helped.
I put them in a subfolder called lib without success.

I also read
https://bitbucket.org/nvdaaddonteam/devguide/wiki/NVDA%20Add-on%20Deve
lopment%20
Guide
without success. By the way, the guide has been expanded and is 
extremely helpful because it contains examples of the things I am doing.

Pranav

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.

Community addons are available from: http://addons.nvda-project.org To ;
send a message to the list: nvda-addons@xxxxxxxxxxxxx To change your 
list settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

--
James Teh
Executive Director, NV Access Limited
Ph +61 7 3149 3306
www.nvaccess.org
Facebook: http://www.facebook.com/NVAccess
Twitter: @NVAccess
SIP: jamie@xxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.


Community addons are available from: http://addons.nvda-project.org To send a
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting 
bugs. 

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: 
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: