[issue29876] Check for null return value [_elementtree.c : subelement]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, I think there is a bit similar to http://bugs.python.org/issue29874 (returns NULL when NoMemory) static PyObject* subelement(PyObject* self, PyObject* args, PyObject* kw) { PyObject* elem

[issue29874] Need a look for return value checking [selectmodule.c]

2017-03-21 Thread Alex CHEN
Changes by Alex CHEN <al...@sbrella.com>: -- type: -> crash ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29874> ___ ___

[issue29874] Need a look for return value checking [selectmodule.c]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file selectmodule.c our static code scanner has reported the following case, function set2list is liable to return NULL (if PyTuple_New failed), would any chance the NULL pointer be dereferenced (Py_DECREF(fdlist) after set2list) or it would just raise

[issue29873] Need a look for return value checking [_elementtree.c]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, but I don't sure that could be any problem, may you have a look? static PyObject* element_getattr(ElementObject* self, char* name) { PyObject* res; /* handle common attributes

[issue29682] Checks for null return value

2017-02-28 Thread Alex CHEN
New submission from Alex CHEN: Hi, Our tool reported a position that doesn't check for returned value (from a function that might returns null). might need a look that is there any problem or I am missing something. in function PyUnknownEncodingHandler of file pyexpat.c

Re: any one used moviepy please come in!!! I need help, thanks!

2017-01-25 Thread Tony Chen
On Wednesday, January 25, 2017 at 8:34:01 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 25, 2017 at 6:22 PM, Tony Chen <tonytonytony0...@gmail.com> wrote: > > This error can be due to the fact that ImageMagick is not installed on your > > computer, or (for Windows users) th

any one used moviepy please come in!!! I need help, thanks!

2017-01-24 Thread Tony Chen
I have to use moviepy in one of my project. So I downloaded it, and tried the example code on the website. It gives me this error. Anyone can give me some help? Thank you very much! it gives this error: [MoviePy] This command returned an error !Traceback (most recent call last): File

Re: pip install -r requirements.txt fails with Python 3.6 on Windows

2017-01-05 Thread Uri Even-Chen
are the reasons to upgrade Python to 3.6? Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.google.com/+urievenchen> <http://w

Re: Python for WEB-page !?

2017-01-05 Thread Uri Even-Chen
I recommend starting with Python 3, I also use it (3.5.2) for my Django projects - Speedy Net and Speedy Match. Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen>

Re: pip install -r requirements.txt fails with Python 3.6 on Windows 10

2017-01-03 Thread Uri Even-Chen
are the reasons to upgrade Python to 3.6? Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.google.com/+urievenchen> <http://www.linkedin.com

pip install -r requirements.txt fails with Python 3.6 on Windows 10

2017-01-03 Thread Uri Even-Chen
l-record.txt --single-version-externally-managed --compile --install-headers "c:\uri\speedy net\git\speedy-net [public]\.venv\include\site\python3.6\Pillow"" failed with error code 1 in C:\Users\Uri\AppData\Local\Temp\pip-build-3dj7ngjs\Pillow\ (.venv) C:\Uri\Speedy Net\Git\speedy-net

Re: ImportError: The ``fake-factory`` package is now called ``Faker``.

2016-12-22 Thread Uri Even-Chen
Thank you, I found out that pip freeze returned more packages than what we had in our requirements.txt file, so I upgraded them and added them to the file. I also upgraded to Faker==0.7.7 Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http

ImportError: The ``fake-factory`` package is now called ``Faker``.

2016-12-20 Thread Uri Even-Chen
w called ``Faker``. Please update your requirements. What is the problem? We didn't update our requirements recently. Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen>

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Colin David Chen
Colin David Chen added the comment: Ah, you're correct. The behavior is consistent if you use strings in both invocations. The Path conversion strips the final '\\'. Doc examples do use the names of directories rather than a Path object. I will close the issue. Thanks for the quick response

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Colin David Chen
Changes by Colin David Chen <maddu...@gmail.com>: -- title: os.walk generator vs -> os.walk generator giving inconsistent results ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28975] os.walk generator vs

2016-12-14 Thread Colin David Chen
New submission from Colin David Chen: os.walk in 3.6rc1 (Windows) appears to generate different output depending on its invocation. In the first invocation, I use the generator to yield one result at a time: source = "C:\\cdchen_data\\downloads\\python-xlib-0.18\\" texasranger = os

