[issue24399] Backports Arch Linux support for platform.linux_distribution()

2015-06-06 Thread Nathan Ringo
New submission from Nathan Ringo: On Arch Linux, running `python2 -c import platform; print platform.linux_distribution()' Before patch: ('', '', '') After patch: ('arch', 'Arch', 'Linux') This matches the Python 3 behavior: `python3 -c import platform; print(platform.linux_distribution())'

[issue24399] Backports Arch Linux support for platform.linux_distribution()

2015-06-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 20454. -- nosy: +berker.peksag resolution: - duplicate stage: - resolved status: open - closed superseder: - platform.linux_distribution() returns empty value on Archlinux and python 2.7

[issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +Nathan Ringo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20454 ___ ___

[issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7

2015-06-06 Thread Nathan Ringo
Nathan Ringo added the comment: The problem is, existing software (Ansible) relies on linux_distribution() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20454 ___

[issue14373] C implementation of functools.lru_cache

2015-06-06 Thread Tim Graham
Tim Graham added the comment: This changed caused a problem in Django's test suite (bisected to 0d0989359bbb0). File /home/tim/code/django/django/db/models/options.py, line 709, in _populate_directed_relation_graph all_models = self.apps.get_models(include_auto_created=True) TypeError:

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-06 Thread Terry Reedy
On 6/6/2015 5:24 AM, Joonas Liik wrote: Perhaps its just me, but it seems to me that this release is mighty picky about annotations. More specifically everything is fine in the interactive interpreter but the same code won't fly when run as a file. example: def some_function(my_arg:my random

Re: Keypress Input

2015-06-06 Thread Laura Creighton
In a message of Sat, 06 Jun 2015 18:28:29 +, John McKenzie writes: Laura and Gary, thank you for your replies. I have three physical buttons connected to a Kade device emulating a keyboard. These buttons control an LED light strip. So there is no screen, so a GUI did not cross my mind. I

[issue24390] Python 3.4.3 64 bits is not high dpi aware

2015-06-06 Thread Ivan Bykov
New submission from Ivan Bykov: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 Type copyright, credits or license() for more information. SM_CYSCREEN = 1 from ctypes import windll GetSystemMetrics = windll.user32.GetSystemMetrics

Re: How to inverse a particle emitter

2015-06-06 Thread Chris Angelico
On Sat, Jun 6, 2015 at 10:10 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: That is in the same class as the lunar lander game on my college mainframe... It did not do validity checking of inputs, with the result that one could do -10 lbs thrust at 180 degrees and GAIN

Re: Can Python function return multiple data?

2015-06-06 Thread Dave Farrance
Rustom Mody rustompm...@gmail.com wrote: On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote: On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote: As a parallel here is Dijkstra making fun of AI-ers use of the word 'intelligent'

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-06 Thread Joonas Liik
Perhaps its just me, but it seems to me that this release is mighty picky about annotations. More specifically everything is fine in the interactive interpreter but the same code won't fly when run as a file. example: def some_function(my_arg:my random annotation)-my random return type

Re: Find in ipython3

2015-06-06 Thread Cecil Westerhof
On Friday 5 Jun 2015 09:17 CEST, Cecil Westerhof wrote: I was already thinking along those lines. I made it: def find(directory, to_match): to_match = to_match.lower() results = [] for dirpath, dirnames, filenames in os.walk(expanduser(directory)): for filename in filenames:

Re: Find in ipython3

2015-06-06 Thread Cecil Westerhof
On Friday 5 Jun 2015 01:04 CEST, Cameron Simpson wrote: On 04Jun2015 13:09, Michael Torrie torr...@gmail.com wrote: Why not use Python for what it's good for and say pipe the results of find into your python script? Reinventing find poorly isn't going to buy you anything. And several

[issue24391] Better repr for threading objects

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24391 ___

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The glob module is not affected because it ignores all OSErrors (including Permission denied and Too many levels of symbolic links). import glob glob.glob('**/*', recursive=True) ['dir2/file1', 'dir2/file2', 'dir2/dir3', 'dir1/file1', 'dir1/file2'] There

[issue18003] lzma module very slow with line-oriented reading.

2015-06-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18003 ___ ___

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file39637/threading_objects_reprs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24391

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds makes reprs of threading objects Semaphore, BoundedSemaphore, Event, and Barrier expose their public states. This will help for debugging. Examples: Semaphore: 10 at 0xb710ec8c BoundedSemaphore: 7/10 at 0xb6ff1d6c unset Event at

[issue24392] pop functioning

2015-06-06 Thread Padmanabhan Tr
New submission from Padmanabhan Tr: I have attached the python sequence my comments. I use Python version 3.4.2 I guess a bug need be corrected -- components: Regular Expressions files: bug_a messages: 244897 nosy: Padmanabhan.Tr, ezio.melotti, mrabarnett priority: normal severity:

Re: Find in ipython3

2015-06-06 Thread Laura Creighton
The !find version is C code optimised to do one thing, find files in your directory structure, which happens to be what you want to do. General regular expression matching is harder. Carl Friedrich Bolz investigated regular expression algorithms and their implementation to see if this is the sort

Re: Python.exe has stopped working

2015-06-06 Thread Laura Creighton
In a message of Fri, 05 Jun 2015 11:15:31 +0200, Christian Gollwitzer writes: Am 05.06.15 um 11:03 schrieb Alexis Dubois: Anyone else for an idea on that? Well, it is a crash on exit. Looks like a memory error inside of PyQT. If you've got the time, you could run it inside of a debugger, or

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1. The patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24391 ___ ___ Python-bugs-list

[issue24391] Better repr for threading objects

2015-06-06 Thread Brett Cannon
Brett Cannon added the comment: While I like the concept, I don't like the reprs where the type is not the first thing listed, e.g., set Event not having Event first. The default repr and typical practice of having the type come first makes my brain initially read that repr as a set of Events

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is for consistency with reprs of lock objects (issue21137): unlocked _thread.lock object at 0xb6f2b188 locked _thread.lock object at 0xb6f2b188 unlocked _thread.RLock object owner=0 count=0 at 0xb6f2b0b0 locked _thread.RLock object owner=-1219680512

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd like to see this in 3.5. This is a no-brainer improvement and has very little chance of breaking anything compared to a new OrderedDict implementation. -- nosy: +larry versions: +Python 3.5 ___ Python tracker

[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-06-06 Thread Stefan Behnel
Stefan Behnel added the comment: (Copying my review comment here so that it doesn't get lost as it's more of a general design thing than a specific review comment.) Having Future know and deal with asyncio seems wrong to me. asyncio should be able to deal *somehow* with a Future that is being

Re: [RELEASED] Python 3.5.0b2 is now available

2015-06-06 Thread Steven D'Aprano
On Sat, 6 Jun 2015 07:24 pm, Joonas Liik wrote: Perhaps its just me, but it seems to me that this release is mighty picky about annotations. More specifically everything is fine in the interactive interpreter but the same code won't fly when run as a file. example: def

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Ram Rachum
Ram Rachum added the comment: I'm seeing a similar problem with `move_to_end` and its `last` keyword argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24394 ___

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Hasan Diwan
New submission from Hasan Diwan: The webbrowser module uses getopt, which needs to be ripped out and replaced with argparse. The attached file does just this. -- components: Library (Lib) files: webbrowser.py messages: 244913 nosy: Hasan Diwan, georg.brandl priority: normal severity:

[issue24195] Add `Executor.filter` to concurrent.futures

2015-06-06 Thread Ram Rachum
Ram Rachum added the comment: A problem I just realized with Brian's 2-line implementation of `filter`: It doesn't work for iterables which aren't sequences, since it attempts to exhaust the iterable twice. So if you have a non-sequence you'll have to make it into a sequence first.

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24255 ___ ___

[issue24391] Better repr for threading objects

2015-06-06 Thread Larry Hastings
Larry Hastings added the comment: I'll allow it. But I agree with Brett, I really would prefer that the type be the first thing in the repr. I'd rather fix the lock objects than compound our error. -- ___ Python tracker rep...@bugs.python.org

[issue18003] lzma module very slow with line-oriented reading.

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: bz2 will gain great benefit from such optimization too. Microbenchmark results: $ ./python -m timeit -s import gzip -- f=gzip.GzipFile('words.gz', 'r') for line in f: pass 2.7: 10 loops, best of 3: 374 msec per loop 3.2: 10

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would following reprs good? Event: set at 0xb710ec8c Event: unset at 0xb710ec8c (what is better: unset or clear?) Should the repr contain the module name (threading.Event: set at 0xb710ec8c)? -- ___ Python

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Eric Snow
Eric Snow added the comment: This has been fixed in issue24368. The fix came just after the beta 2 release. -- resolution: - duplicate stage: - resolved status: open - closed superseder: - Some C OrderedDict methods need to support keyword arguments.

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Eryn Wells
Eryn Wells added the comment: Hi. This is my first issue, but I'd be willing to have a go at updating this module. Do either of you have specific ideas about what changes you want here? My thought was to import logging, create a logger object, and start by replacing all the self.debuglevel

Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
you can use yield structure in python for multiple return. ex: def func(a): yield a*2 print a*2 yield a*3 print a*3 ... data = func(5) -- data = (10,15,... ) On Wed, Jun 3, 2015 at 1:57 AM, fl rxjw...@gmail.com wrote: Hi, I just see the tutorial says Python can return

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks! A few comments: * New features like this can only go into Python 3.6 (the default branch) * The CLI is partially tested (see Lib/test/test_webbrowser.py). You'll need to add additional tests (e.g. add tests for the -t and -h options) * It would be nice

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Madison May
New submission from Madison May: I often find myself trying to access a file relative to the module I'm working on. When this occurs, I'll often use something like the following: ``` os.path.abspath(os.path.join(os.path.dirname(__file__), data/resource.pkl)) ``` I have good reason to believe

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Ram Rachum
New submission from Ram Rachum: Python 3.5.0b2 (v3.5.0b2:7a088af5615b, May 31 2015, 06:22:19) [MSC v.1900 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import collections

EuroPython 2015: Please configure your tickets

2015-06-06 Thread M.-A. Lemburg
The EuroPython website supports buying tickets for other people (friends, colleagues, etc.). As a result, it is necessary to “assign” the tickets you buy to either yourself or someone else. The assignment process is explained below. Please tell us your preferences ---

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the module name is useful, since there are also multiprocessing events and semaphores. Also, Event is a fairly generic name which may be used in other contexts (e.g. GUI libraries). set and unset sound good to me. --

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch. Now the repr always starts with the qualified class name. threading.Semaphore: 10 at 0xb710ec8c threading.BoundedSemaphore: 7/10 at 0xb6ff1d6c threading.Event: unset at 0xb710ec8c threading.Event: set at 0xb710ec8c threading.Barrier:

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Mark Lawrence
Mark Lawrence added the comment: This strikes me as pointless code churn. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24395 ___

Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
yield structure can able to you that return list of return by nest in function. for example you want send a value as enter value to function and wanna after some calculate send value as return data. 2 way for this : a) send data as a list b) send data with yield example: a) def func(a):

Using import math.

2015-06-06 Thread Steve Burrus
I need some help/assistance with using the python import math function. Like I am trying to do a = math.sqrt(1000) a.sqrt but it fails. what am I doing wrong? Thanx for anyone's help. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using import math.

2015-06-06 Thread MRAB
On 2015-06-06 23:03, Steve Burrus wrote: I need some help/assistance with using the python import math function. Like I am trying to do a = math.sqrt(1000) a.sqrt but it fails. what am I doing wrong? Thanx for anyone's help. In what way does it fail? If it printed an error

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Martin Panter
Martin Panter added the comment: There is also pkgutil.get_data(), but that returns the file contents rather than file path, which has rarely been useful to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24396

[issue24398] Update test_capi to use test.support.script_helper

2015-06-06 Thread Christie
Christie added the comment: I can't seem to get test_no_FatalError_infinite_loop to fail - I tried reverting the fix that this was verifying, but the test still passed and no infinite loop to be seen. I'm wondering if this is because I can't reproduce it on a mac. --

[issue24252] IDLE removes elements from tracebacks.

2015-06-06 Thread ppperry
ppperry added the comment: Another example of this overzealous removing is when you create a module named rpc, run, RemoteDebugger, or bdb. For example (in this environment, a file in the current directory named rpc.py exists and refers to the undefined name bar): import rpc Traceback (most

[issue14586] TypeError: truncate() takes no keyword arguments

2015-06-06 Thread Martin Panter
Martin Panter added the comment: See also Issue 23738 and PEP 457 for fixing the documentation instead, possibly something like truncate(size=None, /). Also, Issue 17003 has changed some of the keywords to be more consistent, making parts of this patch incorrect. -- nosy: +vadmium

[issue24033] Update _test_multiprocessing.py to use script helpers

2015-06-06 Thread Christie
Christie added the comment: run_python and spawn_python are basically the same, I need to reconcile those. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24033 ___

[issue18576] Document test.support.script_helper

2015-06-06 Thread Christie
Christie added the comment: @ncoghlan I've taken the test.rst changes from the previous diff and reviewed them against the latest script_helper (including updates from issue24033). Nothing had fallen behind, but I've added what was missing. * I've realized that spawn_python and the helper

[issue23981] Update test_unicodedata.py to use script_helpers

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - patch review versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23981 ___

[issue24252] IDLE removes elements from tracebacks.

2015-06-06 Thread ppperry
ppperry added the comment: Is there any reason why the end of the traceback, rather then just the beginning, needs to be pruned in the first place? Additionally, the search for pdb in the tb method will still undesirably prune the traceback if someone invents there own buggy debugger that

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Martin Panter
Martin Panter added the comment: This feature could be handy for finding test files in test suites. However I don’t think the abspath() step is necessary. We kind of want a urljoin() for OS paths, that automatically removes the current file name. As a new feature I think it would be too late

Re: Keypress Input

2015-06-06 Thread Chris Angelico
On Sun, Jun 7, 2015 at 4:28 AM, John McKenzie dav...@bellaliant.net wrote: It turns out Tkinter is installed on Raspian and my Pi has it. Typing import tkinter into the Python interpreter gave me an error, then I corrected my spelling. The T should be upper case. No errors with import

Re: Using import math.

2015-06-06 Thread Cameron Simpson
On 06Jun2015 15:03, Steve Burrus steveburru...@gmail.com wrote: I need some help/assistance with using the python import math function. Like I am trying to do a = math.sqrt(1000) a.sqrt but it fails. what am I doing wrong? Thanx for anyone's help. Please post a tiny but

Re: Find in ipython3

2015-06-06 Thread Albert-Jan Roskam via Python-list
quot;To run any command at the system shell, simply prefix it with !quot; See: https://ipython.org/ipython-doc/dev/interactive/tutorial.html-- https://mail.python.org/mailman/listinfo/python-list

Re: Find in ipython3

2015-06-06 Thread Laura Creighton
In a message of Sat, 06 Jun 2015 15:42:27 -0700, Albert-Jan Roskam via Python-l ist writes: quot;To run any command at the system shell, simply prefix it with !quot; See: https://ipython.org/ipython-doc/dev/interactive/tutorial.html Please don't top post. 2. He knows this. He's doing this for

[issue18576] Document test.support.script_helper

2015-06-06 Thread Martin Panter
Martin Panter added the comment: If you diffed your patch from a public revision in the main repository, there should be a nice “Review” link. Anyway, here are some comments on issue18576.patch: +.. function:: assert_python_ok(*args, **env_vars) + + Runs the interpreter with *args* and

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread R. David Murray
R. David Murray added the comment: The pkguitil.get_data function is the *right* way to access package-relative data (because in the general case the data may not be on the file system), and IMO it would not be a good idea to make it easier to do things the wrong way. Any deficiencies with

[issue24397] Test asynchat makes wrong assumptions

2015-06-06 Thread R. David Murray
R. David Murray added the comment: Your emendation doesn't seem to do anything differently (logic wise) than the original code. Unless I am missing something, it is pointless to track the length of the buffer separately from the contents of the buffer. The buffer knows its length.

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-06 Thread Ben Darnell
New submission from Ben Darnell: The new collections.abc.Awaitable ABC relies on __instancecheck__, which makes it incompatible with functools.singledispatch (singledispatch works based on args[0].__class__; any instance-level information is discarded). This surprised me because the first

Re: Can Python function return multiple data?

2015-06-06 Thread Steven D'Aprano
On Sun, 7 Jun 2015 03:57 am, fl wrote: Excuse me. I input the following according to your idea, but I do not understand how to use it from the echo. It does not show how to use the multiple output results. I am a new Python user. Please give a little more explanation if you could.

[issue18576] Document test.support.script_helper

2015-06-06 Thread Nick Coghlan
Nick Coghlan added the comment: As far as using docstrings for the online docs goes, there are some useful Sphinx add-ons that we've never enabled for the main Python docs (like autodoc, blockdiag, seqdiag) that could be good options to have available. For autodoc in particular, we prefer to

Re: Can Python function return multiple data?

2015-06-06 Thread Amir Arsalan
Tnx Steven, You are right completly.I try more subtilize thanks for your hint. On Sun, Jun 7, 2015 at 10:03 AM, Steven D'Aprano st...@pearwood.info wrote: Hi Amir, and welcome! On Sun, 7 Jun 2015 02:38 am, Amir Arsalan wrote: you can use yield structure in python for multiple return. ex:

[issue24393] Test urllib2_localnet fails depending on host proxy configuration

2015-06-06 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +orsenthil stage: - patch review versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24393 ___

Re: Can Python function return multiple data?

2015-06-06 Thread Steven D'Aprano
On Sat, 6 Jun 2015 03:32 pm, Rustom Mody wrote: On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote: On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote: As a parallel here is Dijkstra making fun of AI-ers use of the word 'intelligent'

Re: Can Python function return multiple data?

2015-06-06 Thread Steven D'Aprano
On Sat, 6 Jun 2015 03:28 pm, Rustom Mody wrote: There was a list: [1,2,3] At some point that list is found to be(come) [1,2,3,4] They dont look same to me. When you pour water into an empty bottle, does it turn into a different bottle? When you append items to a list (or remove them), it is

Re: Keypress Input

2015-06-06 Thread Michael Torrie
On 06/06/2015 12:28 PM, John McKenzie wrote: Laura and Gary, thank you for your replies. I have three physical buttons connected to a Kade device emulating a keyboard. These buttons control an LED light strip. So there is no screen, so a GUI did not cross my mind. I thought it made sense

Re: Can Python function return multiple data?

2015-06-06 Thread Rustom Mody
On Saturday, June 6, 2015 at 11:27:29 PM UTC+5:30, fl wrote: On Saturday, June 6, 2015 at 9:39:19 AM UTC-7, Amir Arsalan wrote: you can use yield structure in python for multiple return. ex: def func(a):     yield a*2     print a*2     yield a*3     print a*3     ...

Re: Can Python function return multiple data?

2015-06-06 Thread Steven D'Aprano
Hi Amir, and welcome! On Sun, 7 Jun 2015 02:38 am, Amir Arsalan wrote: you can use yield structure in python for multiple return. ex: def func(a): yield a*2 print a*2 yield a*3 print a*3 ... data = func(5) -- data = (10,15,... ) That's actually wrong. If you run:

[issue24397] Test asynchat makes wrong assumptions

2015-06-06 Thread Étienne Buira
New submission from Étienne Buira: Amount of data the server could not send back is not a reliable indication on how much data it received. -- components: Tests files: test_asynchat_check_received_len_if_received_len_matters.diff keywords: patch messages: 244922 nosy: eacb priority:

Re: Can Python function return multiple data?

2015-06-06 Thread fl
On Saturday, June 6, 2015 at 9:39:19 AM UTC-7, Amir Arsalan wrote: you can use yield structure in python for multiple return. ex: def func(a):     yield a*2     print a*2     yield a*3     print a*3     ... data = func(5) -- data = (10,15,... ) On Wed, Jun 3, 2015 at 1:57 AM,

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-06-06 Thread Christie
Christie added the comment: Created issue24398 for updating test_capi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___

[issue24398] Update test_capi to use test.support.script_helper

2015-06-06 Thread Christie
New submission from Christie: As described in Issue9517, many test modules do not make use of the helpers in script_helpers.py to invoke the python interpreter in a subprocess. Issue9517 will be broken down into several smaller issues so we can address smaller change sets. This issue is to

[issue24393] Test urllib2_localnet fails depending on host proxy configuration

2015-06-06 Thread Étienne Buira
Étienne Buira added the comment: Patch was for 2.7 Hunks about no_proxy are also relevant for other branches. -- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24393

Embedded Python and C Callback functions

2015-06-06 Thread doc . mefisto
Hi. I'm a newbie in python. But I want embed it in my C program. There is such method of my class: @staticmethod def install_instr_callback(callback): # set hook for every change of PC m68k.set_instr_hook_callback(callback) And in my C code there is such callback function: static

Re: Keypress Input

2015-06-06 Thread John McKenzie
Laura and Gary, thank you for your replies. I have three physical buttons connected to a Kade device emulating a keyboard. These buttons control an LED light strip. So there is no screen, so a GUI did not cross my mind. I thought it made sense as it is easily done by other scripting