Re: Best way to go about embedding python

2016-11-13 Thread Michael Torrie
On 11/13/2016 08:40 PM, Kaylen Wheeler wrote: > I wonder if Lua would be a better option. Does it suffer from the > same sandboxing issues that python does? Lua was designed for this sort of thing and it can be secured and sandboxed. -- https://mail.python.org/mailman/listinfo/python-list

[issue26934] android: test_faulthandler fails

2016-11-13 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- status: open -> closed ___ Python tracker ___ ___

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Perhaps I shouldn’t have mentioned “del gen”. That was meant to represent the garbage collector running and calling gen.__del__() or equivalent. Basically what I was trying to say is I think there will be two classes of generators: 1. Simple generators just

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-13 Thread STINNER Victor
STINNER Victor added the comment: > del gen # Like deleting a plain iterator; no ResourceWarning expected Hum, wait, I'm not sure that I got the whole point of this issue. If the generator uses "with obj:", "del gen" will not call obj.__exit__(). Do you consider that "del gen" is better to

[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-11-13 Thread Martin Panter
Martin Panter added the comment: I committed your patches for 3.5+ and 2.7. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28016] test_fileio fails on AIX

2016-11-13 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7 ___ Python tracker

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-13 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file45480/_PyUnicode_EqualToId_v2.patch ___ Python tracker ___

Re: if iter(iterator) is iterator

2016-11-13 Thread eryk sun
On Mon, Nov 14, 2016 at 6:25 AM, Serhiy Storchaka wrote: > On 14.11.16 02:40, Steve D'Aprano wrote: >> >> I'm surprised that the inspect module doesn't appear to have isiterable >> and isiterator functions. Here's my first attempt at both: > > Just use isinstance() with

Re: if iter(iterator) is iterator

2016-11-13 Thread Serhiy Storchaka
On 14.11.16 02:40, Steve D'Aprano wrote: I'm surprised that the inspect module doesn't appear to have isiterable and isiterator functions. Here's my first attempt at both: Just use isinstance() with collections ABC classes. -- https://mail.python.org/mailman/listinfo/python-list

Re: if iter(iterator) is iterator

2016-11-13 Thread Steven D'Aprano
On Monday 14 November 2016 16:04, Chris Angelico wrote: > True, but ISTR there being a possibility that __iter__ could raise to > indicate that this isn't actually iterable. Maybe I'm recalling wrong. If __iter__ raises, that's a bug :-) Raising an exception from __iter__ appears to just fall

[issue28595] shlex.shlex should not augment wordchars

2016-11-13 Thread Evan
Evan added the comment: I have some additional concerns with the changes introduced in http://bugs.python.org/issue1521950: 1. The fact that posix defaults to False in shlex.shlex (but not in shlex.split) is a huge beginner trap. If users are expecting to use this for "compatibility with the

Re: Access to the caller's globals, not your own

2016-11-13 Thread eryk sun
On Mon, Nov 14, 2016 at 5:20 AM, Steven D'Aprano wrote: > but what magic do I need? globals() is no good, because it returns the > library's global namespace, not the caller's. > > Any solution ought to work for CPython, IronPython and Jython, at a minimum.

[issue27050] Demote run() below the high level APIs in subprocess docs

2016-11-13 Thread Thomas Kluyver
Thomas Kluyver added the comment: I still feel that having one function with various options is easier to explain than three separate functions with awkward names and limited use cases (e.g. no capturing output without checking the exit code). The tweeter you replied to said he didn't like

