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
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
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/ct
PyScripter added the comment:
Is this on Ubuntu?
--
___
Python tracker
<https://bugs.python.org/issue38398>
___
___
Python-bugs-list mailing list
Unsubscribe:
PyScripter added the comment:
I meant PyUnicodeUCS4_FromWideChar PyUnicodeUCS2_FromWideChar.
--
___
Python tracker
<https://bugs.python.org/issue38398>
___
___
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
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, "
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
PyScripter added the comment:
Py_CompileStringFlags is not exported either.
--
___
Python tracker
<https://bugs.python.org/issue37633>
___
___
Python-bugs-list m
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 to
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
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
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
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.py
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
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.
To
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:
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 = r"c:\Temp\module1.py"
print(d.set_break(filename,1))
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 th
19 matches
Mail list logo