[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-10-17 Thread PyScripter
PyScripter added the comment: To Steve: I want the embedded venv to have the same sys.path as if you were running the venv python interpreter. So my method takes into account for instance the include-system-site-packages option in pyvenv.cfg. Also my method sets sys.prefix in the same

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-10-17 Thread PyScripter
PyScripter added the comment: Just in case this will be of help to anyone, I found a way to use venvs in embedded python. - You first need to Initialize python that is referred as home in pyvenv.cfg. - Then you execute the following script: import sys sys.executable = r"Path to the p

[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

2019-10-07 Thread PyScripter
PyScripter added the comment: >>> sys.version '2.7.16 (default, Oct 7 2019, 17:16:30) \n[GCC 7.4.0]' >>> ctypes.pythonapi.PyUnicodeUCS4_FromWideChar Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/ctypes/__ini

[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

2019-10-07 Thread PyScripter
PyScripter added the comment: Is this on Ubuntu? -- ___ Python tracker <https://bugs.python.org/issue38398> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

2019-10-07 Thread PyScripter
PyScripter added the comment: I meant PyUnicodeUCS4_FromWideChar PyUnicodeUCS2_FromWideChar. -- ___ Python tracker <https://bugs.python.org/issue38398> ___ ___

[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

2019-10-07 Thread PyScripter
PyScripter added the comment: To Victor: Neither of PyUnicodeUCS2_FromWideChar or PyUnicodeUCS4_FromWideChar is exported. >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") >>> hasattr(ctypes.pythonapi, "PyUnicodeUSC4_F

[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

2019-10-07 Thread PyScripter
New submission from PyScripter : As per title PyUnicode functions, such as PyUnicode_FromWideChar, are not exported on Ubuntu and possibly other Linux systems. This is a show stopper for embedded Python. To confirm: >>> import ctypes >>> hasattr(ctypes.pythonapi, "

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-09-20 Thread PyScripter
PyScripter added the comment: To Victor: So how does the implementation of PEP-587 help configure embedded python with venv? It would be great help to provide some minimal instructions. -- nosy: +pyscripter ___ Python tracker <ht

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-07-20 Thread PyScripter
PyScripter added the comment: Py_CompileStringFlags is not exported either. -- ___ Python tracker <https://bugs.python.org/issue37633> ___ ___ Python-bugs-list m

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-07-19 Thread PyScripter
New submission from PyScripter : Py_CompileString and PyParser_SimpleParseString and possibly other related functions are not exported in Python 3.8 b2 DLL. This is unintentional, not documented and unnecessarily breaks backward compatibility. Issue 37189 was similar and related

[issue37189] PyRun_String not exported in python38.dll

2019-06-16 Thread PyScripter
PyScripter added the comment: This does break PyScripter Python for Delphi as well. The question whether this change was intentional in which case it would need to be explained and documented, or accidental and will be reversed begs an answer. -- nosy: +pyscripter

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-04 Thread PyScripter
PyScripter added the comment: This issue is related (duplicate) to https://bugs.python.org/issue22213. It appears that there is a workaround but only for Linux using Py_SetProgramName. I wish that there was some similar way for Windows. -- nosy: +ncoghlan, pitrou

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-04 Thread PyScripter
PyScripter added the comment: "Personally, I am 100% against letting an embedded runtime automatically pick up any settings from the environment. You don't know where they came from." Why is that? When the embedding application is using Py_SetPythonHome there is clear int

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-03 Thread PyScripter
PyScripter added the comment: I don't see how pep-0582 is related to embedded python. The solution is to check for the presence of pyvenv.cfg in PYTHONHOME and set up the system.path accordingly. -- ___ Python tracker <https://bugs.python.

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-02 Thread PyScripter
PyScripter added the comment: Similar experience. I have found no way to get to use a venv as embedded Python in PyScripter. Tried Py_SetPythonhome, Py_SetPythonName, combinations... Nothing worked. -- nosy: +pyscripter ___ Python tracker

[issue2199] cPickle error with gtk GEnum classes

2008-02-28 Thread PyScripter
New submission from PyScripter: cPickle has problems loading instances of gtk gobject.GEnum classes. gobject.GEnum is a subclass of int. On the other hand pickle handles those classes correctly. Since cPickle is meant to be a faster version of pickle this needs to be consider a bug

[issue1685] linecache .updatecache fails on utf8 encoded files

2007-12-28 Thread PyScripter
PyScripter added the comment: To reproduce the error: a) Save the following file in utf-8 format as c:\temp\module1.py # -*- coding: utf-8 -*- print(ψ) b) Run the following script: import pdb d = pdb.Pdb() filename = rc:\Temp\module1.py print(d.set_break(filename,1)) Expected result None

[issue1685] linecache .updatecache fails on utf8 encoded files

2007-12-28 Thread PyScripter
PyScripter added the comment: Patch file attached Added file: http://bugs.python.org/file9034/linecache.py.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1685 __ linecache.py.patch Description: Binary data

[issue1685] linecache .updatecache fails on utf8 encoded files

2007-12-21 Thread PyScripter
New submission from PyScripter: linecache.updatecache works as follows after it finds a module name: fp = open(fullname, 'rU') lines = fp.readlines() fp.close() It then tries to detect a file encoding comment... The problem is that readlines fails with a UnicodeDecodeError if the file