[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7598e65a924e by Martin Panter in branch '3.5': Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT https://hg.python.org/cpython/rev/7598e65a924e New changeset 77cb8fa47138 by Martin Panter in branch '2.7': Issue #28000: Fix

[issue28016] test_fileio fails on AIX

2016-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2ba15f05ed1 by Martin Panter in branch '3.5': Issue #28016: Skip /dev/tty seekable() test on AIX https://hg.python.org/cpython/rev/a2ba15f05ed1 New changeset b1f99e09bd77 by Martin Panter in branch '2.7': Issue #28016: Skip /dev/tty seekable()

Access to the caller's globals, not your own

2016-11-13 Thread Steven D'Aprano
Suppose I have a library function that reads a global configuration setting: # Toy example SPAMIFY = True def make_spam(n): if SPAMIFY: return "spam"*n else: return "ham"*n Don't tell me to make SPAMIFY a parameter of the function. I know that. That's what I would

Re: Best way to go about embedding python

2016-11-13 Thread Gregory Ewing
Michael Torrie wrote: And such bindings may need to be two-way. For example in Python code you may want to instantiate some new instance of game object, and you'll need to make sure that the wrapper code will create the appropriate in-game object. Another thing that can be tricky about this is

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-13 Thread Xiang Zhang
Xiang Zhang added the comment: > The name _PyUnicode_CompareWithIdEqual looks too long to me. What about > _PyUnicode_EqualToId? +1. I think this name is more clear. Serhiy's idea on the implementation sounds good. As for _PyUnicode_FROM_ID, I think it's better for another issue. --

[issue27050] Demote run() below the high level APIs in subprocess docs

2016-11-13 Thread Nick Coghlan
Nick Coghlan added the comment: The introduction of run() and its presentation as the preferred interface has effectively reversed much of the progress that had been made in actually making the subprocess module approachable for the simplest use cases like

Re: if iter(iterator) is iterator

2016-11-13 Thread Chris Angelico
On Mon, Nov 14, 2016 at 3:54 PM, Steven D'Aprano wrote: >> Any particular reason to write it that way, rather than: >> >> def isiterable(obj): >> try: >> iter(obj) >> return True >> except TypeError: >> return False > > > class

Re: Making stl files with python for 3d printing

2016-11-13 Thread Gregory Ewing
Poul Riis wrote: However, when sending the .stl file produced to a 3D-printer the vase comes out as a filled solid - no room for water and flowers! My guess is that you have a problem with the orientation of your faces. The inner surface needs to have its triangles oriented so that their

Re: if iter(iterator) is iterator

2016-11-13 Thread Steven D'Aprano
On Monday 14 November 2016 11:59, Chris Angelico wrote: > On Mon, Nov 14, 2016 at 11:40 AM, Steve D'Aprano > wrote: >> def isiterable(obj): >> """Return True if obj is an iterable, and False otherwise. >> >> Iterable objects can be iterated over, and they

Re: Best way to go about embedding python

2016-11-13 Thread Kaylen Wheeler
I wonder if Lua would be a better option. Does it suffer from the same sandboxing issues that python does? On Sunday, 13 November 2016 17:38:23 UTC-8, Nathan Ernst wrote: > In regards to performance of Lua vs Python, I don't have enough (near zero > experience) with Lua to comment there. > >

[issue14119] Ability to adjust queue size in Executors

2016-11-13 Thread Vinay Anantharaman
Vinay Anantharaman added the comment: I did a code reading myself and I noticed that task_done is not called as well. Is there a reason? -- nosy: +Vinay Anantharaman ___ Python tracker

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-13 Thread Martin Panter
Martin Panter added the comment: This would be hard to get right, but maybe not impossible. If the frame is suspended, and will do special handling of GeneratorExit, a ResourceWarning would be nice in most cases. But if the frame will not catch any exception, there should be no

help on "from deen import *" vs. "import deen"

2016-11-13 Thread jfong
Running the following codes (deen.py) under Win32 python 3.4.4 terminal: tbli = [0x66, 0x27, 0xD0] tblm = [0 for x in range(3)] def gpa(data): td = data ^ tblm[2] return td I can get a correct answer this way: >>> import deen >>> deen.tblm = deen.tbli >>> deen.gpa(0x7d) 173 # 0xad (=

[issue24339] iso6937 encoding missing

2016-11-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-11-13 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___

[issue8840] truncate() semantics changed in 3.1.2

2016-11-13 Thread Martin Panter
Martin Panter added the comment: In general I agree with the doc strings giving the main details, and leaving smaller details for the reference documentation. Maybe for concrete implementations like BytesIO, it is not worth saying the expanded contents are undefined. One other way to make

Re: Best way to go about embedding python

2016-11-13 Thread Nathan Ernst
In regards to performance of Lua vs Python, I don't have enough (near zero experience) with Lua to comment there. But in regards to embedding in a game, the only experience I have w/ Python being embedded is while working on modding Civilization IV. What I saw there just made me nauseous. The

Re: Best way to go about embedding python

2016-11-13 Thread Michael Torrie
On 11/13/2016 12:10 AM, kfjwhee...@gmail.com wrote: > 2. How would I go about including python scripts to run with the > engine. Would the .py files from the standard libraries be > necessary, or is anything built in? It's usually just a matter of asking the python instance to load and run the

[issue23839] Clear caches after every test

2016-11-13 Thread Martin Panter
Martin Panter added the comment: When I run the tests with -Werror (or any other -W option), I now get 2 tests altered the execution environment: test___all__ test_warnings -- nosy: +martin.panter ___ Python tracker

Re: Best way to go about embedding python

2016-11-13 Thread Chris Angelico
On Mon, Nov 14, 2016 at 11:40 AM, Steve D'Aprano wrote: > On Mon, 14 Nov 2016 12:23 am, Chris Angelico wrote: > >> Python without its stdlib is a disappointingly featureless >> language :) > > > I don't think that's true. You can do a lot in Python without any imports

Re: if iter(iterator) is iterator

2016-11-13 Thread Chris Angelico
On Mon, Nov 14, 2016 at 11:40 AM, Steve D'Aprano wrote: > def isiterable(obj): > """Return True if obj is an iterable, and False otherwise. > > Iterable objects can be iterated over, and they provide either > an __iter__ method or a __getitem__ method. > >

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-11-13 Thread Joshua Jay Herman
Joshua Jay Herman added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Best way to go about embedding python

2016-11-13 Thread Steve D'Aprano
On Mon, 14 Nov 2016 12:23 am, Chris Angelico wrote: > Python without its stdlib is a disappointingly featureless > language :) I don't think that's true. You can do a lot in Python without any imports in your code: - basic string processing - BigNum (int) and float arithmetic - lists and