[issue28671] SSL server requesting client certificates should send CA list

2016-11-11 Thread Kevin Chen
New submission from Kevin Chen: When a Python HTTPS server requests client certificates, it should send a CA list so the client knows which certificates are acceptable. It looks like right now Python calls SSL_CTX_load_verify_locations, so once the client certificate is sent, Python can

Re: Free Python e-books from O'Reilly

2016-10-10 Thread Uri Even-Chen
I think it's good that so many free books are about Python, more than any other specific programming language. But I haven't read any of them yet. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.

Pyjs

2016-08-16 Thread Uri Even-Chen
ing on them it will set the input to a specific number, such as 2, 3, 4 or 900. And then the program will calculate the square root of this number. I also want to create another program which calculates e^x (default: x=1). The web app should be mobile-friendly. Thanks, Uri. *Uri Even-C

Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Uri Even-Chen
Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.google.com/+urievenchen> <http://www.linkedin.com/in/urievenchen> <http://twitter.com/urievenchen> O

Re: I'm looking for a part-time job in Python / Django

2016-08-15 Thread Uri Even-Chen
Thank you Chris! Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.google.com/+urievenchen> <http://www.linkedin.com/in/urievenchen> &

I'm looking for a part-time job in Python / Django

2016-08-14 Thread Uri Even-Chen
To python-list@python.org, I'm looking for a part-time job in Python / Django, do you know anything? I live in Herzliya, Israel. I can't relocate but I can work from home. You can see my CV on LinkedIn. Please let me know if you have any job for me. Thanks, Uri. *Uri Even-Chen* [image: photo

Re: Installing Python 3 on Windows

2016-08-02 Thread Uri Even-Chen
Thank you, repair worked! I already have py.ini and don't want to add shebangs, I have at least 50 Python files and I don't want to edit all of them. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <h

Re: Installing Python 3 on Windows

2016-08-02 Thread Uri Even-Chen
with the launcher? I read this http://stackoverflow.com/questions/5087831/how-should-i-set-default-python-version *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.

Re: Installing Python 3 on Windows

2016-08-02 Thread Uri Even-Chen
I don't understand. How do I use the Python Launcher? I didn't find such an option when installing Python 3. http://screencast.com/t/mBXfyMw4jpa http://screencast.com/t/FidjuB68aJ5G *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http

Installing Python 3 on Windows

2016-08-02 Thread Uri Even-Chen
installed - python-2.7.12.msi and python-3.5.2.exe >python --version Python 2.7.12 >assoc .py .py=Python.File >ftype Python.File Python.File="C:\Python27\python.exe" "%1" %* By the way, it there a way to print the Python version from Python? Thanks, Uri. *Uri Even-Chen

[issue27590] tarfile module next() method hides exceptions

2016-07-25 Thread Yujie Chen
Yujie Chen added the comment: I do want tarfile module to stop at the first invalid header. My question is why does tarfile module NOT throw exception about the error in header, instead it just hide it silently. -- ___ Python tracker <

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: Yeah, I just tried on Python3.5 and it didn't report any errors either. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: The other issue is http://bugs.python.org/issue16858 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
New submission from Yujie Chen: I have seen a similar ticket, however that was opened 2 years ago and has nothing more than a brief description. So I opened this new one here, hoping to get some answers. tarfile.TarFile object is iterable and has a next() method. next() will parse the header

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Zhihan Chen
Zhihan Chen added the comment: Oh I am really sorry for my carelessness. Please accept my apology. and thank you Steven, I will pay special attention to that. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27459] unintended changes occurs when dealing with list of list

2016-07-05 Thread Zhihan Chen
New submission from Zhihan Chen: When creating list of list with multiplication, changing one element of a list will result in changing all lists. -- components: Demos and Tools files: Screenshot from 2016-07-05 16-44-14.png messages: 269858 nosy: Zhihan Chen priority: normal severity

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Zhihan Chen
Changes by Zhihan Chen <hanschen.zhi...@gmail.com>: -- title: unintended changes occurs when dealing with list of list -> unintended changes occur when dealing with list of list ___ Python tracker <rep...@bugs.python.org> <http

Re: Operator precedence problem

2016-06-05 Thread Uri Even-Chen
My suggestion: Never write expressions, such as 2 ** 3 ** 2 or even 2 * 4 + 5, without parentheses. Always add parentheses - 2 ** (3 ** 2) (or (2 ** 3) **2) or (2 * 4) + 5 (or 2 * (4 + 5)). *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http

