New submission from wang :
when I use os.list the return value is like this:
['some.xml', '\ufeff9158.xml']
but the file name have not the '\ufeff'.
because this problem the script can't runing.
--
messages: 150252
nosy: guxianminer
priority: normal
wang added the comment:
only I double click the script file generate this problem.
in IDE not this problem.
--
___
Python tracker
<http://bugs.python.org/issue13
wang added the comment:
I mean in IDLE can run ok.
the '\ufeff' is still have.
--
___
Python tracker
<http://bugs.python.org/issue13662>
___
___
wang added the comment:
I mean in IDLE can run ok.
the '\ufeff' is still have.
--
___
Python tracker
<http://bugs.python.org/issue13662>
___
___
Changes by wang :
--
components: +Windows
___
Python tracker
<http://bugs.python.org/issue13662>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from wang :
import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when
embeded python in c++
--
components: Tkinter
messages: 80710
nosy: guxianminer
severity: normal
status: open
title: import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when
wang added the comment:
my compile is gcc 4.2.1
system is windows xp
some other library can be import.
such as:sys os
c++ code line:
Py_Initialize();
Py_SetProgramName(L"MyProgram");
module=PyImport_ImportModule("__main__");
moduledict=PyM
New submission from wang :
paltform is windows.
generate this bug:
within IDLE edtor.
first select some text.
second press down the shift key.
third press the end key.
fourth press the home key.
last IDLE quit with no message and document with no save.
--
components: IDLE
messages
wang added the comment:
thanks.
new version 3.2.2 have not this problem.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Change by jiahua wang :
--
keywords: +patch
nosy: +wangjiahua
nosy_count: 2.0 -> 3.0
pull_requests: +28885
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30687
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
nosy: +wangjiahua
nosy_count: 3.0 -> 4.0
pull_requests: +28927
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/30740
___
Python tracker
<https://bugs.python.org/i
New submission from jiahua wang :
https://www.iana.org/assignments/media-types/image/avif
--
components: Library (Lib)
messages: 411134
nosy: wangjiahua
priority: normal
severity: normal
status: open
title: Add mime type "image/avif"
versions: P
Change by jiahua wang :
--
keywords: +patch
pull_requests: +29010
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30823
___
Python tracker
<https://bugs.python.org/issu
New submission from jiahua wang :
Apparently there is no test for Calendar().iterweekdays().
wangdeMacBook-Pro :: ~/cpython » grep -R iterweekdays Lib/test/ *
Binary file Lib/test//__pycache__/test_calendar.cpython-311.pyc matches
Doc/library/calendar.rst: .. method:: iterweekdays()
Binary
Change by jiahua wang :
--
keywords: +patch
pull_requests: +29012
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30825
___
Python tracker
<https://bugs.python.org/issu
Change by jiahua wang :
--
nosy: +wangjiahua
nosy_count: 5.0 -> 6.0
pull_requests: +29028
pull_request: https://github.com/python/cpython/pull/30846
___
Python tracker
<https://bugs.python.org/issu
New submission from WANG Xuerui :
First of all I think the changes should probably go in main branch first, then
backported to the older branches if possible; although IMO you'd be much better
off just backporting and carrying the patch yourselves.
Secondly the suggested patch i
Change by jiahua wang :
--
keywords: +patch
nosy: +wangjiahua
nosy_count: 3.0 -> 4.0
pull_requests: +29159
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30980
___
Python tracker
<https://bugs.python.org/i
New submission from Wang Yanjin :
There is a file named "µTorrent.lnk" in the folder.
Here is the code:
#encoding=utf-8
import os
for i in os.listdir('.'):
print os.path.isfile(i), '\t', i
a = input()
and the output:
True3.py
False aμ汉字.
Wang Yanjin added the comment:
I encoutered this problem on Winxp sp3.
I have retested it on the win7, and it could return the correct value as it did
on linux.
--
___
Python tracker
<http://bugs.python.org/issue10
New submission from Zhigang Wang :
We only support arcname with one leading '/', but not more. This patch fixes it.
We don't support arcname with '..' well. The default behavior of unzip and 7z
is to ignore all '..'. This patch does the same.
Also updated t
Zhigang Wang added the comment:
$ unzip -l t.zip
Archive: t.zip
Length DateTimeName
- -- -
3 01-14-2011 21:11 ../foo
3 01-14-2011 21:11 foo
- ---
6 2 files
[zhigang
Zhigang Wang added the comment:
Yes, in zipfile, we just overwrite it. Actually, ZipFile.extract() overwrite
existing files already. If we want it more powerful, we can add a 'overwrite'
parameter. But turning zipfile a full featured zip/unzip tool needs much more
New submission from Kunshan Wang <[EMAIL PROTECTED]>:
I recently wrote a program making use of SimpleXMLRPCServer.
It has a function that responds to the caller according to the caller's
IP address. However the current SimpleXMLRPCServer does not allow me to
do this (directly).
New submission from Ray Wang <[EMAIL PROTECTED]>:
the Glossary's index number is 3, which should be 75,
so people could not navigate "Glossary" by clicking the title showed in
Table of Content, or index link which is beside the content in Evince.
--
assignee: ge
Ray Wang <[EMAIL PROTECTED]> added the comment:
hi, sorry for didn't present very clear.
> Which version of the Ref Manual is this supposed to be?
the newest python documentations, Release 2.6, October 2, 2008
> By Evince do you mean the Gnome document viewer?
> http://ww
New submission from Wang Chun :
Apple's official utilities had been dropped the word "Computer". We should
follow them.
imac:~$ cat test.py
__import__('plistlib').writePlist({}, 'test.plist')
imac:~$ python test.py
imac:~$ cat test.py
__import__('plis
Wang Chun added the comment:
plutil is a command shipped with every Mac. See the example in my original post.
--
___
Python tracker
<http://bugs.python.org/issue7
Ray Wang <[EMAIL PROTECTED]> added the comment:
any feedback here?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4027>
___
___
Python-bugs
Ray Wang <[EMAIL PROTECTED]> added the comment:
> We are all volunteers here, and I see three replies.
> This may or may not be trivial to fix, and may take some time.
> Python docs are written in rst format and translated by Sphinx to
> various formats. The main translat
Ray Wang <[EMAIL PROTECTED]> added the comment:
ah, thanks goodness, what a fortune that you are not ignoring this problem.
I expect the fix could be happen in the near future. :)
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Ray Wang <[EMAIL PROTECTED]> added the comment:
Woohoo, you are awesome, thanks a lot!
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4027>
___
Ray Wang <[EMAIL PROTECTED]> added the comment:
Thanks for your big efforts!
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4027>
___
__
Wang Chun <[EMAIL PROTECTED]> added the comment:
Ruby recently added support of millisecond and nanosecond to strftime.
This is their changeset:
http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731
To use the extended strftime, one can do:
>> Time.now.strftime(
New submission from Wang Chun <[EMAIL PROTECTED]>:
If "from __future__ import unicode_literals, print_function",
unicode_literals works, but not print_function;
If "from __future__ import print_function, unicode_literals",
print_function works, but not unicode_litera
Wang Chun <[EMAIL PROTECTED]> added the comment:
This issue remains unsolved in the latest python 3.0rc2+ subversion
repository as of 2008-11-13.
--
nosy: +wangchun
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Peter Wang <[EMAIL PROTECTED]>:
In the section "Removed Syntax", there is some ReST markup that leaked
through into the output:
"The only acceptable syntax for relative imports is from .``[*module*]
:keyword:`import` *name*; :keyword:`import` forms not
New submission from Peter Wang <[EMAIL PROTECTED]>:
In the "Library Changes" section, the next to last bullet point about
string.letters has leaked through some ReST markup into the final
output: ":data:string.letters`"
--
assignee: georg.brandl
components: Doc
New submission from Wang Chun <[EMAIL PROTECTED]>:
Consider the following program tmp.py:
import sys, getopt
print(getopt.getopt(sys.argv[1:], '', ['help']))
The program accept "--help" without a value:
python helloworld.py --help
But if someone invoke the
Changes by Wang Chun <[EMAIL PROTECTED]>:
--
keywords: +patch
Added file: http://bugs.python.org/file12325/getopt.py.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Wang Chun :
I created #4629 a couple of days ago. And besides that issue, for Python
3.x, I guess we can remove getopt.error since Python 3.x does not have to
backward compatible with Python 2.x. And another issue is, GetoptError
does not render right error message with
New submission from Wang Chun :
I created #4629 a couple of days ago. And besides that issue, for Python
3.x, I guess we can remove getopt.error since Python 3.x does not have to
backward compatible with Python 2.x. And another issue is, GetoptError
does not render right error message with
New submission from Javen Wang :
I encountered a very strange issue in file flush operation in Windows.
Here's the scenario of my application:
1. The main thread of my application will create makefiles sequentially.
2. Once a makefile is generated, launch a separate process ca
Javen Wang added the comment:
gagenellina,
My application is a little bit different from your test code. It won't
wait for the exit of new process and there're file writing operations
during makefile running. I changed the test code to be real
multi-process and tried many file si
Javen Wang added the comment:
The created files are on local drive. I saw the problem on the laptop
(XP-SP2), desktop(XP-SP3) and server (Win2003). But there's no such
problem on the Linux and Mac boxes.
I tried to use fopen/fwrite in my extension according to your
suggestion. The pr
Javen Wang added the comment:
There would be more chances to see the problem by doing this:
C:\test\edk2> python.exe C:\test\tools\Source\Python\build\build.py
-n 2 -p IntelFrameworkModulePkg\IntelFrameworkModulePkg.dsc -a IA32 -s
___
Python tracker
&l
Javen Wang added the comment:
Thank you very much for the trying. You might miss the step 4 in my
previous message. The step is:
C:\test\edk2> edksetup.bat
C:\test\edk2> set PYTHONPATH=C:\test\tools\Source\Python
C:\test\edk2> python.exe C:\test\tools\Source\Python\build\build.p
Javen Wang added the comment:
I agree multithread programming is kind of difficult and tricky. But I
don't think there's a race condition in _MultiThreadBuildPlatform
method, because I do have only one producer. And the consumer consumes
the product only when it's done (i.e. the
Javen Wang added the comment:
I narrowed down the root cause in the GIL of Python. I read the source
code of implementing os.fsync and found it's using
Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS to enclose the calling
of _commit() in order to be thread safe. I tried to add them in
Javen Wang added the comment:
I'm quite certain that the makefile is generated before the "make"
program is launched in separated process. Follow is the original code
where the makefile is created (line 14) and a task is put in queue (line
19). It's executed in the main
Javen Wang added the comment:
I did trace the order of file creation and process launch. It shows the
file is indeed created before the process launch.
I did another investigation. I added a new process, "cmd.exe /c copy
Makefile NewMakefile", to copy the the Makefile created, j
Javen Wang added the comment:
The test code and script which can reproduce the problem has been uploaded.
Added file: http://bugs.python.org/file12808/test_file_flush.py
___
Python tracker
<http://bugs.python.org/issue4
Javen Wang added the comment:
I'm using Python2.5 in which close_fds is not available in Windows. And
I cannot use Python2.6 because I need to redirect the stdout and stderr
and there's performance concern.
I have questions on the root cause:
a. why doesn't fopen() has sha
Javen Wang added the comment:
I don't have Python2.6 installed. I just have ever read a bench article
comparing the performance between different version of Python, including
2.5, 2.6 and 3.0. That article shows, for the same script, Python2.6 has
longer running time than Python2.
Change by jiahua wang :
--
nosy: +wangjiahua
nosy_count: 9.0 -> 10.0
pull_requests: +30229
pull_request: https://github.com/python/cpython/pull/32149
___
Python tracker
<https://bugs.python.org/issu
New submission from wang xuancong :
A very common use of defaultdict is that if the key exist, use the
corresponding mapped target, if the key does not exist, use the key itself.
However, current Python 2/3 defaultdict does not support parametric lambda
function:
>>> from collectio
wang xuancong added the comment:
I agree with Mark Amery.
The reason why defaultdict still exists given that everything can be achieved
by subclassing the built-in dict is because of convenience. I suggest maybe
Python developer can put it into low priority instead.
--
nosy
New submission from wang xuancong :
If I load a file which contains "\r" and "\n", I can find "\n", but not "\r".
This behaviour is inconsistent in Python 3, but consistent in Python 2.
>>> open('./3cjkxdnw/accessibilityLog/15701818
New submission from Ying Wang :
Hey,
I encountered an interesting bug when trying to do string parsing using
f-strings. I am currently under the impression that within the curly braces is
any expression that can be successfully evaluated in a REPL. Here's the error:
```bash
yin
Ying Wang added the comment:
Oh cool, I didn't know triple quotes can be used as part of f-strings! Thanks
for the explanation!
--
___
Python tracker
<https://bugs.python.org/is
New submission from wang xuancong :
In general, the ability to update local variables is very important and it
simplifies life tremendously. For example, in machine learning, it allows
saving/loading arbitrary-format datasets and arbitrary-structure neural
networks (NN) using a single line
wang xuancong added the comment:
Of course, I am aware of that. As elite-level Python programmers, we should all
be aware of security issues whenever we deal with exec() and eval().
--
___
Python tracker
<https://bugs.python.org/issue44
wang xuancong added the comment:
Thanks @terry.reedy for your expert-level good comments!
1.
"In Python 3, the one *implementation*, and its lookup mode, are fixed. The
slower implementation was dropped because it was not thought worth the bother."
If I remember correctly, the p
New submission from Michael Wang :
Ultimately it seems that deep recursion after setting the recursion limit
actually crashes python
--
components: Interpreter Core
files: bug.py
messages: 398619
nosy: michaeljwang10
priority: normal
severity: normal
status: open
title: Recursion
New submission from wang xuancong :
Different from Python 2, Python 3 has removed the capability to create a list
from a range. In Python 2, we can use range(1,100,2) to create a list [1, 3, 5,
..., 99], but in Python 3, we can only use list(range(1,100,2)) or
[*range(1,100,2)] where the
wang xuancong added the comment:
Another lazy explanation not wanting to improve anything
--
___
Python tracker
<https://bugs.python.org/issue44930>
___
___
New submission from Wang Bingchao <819576...@qq.com>:
I use python3.7 python3.6 python2.7, and run the following code:
print(3==3 is not True)
print(3==3 is True)
print(3==2 is not True)
print(3==2 is True)
I got the same results as follow:
True
False
False
False
but I don't th
Change by jiahua wang :
--
assignee: docs@python
components: Documentation
nosy: 180909, docs@python
priority: normal
pull_requests: 27191
severity: normal
status: open
title: Some links in the document is changed
versions: Python 3.11
___
Python
New submission from jiahua wang :
I input python -h on the command line, and I can't find any -R option.
--
assignee: docs@python
components: Documentation
messages: 405891
nosy: 180909, docs@python
priority: normal
severity: normal
status: open
title: python -h can't find
Change by jiahua wang :
--
keywords: +patch
nosy: +180909
nosy_count: 2.0 -> 3.0
pull_requests: +27714
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29460
___
Python tracker
<https://bugs.p
Change by jiahua wang :
--
keywords: +patch
nosy: +180909
nosy_count: 4.0 -> 5.0
pull_requests: +28049
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29817
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
keywords: +patch
nosy: +180909
nosy_count: 4.0 -> 5.0
pull_requests: +28052
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29820
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
nosy: +180909
nosy_count: 2.0 -> 3.0
pull_requests: +28054
pull_request: https://github.com/python/cpython/pull/29822
___
Python tracker
<https://bugs.python.org/issu
Change by jiahua wang :
--
nosy: +180909
nosy_count: 5.0 -> 6.0
pull_requests: +28055
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29823
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
keywords: +patch
nosy: +wangjiahua
nosy_count: 5.0 -> 6.0
pull_requests: +28061
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29830
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
keywords: +patch
nosy: +wangjiahua
nosy_count: 2.0 -> 3.0
pull_requests: +28074
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29845
___
Python tracker
<https://bugs.python.org/i
Change by jiahua wang :
--
nosy: +wangjiahua
nosy_count: 1.0 -> 2.0
pull_requests: +28088
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29861
___
Python tracker
<https://bugs.python.org/i
Mingye Wang added the comment:
b'\x80'.decode('cp936') is still broken on python 3.7. Working on a PR.
--
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bug
New submission from Mingye Wang :
Although there is no native UID type in Apple's XML format, Apple's
NSKeyedArchiver still works with it because it converts the UID to a dict of
{"CF$UID": int(some_uint64_val)}. Plistlib should do the same.
For a sample, see
https://gi
Change by Mingye Wang :
--
keywords: +patch
pull_requests: +17987
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18622
___
Python tracker
<https://bugs.python.org/issu
New submission from Wang Jie :
I referenced an Exception object in a function and found memory usage will
increase constantly in the accident. I think it may be a bug.
I wrote a minimal code to reproduce it.
```py
from threading import local, Thread
from time import sleep
l = {}
def t0
New submission from Mingye Wang :
Consider this interaction:
cmd> echo > 1.txt
cmd> python -c "__import__('os').truncate('1.txt', 1024 ** 3)"
cmd> fsutil sparse queryFlag 1.txt
Not only takes a long time as is typical for a zero-write, but also re
New submission from Clem Wang :
pyenv install 3.8.2
results in:
BUILD FAILED (OS X 10.15.3 using python-build 20180424)
Inspect or clean up the working tree at
/var/folders/jy/10md97xn3mz_x_b42l1r2r8cgp/T/python-build.20200313154805.37448
Results logged to
/var/folders/jy
Clem Wang added the comment:
Oops: forgot version numbers
MacOS Catalina (10.15.13 19D76)
2.6 Ghz 6-Code Intel i7
32 GB RAM
Homebrew 2.2.10
Homebrew/homebrew-core (git revision 58c0; last commit 2020-03-13)
Homebrew/homebrew-cask (git revision ab52c7; last commit 2020-03-14)
Not sure
New submission from Yanfeng Wang :
My environment:
system: MacOS 10.15.x
python: 3.9.0
when I inherit the BaseHTTPRequestHandler class, and call the
send_error(error_di, msg) method in my own class's do_GET override function:
the msg argument can't accept unicode string, an UnicodeE
keven wang added the comment:
Agree w/ PR here to remove resource tracker unlinking as a quick fix:
https://github.com/python/cpython/pull/15989
This will at least make the unlink behavior more controllable, which is not the
case currently (on mac and linux).
Would love to have this merged
New submission from Ziyi Wang :
Here are the two test cases: the one with FileIO.readall() fails
def testReadWithWritingMode(self):
r, w = os.pipe()
w = os.fdopen(w, "w")
w.write("hello")
w.close()
with io.FileIO(r, mode="w") as f:
New submission from Zhiming Wang :
I noticed that on Windows, socket operations like recv appear to always block
SIGINT until it's done, so if a recv hangs, Ctrl+C cannot interrupt the
program. (I'm a *nix developer investigating a behavioral problem of my program
on Windows,
wang zhao added the comment:
We managed to fixed on the server by following and got it sucuessfully compiled:
-./configure --with-system-ffi LDFLAGS="-L
/home/XXX/installs/libffi-3.3/lib64/" CPPFLAGS="-I
/home/XXX/installs/libffi-3.3/include/"
-LD_LIBRARY_PATH=$LD_LI
New submission from Zhiming Wang :
Since profile/cProfile CLI interface prints a sorted list of stats, using head
to limit output to the most relevant entries should be a fairly natural thing
to do. Unfortunately, BrokenPipeError isn't caught, causing quite a bit of
pollution to the o
Change by Zhiming Wang :
--
keywords: +patch
pull_requests: +21617
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22643
___
Python tracker
<https://bugs.python.org/issu
Change by Zhiming Wang :
--
nosy: +zmwangx
nosy_count: 5.0 -> 6.0
pull_requests: +21618
pull_request: https://github.com/python/cpython/pull/22643
___
Python tracker
<https://bugs.python.org/issu
New submission from Sean Wang :
ConfigParser failed to parse a utf-8 file with BOM bytes('\xef\xbb\xbf'),
it would raise ConfigParser.MissingSectionHeaderError.
I think that other files with BOM would have the same problem; because the
argument "SECTCRE" does not conside
New submission from David Wang :
If you call setLevel() on a subclass of logging.Logger, it does not reset the
cache for that logger. This mean that if you make some logging calls, then call
setLevel(), the logger still acts like it still has its old level. See the
attached python file for a
New submission from Sean Wang :
When an IPV4 URL with 'username:password' in it, and the password contains
special characters like #[]?, urlparse would act as unexcepted.
example:
urlparse('http://user:pass#?[w...@example.com:80/path')
--
components: Library (L
New submission from wang xuancong :
We all know that since:
[False, True, False].count(True) gives 1
eval('[False, True, False].count(True)') also gives 1.
However, in Python 2,
eval('[False, True, False].count(True)', {}, Counter()) gives 3, while
eval('[False
Xianbo Wang added the comment:
Python2 urlparse.urlparse and urllib2.urlparse.urlparse have a similar IPv6
hostname parsing bug.
>>> urlparse.urlparse('http://nevil.com[]').hostname
>>> 'evil.com['
This is less practical to exploit since the parsed do
New submission from winton Wang:
datetime stiptime error according to "%U" format.
Python version: 3.4.3, 2.7.13 ,3.6.0, 3.5.2
from datetime import datetime
input:
datetime.strptime('201726', '%Y%U')
output:
datetime.datetime(2007, 1, 1, 0, 0)
-
winton Wang added the comment:
the output:
datetime.datetime(2017, 1, 1, 0, 0)
I question about the week format if without the week of the weekday, the
datetime should be the fist day of week as the default?
--
___
Python tracker
<h
New submission from morris wang:
try... except... won't catch it.
import os
try:
os.startfile("")
except:
pass
crashes python, resulting in error message "python has stopped working"
--
messages: 297487
nosy: morris wang
priority: normal
severity:
1 - 100 of 217 matches
Mail list logo