Re: if iter(iterator) is iterator

2016-11-13 Thread Steve D'Aprano
On Mon, 14 Nov 2016 07:02 am, Antoon Pardon wrote: > > Some time ago I read a text or saw a video on iterators and one thing > I remember from it, is that you should do something like the following > when working with iterators, to avoid some pitt falls. > > def bar(iterator): > if

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Thanks Lewis -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4aca14dbb66d by Martin Panter in branch '3.5': Issue #28678: Fix references to numeric_owner parameter https://hg.python.org/cpython/rev/4aca14dbb66d New changeset 5efa1a39ee59 by Martin Panter in branch '3.6': Issue #28678: Merge parameter name

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-13 Thread Elliot Gorokhovsky
Changes by Elliot Gorokhovsky : -- nosy: +tim.peters ___ Python tracker ___ ___

Making stl files with python for 3d printing

2016-11-13 Thread Poul Riis
Below you can find my python code to make a vase for 3D-printing. The vase looks nice on my screen so the vertices and the faces seem to be perfect. However, when sending the .stl file produced to a 3D-printer the vase comes out as a filled solid - no room for water and flowers! I have tried to

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Actually I'm with Raymond -- I'm also not sure or mildly against (-0). Given how easy it is to do without and how cumbersome using the operator module is I don't see a great benefit. (IMO the operator module should be the measure of *last* resort -- it is not

[issue24339] iso6937 encoding missing

2016-11-13 Thread Julien
Julien added the comment: Hi John, thanks for your contribution, Looks like your implementation is missing some codepoints, like "\t": >>> print("\t".encode(encoding='iso6937')) [...]

Re: if iter(iterator) is iterator

2016-11-13 Thread Chris Angelico
On Mon, Nov 14, 2016 at 8:57 AM, Gregory Ewing wrote: > Antoon Pardon wrote: > >> def bar(iterator): >> if iter(iterator) is iterator: >> ... > > > That's a way of finding out whether you can safely iterate > over something more than once. If the object is

