Python Forum
Linking with multiple python libraries
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linking with multiple python libraries
#1
I have a somewhat esoteric question, but hopefully someone with knowledge of the Python internals (CPython in particular) can answer this.

I'm working in a very large codebase, developed by a very large company, in which many "apps" which are developed independently by teams in different groups and different brands of the company will all run inside a single process space and a single main thread. Only one app at a time, but the user can switch between them. There is an existing app which is embedding python 2.7, and my team also is developing an app which will embed some version of python 3.

I'm looking primarily at Windows here, but I may face the same issue in Unix.

What will happen if two different versions of python are embedded and initialized within the same process? Will they conflict? Will they use different GILs? Is the GIL or any other resource acquired by name, where the two libs will interfere with each other?

Ideally, and moving forward with the new code my team is developing, the initialization of python will be managed globally and each app will obtain a sub-interpreter. But I don't think I can modify the existing code which uses 2.7 and a single interpreter.

Thanks in advance, I greatly appreciate any thoughts (aside from restructuring the company)!
Reply


Messages In This Thread
Linking with multiple python libraries - by poijuggler - Oct-13-2017, 01:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python convert multiple files to multiple lists MCL169 6 1,694 Nov-25-2023, 05:31 AM
Last Post: Iqratech
  Adding libraries to embedded Python as a ZIP The_Oman 0 1,297 May-05-2023, 04:05 PM
Last Post: The_Oman
  Python script with local libraries zazas321 0 1,018 Jul-05-2022, 04:55 AM
Last Post: zazas321
  error in Linking two coroutines shankar 3 5,673 Jun-19-2020, 06:50 PM
Last Post: gogawaleankita
  linking with excel mhmdbarazi 1 2,092 Apr-23-2020, 04:18 AM
Last Post: buran
  Linking python to Google Sheets Charliefish1311 1 2,348 Jul-09-2019, 12:31 AM
Last Post: micseydel
  Installing Python and pointing it to required libraries hooiberg 2 4,378 May-13-2019, 05:55 PM
Last Post: ebolisa
  Package python script which has different libraries as a single executable or script tej7gandhi 1 2,672 May-11-2019, 08:12 PM
Last Post: keames
  Libraries needed for python install? burvil 7 20,304 Oct-18-2017, 04:55 AM
Last Post: burvil
  Adding libraries to Python 3.6.2 embedded hynek_compelson 1 4,869 Aug-10-2017, 09:01 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020