[issue26652] Cannot install Python 2.7.11 on Windows Server 2008 R2

2016-03-27 Thread Hung-Hsuan Chen
New submission from Hung-Hsuan Chen: I tried installing Python2.7.11 on a Virtual machine running Windows Server 2008 R2. However, I cannot complete the installation. I tried reboot the machine and re-install for a couple of times but got no luck. Here I attach the log file of "msiex

Re: python domain in China. This showed up on Python list

2016-03-10 Thread Uri Even-Chen
I don't register domain names in countries - any domain name which ends with 2 letters. If you want you can register my name in .cn or any other country, I don't care. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en

[issue26272] `zipfile.ZipFile` fails reading a file object in specific version(s)

2016-02-03 Thread Pengyu Chen
Pengyu Chen added the comment: Oh yes you're right Martin. Thanks for the notice :) (I've closed this ticket before seeing your reply) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26272] `zipfile.ZipFile` fails reading a file object in specific version(s)

2016-02-03 Thread Pengyu Chen
New submission from Pengyu Chen: When passing a file object to `zipfile.ZipFile` for reading it fails in Python 3.5.1 it fails. While the same code in Python 2.7.11 works. Also loading that specific file directly from file path works in Python 3.5.1. (Please see the sample testing code below

[issue26272] `zipfile.ZipFile` fails reading a file object in specific version(s)

2016-02-03 Thread Pengyu Chen
Pengyu Chen added the comment: Well I should have noticed that I wasn't using binary mode.. Sorry for the mistake. Closing the issue report. -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue25763] I cannot use absolute path in sqlite3 , python 2.7.9, windows

2015-11-29 Thread jingtao chen
New submission from jingtao chen: I tried the way like here https://www.sqlite.org/c3ref/open.html#urifilenamesinsqlite3open but it is useless what I got is C:\Users\CJT-6220>python D:\NKUSearch\pr_cal\main.py Traceback (most recent call last): File "D:\NKUSearch\pr_cal\main.py&

[issue25763] I cannot use absolute path in sqlite3 , python 2.7.9, windows

2015-11-29 Thread jingtao chen
jingtao chen added the comment: wow...It works... -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25763> ___ ___

Re: Encrypted web mail

2015-08-16 Thread Uri Even-Chen
Hi Dennis, On Sat, Aug 15, 2015 at 7:35 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sat, 15 Aug 2015 12:47:17 +0300, Uri Even-Chen u...@speedy.net declaimed the following: To Python, Django and Speedy Mail Software developers, Is it possible to make Speedy Mail encrypted? I

Encrypted web mail

2015-08-15 Thread Uri Even-Chen
to read my mail and it's similar to reading my thoughts. Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com/urievenchen http://plus.google.com/+urievenchen http://www.linkedin.com

Re: Encrypted web mail

2015-08-15 Thread Uri Even-Chen
. Anyway thanks for the feedback! Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com/urievenchen http://plus.google.com/+urievenchen http://www.linkedin.com/in/urievenchen http://twitter.com

Re: Encrypted web mail

2015-08-15 Thread Uri Even-Chen
Hi Michael, Thanks for the feedback. Actually the passwords on my webmail in 2000 to 2005 were not encrypted, but I agree with you that passwords should be always encrypted. Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http

Re: pyjs - a compiler from Python to JavaScript

2015-08-12 Thread Uri Even-Chen
Thank you Billy, we will consider using Brython. Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com/urievenchen http://plus.google.com/+urievenchen http://www.linkedin.com/in/urievenchen

Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
programming. And I don't mind if they use a compiler or an interpreter or any other method to run Python in the client side, as long as it works. But without using jQuery and other plugins it would be very hard to use these projects in production. Uri. *Uri Even-Chen* [image: photo] Phone: +972

Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
Thanks Fabio, it's very interesting. Are you related to Pyjeon Software? Do we have to pay to use RapydScript? Is it ready for production? *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com

Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
are developing (which will be free software open source). I'm looking forward to launching Speedy Mail as an alternative to Gmail. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com/urievenchen

pyjs - a compiler from Python to JavaScript

2015-08-10 Thread Uri Even-Chen
? And is it possible to use Django (in the client side) and JavaScript frameworks such as jQuery, jQuery UI and jQuery plugins together with pyjs? Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ http://www.facebook.com

A webpy Templetor question

2015-07-13 Thread yongzhi . chen
Hi all, I want to display/update several metrics in a normal page (not in a webpy form). These metrics got updated every minute and were stored in a log file. I prepared a function to open that log file then analyze the last several lines to collect them. I want these metrics got updated in

Python backreference replacing doesn't work as expected

2015-07-12 Thread Yonggang Chen
There are two named groups in my pattern: myFlag and id, I want to add one more myFlag immediately before group id. Here is my current code: ## code begin # i'm using Python 3.4.2 import re import os contents = b''' xdlg::xdlg(x_app* pApp, CWnd* pParent) : customized_dlg((UINT)0, pParent,

urllib2.urlopen error socket.error: [Errno 104] Connection reset by peer

2015-05-04 Thread Jia CHEN
/python2.7/socket.py, line 476, in readline data = self._sock.recv(self._rbufsize) socket.error: [Errno 104] Connection reset by peer Best, Jia CHEN-- https://mail.python.org/mailman/listinfo/python-list

Is there functions like the luaL_loadfile and luaL_loadbuffer in lua source to dump the lua scripts in Python's source?

2015-04-14 Thread zhihao chen
HI,I want to dump the python script when some application(android's app) use the python engine.they embedding python into its app. https://docs.python.org/2/extending/embedding.html I can dump the script from an app which use the lua engine through the luaL_loadbuffer or luaL_loadfile (just

how to parse sys.argv as dynamic parameters to another function?

2015-01-30 Thread Robert Chen
how to parse sys.argv as dynamic parameters to another function? fun(sys.argv) in perl, this is very easy. please help. -- https://mail.python.org/mailman/listinfo/python-list

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-03 Thread Bob Chen
Bob Chen added the comment: Is there any possibility that we encapsulate urllib.quote into httplib? Because many developers wouldn't know about this utility function. And as I mentioned above, they could have got an unicode url from anywhere inside python, like an API call, without being

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-03 Thread Bob Chen
Changes by Bob Chen 175818...@qq.com: Removed file: http://bugs.python.org/file36492/httplib.py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-03 Thread Bob Chen
Changes by Bob Chen 175818...@qq.com: Added file: http://bugs.python.org/file37592/httplib.py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2015-01-03 Thread Bob Chen
Bob Chen added the comment: How about this patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list mailing list

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-11-23 Thread Bob Chen
Bob Chen added the comment: Someone come and pick up this? It has been a long time... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-11-23 Thread Bob Chen
Changes by Bob Chen 175818...@qq.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list

Re: I need algorithm for my task

2014-11-06 Thread Darren Chen
Probably homework, you are a good man ! -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding help command description syntax - explanation needed

2014-11-06 Thread Darren Chen
在 2014年11月5日星期三UTC+8下午8时17分11秒,larry@gmail.com写道: On Wed, Nov 5, 2014 at 7:13 AM, Ivan Evstegneev webmailgro...@gmail.com wrote: Firtst of all thanks for reply. brackets [] means that the argument is optional. That's what I'm talking about (asking actually), where do you know it

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-09-16 Thread Bob Chen
Bob Chen added the comment: up... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-28 Thread Bob Chen
Changes by Bob Chen 175818...@qq.com: -- keywords: +patch Added file: http://bugs.python.org/file36492/httplib.py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-28 Thread Bob Chen
Bob Chen added the comment: This patch ensures the url not to be unicode, so the 'join' would not cause error when there is utf-8 string behind. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-23 Thread Bob Chen
Bob Chen added the comment: I personally suggest httplib convert the url and other elements to be string, at the begging of the class init. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-19 Thread Bob Chen
New submission from Bob Chen: Try to run these two script below, and you will understand what I'm talking about. If you specified an url and it happened to be an unicode string(which is quite common in python because python processes string as unicode and you could possibly get it from

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread YJ Chen
YJ Chen added the comment: Hi Raymond- Rob and I have a patch ready. We are figuring out how to upload/submit it. New to this... :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2014-06-22 Thread YJ Chen
Changes by YJ Chen chen.yanj...@gmail.com: -- nosy: +robertjli, yjchen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15045 ___ ___ Python-bugs

[issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet

2014-06-22 Thread YJ Chen
YJ Chen added the comment: Works for 3.4 and 3.5 but could not successfully run test on 2.7. Error: == FAIL: test_getsitepackages (test.test_site.HelperFunctionsTests

[issue20415] Could method isinstance take a list as parameter?

2014-01-28 Thread Chen ZHANG
New submission from Chen ZHANG: Since the usage of isinstance could be isinstance(1, (int, float)), I'm wondering why it doesn't accept [int, float], if I do so, it would raise TypeError saying arg 2 must be a type or tuple of types. What's the difference in effect between a tuple and a list

python2.6 epoll.modify failed to unregister events ?

2013-07-11 Thread Ziliang Chen
Hi Guys, I have encountered an epoll issues. On the server side, I use epoll.poll() to wait for events, when there is a socket which has EPOLLIN/EPOLLUP events, I first try to read the socket (I did this coz it says EPOLLIN ready, I might think it has some data in its recv queue). After

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign count to val, so val should NOT be

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign count to val, so val should NOT be

yield expression

2013-02-24 Thread Ziliang Chen
Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will assign count to val, so val should NOT be

Re: yield expression

2013-02-24 Thread Ziliang Chen
On Monday, February 25, 2013 8:51:28 AM UTC+8, Oscar Benjamin wrote: On 25 February 2013 00:39, Ziliang Chen wrote: Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's

Re: Exception in thread QueueFeederThread (most likely raised during interpreter shutdown)

2013-02-21 Thread Ziliang Chen
On Thursday, February 21, 2013 2:20:41 AM UTC+8, MRAB wrote: On 2013-02-20 08:26, Ziliang Chen wrote: Hi Guys, I am using the multiprocessing module. The following code snippet occasionally throws the Exception in thread QueueFeederThread (most likely raised during interpreter shutdown

Exception in thread QueueFeederThread (most likely raised during interpreter shutdown)

2013-02-20 Thread Ziliang Chen
Hi Guys, I am using the multiprocessing module. The following code snippet occasionally throws the Exception in thread QueueFeederThread (most likely raised during interpreter shutdown) exception. I searched google for the cause, someone says there are some issues with the

Re: Build and runtime dependencies

2012-12-21 Thread Chen Qi
? 2012?12?21? 06:11, Jack Silver ??: I have two Linux From Scratch machine. On the first one (the server), I want to build install python 3.3.0 in a shared filesystem and access it from the second one (the client). These machines are fairly minimal in term of the number of software

[issue15880] os.path.split() and long UNC names

2012-11-01 Thread Kevin Chen
Changes by Kevin Chen mr.kevin.chen...@gmail.com: -- nosy: +kevin.chen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15880 ___ ___ Python-bugs

Re: ctypes free memory which is allocated in C DLL

2012-10-27 Thread Ken Chen
On Saturday, October 27, 2012 10:56:54 PM UTC+8, Chris Angelico wrote: On Sun, Oct 28, 2012 at 1:42 AM, zlchen@gmail.com wrote: Hi Guys, I have a DLL which written in C language, one of the function is to allocate a structure, fill the members and then return the pointer of

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-21 Thread Kevin Chen
Kevin Chen added the comment: Okay just tried it. This is under Windows 7 x64. I created a .py file with read-only permission. When I import the .py module, the created .pyc doesn't have read-only permission. So it works as intended under Windows OS. As long as under posix system

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-20 Thread Kevin Chen
Kevin Chen added the comment: Hi Nick, Thank you so much for rolling out this change. I think your implementation of the fix is more elegant. I have learned a few things from you. I would love to keep helping to test/fix bugs for Python on Windows. Please contact me if there is anything you

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-08 Thread Kevin Chen
Kevin Chen added the comment: Hi Eric, I am happy to install Python 3.3 on Windows and help you test this. Can you please give me some ideas on what I need to do? Do I sync to the latest Python 3.3 branch and compile? Then run some unit-test code? Which test files should I run? What should

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-20 Thread Kevin Chen
Kevin Chen added the comment: Hi I made the following patch for this issue. It addresses the #2051 security bug. So the .pyc and .pyo files are created using the same permission as .py The MS_WINDOWS version will chmod the permission of .pyc and .pyo files to write accessible before deleting

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Kevin Chen added the comment: I propose a fix: static FILE * open_exclusive(char *filename, mode_t mode) { #if defined(O_EXCL)defined(O_CREAT)defined(O_WRONLY)defined(O_TRUNC) /* Use O_EXCL to avoid a race condition when another process tries to write the same file. When

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Kevin Chen added the comment: This is essentially the way things were done in version 2.5.4 of Python. The unlink() always succeeded, because the created .pyc file permission is always set to 0666 in the fd=open() function. This means the .pyc will never be created as read-only, and as long

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Changes by Kevin Chen mr.kevin.chen...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6074 ___ ___ Python-bugs-list

[issue504714] hasattr catches only AttributeError

2012-07-16 Thread Karl Chen
Karl Chen qu...@09e0.clgubaohtf.z.quarl.org added the comment: For the record, this was eventually fixed for Python 3.2. See http://bugs.python.org/issue9666. Adding this here because issue504714 comes up earlier than issue9666 in many web searches. -- nosy: +quarl

?????? how can I implement cd like shell in Python?

2012-06-28 Thread Alex chen
I just want to write a python program,it can be called in the linux terminal like the command cd to change the directory of the shell terminal -- -- ??: Dave Angeld...@davea.name; : 2012??6??28??(??) 8:12 ??: Alex

Re: how can I implement cd like shell in Python?

2012-06-28 Thread Alex chen
cd like shell in Python? On 6/28/2012 7:28, Alex chen wrote: I just want to write a python program,it can be called in the linux terminal like the command cd to change the directory of the shell terminal You can't do this; a program the shell runs cannot affect the shell's execution. What

Is PyIntBlocks are never returned to the system before shutdown right?

2012-04-26 Thread ZHONG Chen
PyIntBlocks are never returned to the system before shutdown I saw this comment in Python 2.6.8's source code: Objects/intobject.c line 25 But in the function PyInt_ClearFreeList() It will call PyMem_FREE(list) for empty int block. Why? -- myheimu 2012.4 School of Software, 2007, Tsinghua

Python 2.7 crashed during compilation on HP PA-RISC

2012-03-20 Thread Don Chen
Hello, I am compiling Python2.7 on a HP11i PA-RISC machine and received a segmentation fault. Platform Information uname -a = HP-UX hpdev2 B.11.11 U 9000/800 2280874925 unlimited-user license Steps 1) uncompress Python tgz file 2) run configure CC=aCC CXX=aCC 3) make Result:

[issue12970] os.walk() consider some symlinks as dirs instead of non-dirs

2012-02-06 Thread Sung-Yu Chen
Changes by Sung-Yu Chen eeso...@gmail.com: -- nosy: +Sung-Yu.Chen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12970 ___ ___ Python-bugs-list

[issue10910] pyport.h FreeBSD/Mac OS X fix causes errors in C++ compilation

2012-01-28 Thread Chen Huang
Chen Huang chi...@gmail.com added the comment: I am experiencing the same issue. Googled for a bit but couldn't find much with the error, then changed the search context, come across to this thread. In file included from /opt/local/include/boost/date_time/gregorian/parsers.hpp:13

[issue10910] pyport.h FreeBSD/Mac OS X fix causes errors in C++ compilation

2012-01-28 Thread Chen Huang
Chen Huang chi...@gmail.com added the comment: if I put #include cctype before boost/date_time, it solves my problem. And by the way, i can't seem to get to the point where boost/week_ptr.hpp causes the error. I tried to compile Nasos's upload test-boost-python. That codes works on my machine

[issue10910] pyport.h FreeBSD/Mac OS X fix causes errors in C++ compilation

2012-01-28 Thread Chen Huang
Chen Huang chi...@gmail.com added the comment: Nevermind, putting #include cctype doesn't help. I have to put python.h on top to get away this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10910

Re: Some problems refer to install 3rd party package of Python on mac OS 10.6.8

2011-08-29 Thread Gee Chen
On Aug 29, 9:14 am, Chris Rebert c...@rebertia.com wrote: On Sun, Aug 28, 2011 at 5:35 PM, Gee Chen cnche...@gmail.com wrote: -- the Python environment on my mac is: Python 2.6.4 (r264:75706, Aug 28 2011, 22:29:24) [GCC 4.2.1 (Apple Inc. build 5664

Some problems refer to install 3rd party package of Python on mac OS 10.6.8

2011-08-28 Thread Gee Chen
-- the Python environment on my mac is: Python 2.6.4 (r264:75706, Aug 28 2011, 22:29:24) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) Copyright (C) 2007 Free Software Foundation, Inc.

<    1   2   3   >