Re: Halp in if

2016-11-13 Thread Erik
Hi, On 13/11/16 20:09, menta...@gmail.com wrote: HI want to make a script that if somthing happens, it stop, and if it doesnt, it couninues. I dont finding a smart way. Read the documentation for the "while", "break" and "continue" keywords. Regards, E. --

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-13 Thread Martin Panter
Martin Panter added the comment: The offending commit is revision 6b70f16d585a. The true name is numeric_owner; numeric_only is wrong. The name also needs fixing in Doc/whatsnew/3.5.rst. -- nosy: +martin.panter ___ Python tracker

Re: if iter(iterator) is iterator

2016-11-13 Thread Gregory Ewing
Antoon Pardon wrote: def bar(iterator): if iter(iterator) is iterator: ... That's a way of finding out whether you can safely iterate over something more than once. If the object is already an iterator, applying iter() to it will return the same object, and iterating over it will

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-13 Thread Elliot Gorokhovsky
New submission from Elliot Gorokhovsky: When python compares two objects, there are many safety checks that have to be performed before the actual comparison can take place. These include checking the types of the two objects, as well as checking various type-specific properties, like

[issue28646] Using a read-only buffer.

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Issue 11427 has some discussion about this. It seems one concern was to make it hard to modify the buffer of a bytes object (which is supposed to be immutable). But I agree there should be an easy way to access read-only buffers in ctypes. Perhaps that could

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Maybe then it makes sense to apply this to 3.7? It looks like most people are in favour of this (also on python-ideas), only Raymond is not sure/mildly against. -- ___ Python tracker

[issue26934] android: test_faulthandler fails

2016-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2639afcedaad by Xavier de Gaye in branch '3.6': Issue #26934: Handle _ANDROID_API_LEVEL is None on Windows https://hg.python.org/cpython/rev/2639afcedaad New changeset 4012e28539c4 by Xavier de Gaye in branch 'default': Issue #26934: Merge 3.6

[issue28684] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2016-11-13 Thread Xavier de Gaye
New submission from Xavier de Gaye: Tests in test_asyncio fail on Android when bind() on a unix socket raises PermissionError for a non-root user. See the attached test_asyncio.log. See also issue 28683 and its patch(es). -- components: Tests, asyncio files: test_asyncio.log messages:

[issue26934] android: test_faulthandler fails

2016-11-13 Thread SilentGhost
SilentGhost added the comment: Buildbots fail since _ANDROID_API_LEVEL could end up being None -- nosy: +SilentGhost status: closed -> open ___ Python tracker

Re: if iter(iterator) is iterator

2016-11-13 Thread Chris Angelico
On Mon, Nov 14, 2016 at 7:02 AM, Antoon Pardon wrote: > Some time ago I read a text or saw a video on iterators and one thing > I remember from it, is that you should do something like the following > when working with iterators, to avoid some pitt falls. > > def

[issue26934] android: test_faulthandler fails

2016-11-13 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26934] android: test_faulthandler fails

2016-11-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset f37ac1a003f3 in branch 3.6. New changeset 892f13827219 in branch default. -- ___ Python tracker ___

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2016-11-13 Thread Julien
Julien added the comment: `daemon` flag cannot be changed after thread is started, the documentation is right and the code of the daemon setter is actually: if self._started.is_set(): raise RuntimeError("cannot set daemon status of active thread") But still it looks like a code

[issue26934] android: test_faulthandler fails

2016-11-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66aac9676a28 by Xavier de Gaye in branch 'default': Issue #26934: Fix test_faulthandler on Android where raise() exits with 0, https://hg.python.org/cpython/rev/66aac9676a28 -- nosy: +python-dev ___

Halp in if

2016-11-13 Thread menta231
Hii there I am preety New at python, and i need your help. I want to make a script that if somthing happens, it stop, and if it doesnt, it couninues. I dont finding a smart way. Here is what i wrote. I want to do it without exits and sleeps. import time print ("hello there ") x = raw_input

if iter(iterator) is iterator

2016-11-13 Thread Antoon Pardon
Some time ago I read a text or saw a video on iterators and one thing I remember from it, is that you should do something like the following when working with iterators, to avoid some pitt falls. def bar(iterator): if iter(iterator) is iterator: ... However I can't relocate it and

pytest 3.0.4 released

2016-11-13 Thread Bruno Oliveira
Hi all, pytest 3.0.4 has just been released to PyPI. This release fixes some regressions and bugs reported in the last version, being a drop-in replacement. To upgrade:: pip install --upgrade pytest The changelog is available at http://doc.pytest.org/en/latest/changelog.html . Thanks to all

[issue28683] bind() on a unix socket raises PermissionError on Android for a non-root user

2016-11-13 Thread Xavier de Gaye
New submission from Xavier de Gaye: Tests in test_socket and test_asyncore fail on Android when bind() on a unix socket raises PermissionError for a non-root user. This occurs also in test_asyncio and this is logged in a separate issue as asyncio has its own project. Patch attached.

[issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute"

2016-11-13 Thread Viorel Tabara
Viorel Tabara added the comment: David, that sounds clear enough to me, thanks. However, English isn't my first language so I can't comment on the grammatical subtleties. -- ___ Python tracker

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Ned Deily
Ned Deily added the comment: I don't think this is appropriate for 3.6 now. We're a little more than 4 weeks from the final release - way past the feature code cut-off - and, from the comments here, there is no longer a total consensus that this feature should go back in at all after being

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: operator_subscript_norefleak_v2.patch LGTM. Waiting for Ned's decision about 3.6. -- assignee: -> ned.deily priority: normal -> release blocker stage: patch review -> commit review versions: +Python 3.6 ___

[issue28681] About function renaming in the tutorial

2016-11-13 Thread R. David Murray
R. David Murray added the comment: I would rewrite that paragraph as follows: A function definition associates the function name with the function object in the current symbol table. The interpreter recognizes the object pointed to by that name as a user-defined function. Other

[issue28635] Update What's New for 3.6

2016-11-13 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: Patch with updates attached. Thanks for the feedback guys! -- Added file: http://bugs.python.org/file45474/0001-Issue-28635-what-s-new-in-3.6-add-a-few-more-notes-o.patch ___ Python tracker

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Serhiy, thank you for review! Here is a corrected patch. -- Added file: http://bugs.python.org/file45473/operator_subscript_norefleak_v2.patch ___ Python tracker

[issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute"

2016-11-13 Thread R. David Murray
R. David Murray added the comment: "instance parent class" is not terminology used in our docs as far as I remember. "instance's class" would be more in line with the other docs. That would solve the pronoun reference problem more succinctly, I think. How about this version, which also

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is not just about readability or performance. It is about correctness, since none of callers check for failure of _PyUnicode_CompareWithId. I just came to the same problem from other side (replacing PyUnicode_CompareWithASCII with

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: The patch is small and it was initially applied before 3.6b1, I think we should ask Ned (added to nosy) if this is OK to apply the fixed version? -- nosy: +ned.deily ___ Python tracker

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: So we now have the refleak fixed. Can we apply the patch? Or is it too late for 3.6? -- nosy: +gvanrossum ___ Python tracker

Re: how to print variable few time?

2016-11-13 Thread Jussi Piitulainen
andy writes: > Sat, 12 Nov 2016 04:58:20 -0800 wrote guy asor: > >> hello! >> >> this is my code: >> >> word=raw_input() >> print word*3 >> >> >> with this code im getting - wordwordword. >> what changes i need to make to get - word word word - instead? >> >> thanks > > using python3.x: > >

[issue28635] Update What's New for 3.6

2016-11-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thank you Yury and Elvis for working on this! I have few more suggestions for What's New: * collections.abc.Reversible (http://bugs.python.org/issue25987). * various ABCs in collections.abc now have means for explicit "anti-registration" by setting a

Re: how to print variable few time?

2016-11-13 Thread andy
Sun, 13 Nov 2016 15:12:01 +0100 wrote andy: > word=input() > print((word+' ')*2, end='') > print(word) > > ..but D'Apranos ' '.join(..) is far more elegant. don't know whether I really would use this form, but it works in python3: word = ' '.join([input()]*3) print(word) --

Re: how to print variable few time?

2016-11-13 Thread andy
Sat, 12 Nov 2016 04:58:20 -0800 wrote guy asor: > hello! > > this is my code: > > word=raw_input() > print word*3 > > > with this code im getting - wordwordword. > what changes i need to make to get - word word word - instead? > > thanks using python3.x: word=input() print((word+' ')*2,

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-13 Thread Yudai Fujiwara
Yudai Fujiwara added the comment: I've just installed 2.7.11 and the bug seems to be fixed. Thank you for your accurate solution! Closed. -- resolution: -> out of date status: open -> closed ___ Python tracker

Re: Best way to go about embedding python

2016-11-13 Thread Chris Angelico
On Sun, Nov 13, 2016 at 6:10 PM, wrote: > > (Sorry about the last post, my finger slipped before I was finished, and I > can't delete it for some reason.) (That's because this is a mailing list and newsgroup gatewayed to each other. Once sent, a message cannot be edited

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-13 Thread Xiang Zhang
Xiang Zhang added the comment: I think this is a bug in 2.7.5 and has already been fixed. I'd suggest you get a more recent version of 2.7. :-) -- ___ Python tracker

[issue28632] configparser does not close files in read

2016-11-13 Thread SilentGhost
Changes by SilentGhost : -- stage: -> resolved ___ Python tracker ___ ___

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-13 Thread Yudai Fujiwara
Yudai Fujiwara added the comment: Thanks for your reply. I uploaded server.py. I'm using python 2.7.5 to run server.py on CentOS 7. Both server.py and index.py are located in /var/www/html. $ ls -lh -rwxr-xr-x. 1 root root 189 11月 13 11:21 index.py -rw-r--r--. 1 root root 239 11月 13 21:04

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-13 Thread Xiang Zhang
Xiang Zhang added the comment: Sorry Yudai, I cannot reproduce this. Both '/index.py?value=data' and '/index.py?/' outputs 'value = None' with your index.py. -- nosy: +martin.panter, xiang.zhang ___ Python tracker

[issue28632] configparser does not close files in read

2016-11-13 Thread Petr
Petr added the comment: Thanks for your comments, I am myself quite puzzled how is it possible that the file is not closed after having been read. I suspect this to be an OS problem, therefore I am closing the bug for now. -- resolution: -> not a bug status: open -> closed

[issue28651] Make objects with empty __slots__ GC types

2016-11-13 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Here is a new patch that does not cause refleaks, I just replaced empty __slots__ with a __setattr__: it looks like __slots__ are not needed here to save memory (there is only a singleton instance), they were used just to create an immutable object.

[issue11437] IDLE crash on startup with typo in config-keys.cfg

2016-11-13 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue28681] About function renaming in the tutorial

2016-11-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: > And this is aliasing: > g = f Is it only aliasing if you know that f is a function? I don't mean that as a rhetorical question -- I'm asking if we're comfortable with the idea of saying that g is an alias when f is (say) a float. --

[issue28682] Bytes support in os.fwalk()

2016-11-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: os.walk() supports string and bytes paths, but os.fwalk() always supported only string paths. Proposed patch adds support of bytes paths in os.fwalk(). -- components: Library (Lib) files: fwalk-bytes.patch keywords: patch messages: 280690 nosy:

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch documents bytes paths support on Windows. -- keywords: +patch nosy: +Elvis.Pranskevichus, yselivanov stage: needs patch -> patch review Added file: http://bugs.python.org/file45469/doc-scandir-bytes.patch

Re: Best way to go about embedding python

2016-11-13 Thread Ben Finney
kfjwhee...@gmail.com writes: > A friend of mine is developing a game engine, and I would like to > extend the engine by adding some scripting functionality. I haven't done it myself. But the Python Wiki has some pages that will help you, I think: *