[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-09 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8963] test_urllibnet failure

2012-03-11 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

I tested the code from msg107484 on Fedora 16 with no change in locale.

Probably OK to close?

--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8963
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14358] test_os failing with errno 61: No Data Available

2012-03-18 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Perhaps any errors that occur during supports_extended_attributes should cause 
it to just return false?

--
nosy: +benjamin.peterson, rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14358
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate configure

2012-03-18 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
assignee:  - rosslagerwall
nosy: +rosslagerwall
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14359] _posixsubprocess.o compilation error on CentOS 5.8

2012-03-19 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Thanks!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14359
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Here's the patch ;-)

--
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file25055/generator.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14432
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14443] Distutils test failure

2012-03-29 Thread Ross Lagerwall

New submission from Ross Lagerwall rosslagerw...@gmail.com:

On an up to date Fedora 16:

== CPython 3.3.0a1+ (default:d528b2d2+, Mar 29 2012, 18:04:26) [GCC 4.6.3 
20120306 (Red Hat 4.6.3-2)]
==   Linux-3.3.0-4.fc16.x86_64-x86_64-with-fedora-16-Verne little-endian
==   /home/ross/src/cpythondev/temp/build/test_python_21786
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1)
[1/1] test_distutils
test_byte_compile (distutils.tests.test_install_lib.InstallLibTestCase) ... ok
test_dont_write_bytecode (distutils.tests.test_install_lib.InstallLibTestCase) 
... ok
test_finalize_options (distutils.tests.test_install_lib.InstallLibTestCase) ... 
ok
test_get_inputs (distutils.tests.test_install_lib.InstallLibTestCase) ... ok
test_get_outputs (distutils.tests.test_install_lib.InstallLibTestCase) ... ok
test_no_compiler (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... 
skipped 'These tests are only for win32'
test_reg_class (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... 
skipped 'These tests are only for win32'
test_remove_entire_manifest 
(distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... skipped 'These 
tests are only for win32'
test_remove_visual_c_ref 
(distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... skipped 'These 
tests are only for win32'
test_nt_quote_args (distutils.tests.test_spawn.SpawnTestCase) ... ok
test_spawn (distutils.tests.test_spawn.SpawnTestCase) ... ok
test_announce (distutils.tests.test_dist.DistributionTestCase) ... ok
test_command_packages_cmdline (distutils.tests.test_dist.DistributionTestCase) 
... ok
test_command_packages_configfile 
(distutils.tests.test_dist.DistributionTestCase) ... ok
test_command_packages_unspecified 
(distutils.tests.test_dist.DistributionTestCase) ... ok
test_empty_options (distutils.tests.test_dist.DistributionTestCase) ... ok
test_finalize_options (distutils.tests.test_dist.DistributionTestCase) ... ok
test_get_command_packages (distutils.tests.test_dist.DistributionTestCase) ... 
ok
test_classifier (distutils.tests.test_dist.MetadataTestCase) ... ok
test_custom_pydistutils (distutils.tests.test_dist.MetadataTestCase) ... ok
test_download_url (distutils.tests.test_dist.MetadataTestCase) ... ok
test_fix_help_options (distutils.tests.test_dist.MetadataTestCase) ... ok
test_long_description (distutils.tests.test_dist.MetadataTestCase) ... ok
test_obsoletes (distutils.tests.test_dist.MetadataTestCase) ... ok
test_obsoletes_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_provides (distutils.tests.test_dist.MetadataTestCase) ... ok
test_provides_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_requires (distutils.tests.test_dist.MetadataTestCase) ... ok
test_requires_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok
test_show_help (distutils.tests.test_dist.MetadataTestCase) ... ok
test_simple_metadata (distutils.tests.test_dist.MetadataTestCase) ... ok
test_simple_run (distutils.tests.test_install_headers.InstallHeadersTestCase) 
... ok
test_finalize_options (distutils.tests.test_upload.uploadTestCase) ... ok
test_saved_password (distutils.tests.test_upload.uploadTestCase) ... ok
test_server_empty_registration (distutils.tests.test_upload.uploadTestCase) ... 
ok
test_server_registration (distutils.tests.test_upload.uploadTestCase) ... ok
test_upload (distutils.tests.test_upload.uploadTestCase) ... ok
test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_check_extensions_list (distutils.tests.test_build_ext.BuildExtTestCase) 
... ok
test_compiler_option (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_deployment_target_default 
(distutils.tests.test_build_ext.BuildExtTestCase) ... skipped 'test only 
relevant for MacOSX'
test_deployment_target_higher_ok 
(distutils.tests.test_build_ext.BuildExtTestCase) ... skipped 'test only 
relevant for MacOSX'
test_deployment_target_too_low 
(distutils.tests.test_build_ext.BuildExtTestCase) ... skipped 'test only 
relevant for MacOSX'
test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_finalize_options (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_source_files (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_optional_extension (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) 
... ok
test_user_site (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... ok
test_default_settings (distutils.tests.test_build_scripts.BuildScriptsTestCase) 
... ok
test_version_int (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... 
ok
test_debug_mode

[issue14443] Distutils test failure

2012-03-29 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

The output of running rpmbuild from bash:

$ rpmbuild
RPM version 4.9.1.2
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpmbuild [-v?] [-bp] [-bc] [-bi] [-bl] [-ba] [-bb] [-bs] [-tp]
[-tc] [-ti] [-ta] [-tb] [-ts] [--rebuild] [--recompile]
[--buildroot=DIRECTORY] [--clean] [--nobuild] [--nodeps]
[--nodirtokens] [--rmsource] [--rmspec] [--short-circuit]
[--target=CPU-VENDOR-OS] [-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR']
[--macros=FILE:...] [--nodigest] [--nosignature]
[--rcfile=FILE:...] [-r|--root ROOT] [--dbpath=DIRECTORY]
[--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
[-?|--help] [--usage] [--with=option] [--without=option]
[--buildpolicy=policy] [--sign]


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14443
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14442] test_smtplib.py lacks import errno

2012-03-29 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

 Thanks Ross.  I don't think this is worth a news item, even though the
 bug was shipped in an alpha.  If someone disagrees please add one.

I did add it to the [Tests] section in 9c2b710da3c7. Hardly worth it, but ...

--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14442
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14443] Distutils test failure

2012-03-31 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

The first bad revision is:  
changeset:   72818:27a36b05caed
branch:  3.2
user:Éric Araujo mer...@netwok.org
date:Sat Oct 08 00:34:13 2011 +0200
summary: Fix distutils byte-compilation to comply with PEP 3147 (#11254).


Cheers

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14443
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

I'm happy to remove the bit about *installing* autoconf altogether.

Do you think the Autoconf section (about regenerating configure) should stay 
where it is or be moved somewhere else?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14467
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14527] How to link with an external libffi?

2012-04-07 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

If it is in a non-standard location, try setting the environment variables:

LDFLAGS linker flags, e.g. -Llib dir if you have libraries in a 
nonstandard directory lib dir
CPPFLAGS(Objective) C/C++ preprocessor flags, e.g. -Iinclude dir if you 
have headers in a nonstandard directory include dir

--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14527
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12081] Remove distributed copy of libffi

2012-04-15 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

In any case, it should be OK to remove libffi_arm_wince?

Is WinCE supported?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12081
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17552] socket.sendfile()

2013-03-27 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15777] test_capi refleak

2012-08-24 Thread Ross Lagerwall

New submission from Ross Lagerwall:

results for fa745ed89b7a on branch default


test_capi leaked [2, 2, 2] references, sum=6


Command line was: ['./python', '-m', 'test.regrtest', '-uall', '-R', 
'3:3:/home/antoine/cpython/refleaks/reflogEr4Oyp', '-x']


A fix is in progress...

--
assignee: rosslagerwall
messages: 168993
nosy: rosslagerwall
priority: normal
severity: normal
stage: needs patch
status: open
title: test_capi refleak
type: resource usage
versions: Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15777
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15777] test_capi refleak

2012-08-24 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15777
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Ross Lagerwall

Ross Lagerwall added the comment:

It's caused by the following check in _posixsubprocess.c:
if (close_fds  errpipe_write  3) {  /* precondition */
PyErr_SetString(PyExc_ValueError, errpipe_write must be = 3);
return NULL;
}

which was written by Gregory P. Smith in 2010 (adding to nosy list).

I'm not entirely sure why this check is here, presumably its due to the way 
close_fds=True is handled.

The close fds logic is also hardcoded to close fds from 3 upwards,.

--
nosy: +gregory.p.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Ross Lagerwall

Ross Lagerwall added the comment:

The attached patch + test seems to fix the issue.

It's not very elegant.

--
keywords: +patch
Added file: http://bugs.python.org/file27042/issue15798.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-30 Thread Ross Lagerwall

Ross Lagerwall added the comment:

I sent a review through on rietveld; I'm attaching a patch with the changes so 
that it compiles and passes the tests.

--
Added file: http://bugs.python.org/file27053/issue15798_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall

New submission from Ross Lagerwall:

[1/1] test_curses
beginning 6 repetitions
123456
.
test_curses leaked [1, 1, 1] references, sum=3
1 test failed:
test_curses
[154814 refs]

--
assignee: rosslagerwall
messages: 169973
nosy: rosslagerwall
priority: low
severity: normal
status: open
title: test_curses refleak
type: resource usage

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15876
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall

Ross Lagerwall added the comment:

This didn't get picked up by Antoine's daily refleak test run because test 
curses only runs when stdout is a TTY.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15876
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15876
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16140
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-29 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
assignee:  - rosslagerwall
nosy: +rosslagerwall
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.2, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16262
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4609] Allow use of 256 FD's on solaris in 32 bit mode

2009-02-24 Thread Ross Hayden

Changes by Ross Hayden r...@nsnull.com:


--
nosy: +ross

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4609
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-02-27 Thread Ross Hayden

Changes by Ross Hayden r...@nsnull.com:


--
nosy: +ross

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1975
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1777398] IDLE Freezes After Running Scripts

2009-04-27 Thread Ross Peoples

Ross Peoples deejr...@users.sourceforge.net added the comment:

I just did a fresh install of Ubuntu Jaunty in a virtual machine, copied
and pasted the code. It ran the first time without a problem. But the
second time I ran it, the application would not exit and IDLE is frozen.
So I still have to force quit. This is with Python 2.6.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1777398
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23070] Error in Tutorial comment

2014-12-16 Thread Ross Burnett

New submission from Ross Burnett:

In section 3.1.2. Strings of the Tutorial (version 3.4 plus others?), a 
comment on a slicing error has an error:

word[42]  # the word only has 7 characters

It should say word[42]  # the word has 6 characters

--
assignee: docs@python
components: Documentation
messages: 232795
nosy: docs@python, rossburnett
priority: normal
severity: normal
status: open
title: Error in Tutorial comment
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23070
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Call for Assistance

2016-08-09 Thread Charles Ross
> CC-BY-NC-SA is not a license for free (as in speech) content. Is that
> what you want?

I really appreciate all the conversation about the license. Perhaps I made a 
mistake with requiring noncommercial in the license, I don’t know, but I’ll 
look at the links provided about free documentation and free software and see 
if I can understand the issues more and perhaps make a better decision.

Honestly, I have no expectation that this book will ever be anything more than 
a (hopefully) useful resource for others like myself, as described in the 
current introduction. I might have a remote hope that it would be something 
that would receive attention from a traditional publisher, but that remote hope 
is in the same category as a remote hope that a distant rich uncle will someday 
name me in his well. So, given the minuscule odds of that happening, I’ll 
probably remove the NC portion. I’ll just do a bit of research first with those 
links.

Thanks,
Chuck
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Call for Assistance

2016-08-09 Thread Charles Ross
Well, I’ve been convinced. The license for the book is now Creative Commons 
Attribution-ShareAlike.

https://github.com/chivalry/meta-python/blob/master/LICENSE.md

Thanks,
Chuck

> On Aug 9, 2016, at 3:00 PM, Charles Ross <chiva...@mac.com> wrote:
> 
>> CC-BY-NC-SA is not a license for free (as in speech) content. Is that
>> what you want?
> 
> I really appreciate all the conversation about the license. Perhaps I made a 
> mistake with requiring noncommercial in the license, I don’t know, but I’ll 
> look at the links provided about free documentation and free software and see 
> if I can understand the issues more and perhaps make a better decision.
> 
> Honestly, I have no expectation that this book will ever be anything more 
> than a (hopefully) useful resource for others like myself, as described in 
> the current introduction. I might have a remote hope that it would be 
> something that would receive attention from a traditional publisher, but that 
> remote hope is in the same category as a remote hope that a distant rich 
> uncle will someday name me in his well. So, given the minuscule odds of that 
> happening, I’ll probably remove the NC portion. I’ll just do a bit of 
> research first with those links.
> 
> Thanks,
> Chuck
> -- 
> https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Meta Python Chapter 3 Available

2016-08-12 Thread Charles Ross
I’ve completed a first draft of Chapter 3: Modules (and Packages) of the Meta 
Python book. Feedback from novices and experts alike would be welcome.

https://github.com/chivalry/meta-python 


Thanks,
Chuck
-- 
https://mail.python.org/mailman/listinfo/python-list


Call for Assistance

2016-08-09 Thread Charles Ross
I’ve begun a new book called Meta Python that I’m looking for assistance with. 
The book is one I wish was out there, and so am writing. The book is targeted 
at experienced programmers who are novice Python users and want to move from 
that point to one where they have published to PyPI.

I’m specifically looking for three types of users to assist me:

- Expert Python developers who are willing to confirm and correct the technical 
details, since I’m getting to the material that I want to learn and therefore 
need to teach. So far that only really includes virtual environments, covered 
in chapter 2, but will soon include many other topics.
- Developers like me, who aren’t new to programming but are perhaps new to 
Python and certainly new to publishing to PyPI, and who can provide feedback on 
the clarity and usefulness of the content.
- Linux and Windows Python users who would be willing to assist in making the 
book a bit less Mac-centric.

The book is being hosted at https://github.com/chivalry/meta-python 
. The introduction and first two 
chapters have their initial drafts complete, but you’ll see a few “TODOs” in 
there. Any and all feedback is appreciated, and preferred through the GitHub 
Issues system, but feel free to email me if you prefer.

Thanks,
Chuck

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Call for Assistance

2016-08-09 Thread Charles Ross
You’re right. I should have mentioned that this is a volunteer effort on my 
part and anyone else who becomes involved. It’s being released under the 
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License 
(http://creativecommons.org/licenses/by-nc-sa/4.0/ 
<http://creativecommons.org/licenses/by-nc-sa/4.0/>) as demonstrated by the 
LICENSE.md file at the GitHub repository 
(https://github.com/chivalry/meta-python/blob/master/LICENSE.md 
<https://github.com/chivalry/meta-python/blob/master/LICENSE.md>).

I don’t yet know precisely how the “book” will be published. I might just leave 
it as a set of GitHub files or export the Markdown to other format to be hosted 
outside GitHub. I’m not worrying yet about publishing, only clarity and 
correctness of content.

Thanks,
Chuck

> On Aug 9, 2016, at 1:17 AM, Steven D'Aprano 
> <steve+comp.lang.pyt...@pearwood.info> wrote:
> 
> On Tuesday 09 August 2016 11:52, Charles Ross wrote:
> 
>> I’ve begun a new book called Meta Python that I’m looking for assistance
>> with.
> 
> Are you looking for people to be co-authors? Are you offering payment, or 
> credit? A free copy of the book? A kick to the head? Or just looking for 
> volunteers to provide content for the book while you lie back on a beach in 
> the 
> Bahamas collecting the millions[1] in royalties?
> 
> 
> 
> 
> 
> [1] Zimbabwean dollars.
> 
> -- 
> Steve
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


How to get Read the Docs to generate py-modindex.html?

2016-08-29 Thread Charles Ross
Since I appear to be experiencing one of the few times that Stack Overflow 
hasn’t provided any quick answers to a problem 
(http://stackoverflow.com/questions/39197037/how-to-get-read-the-docs-to-generate-py-modindex-html
 
),
 I’ll try posting my question here and see if anyone has a suggestion.

I'm trying to get Read the Docs to generate the `py-modindex.html` file. 
Research into a related question lead me to the following setup:

- `setup.py` in the project directory has the following contents, which were 
the minimum needed to get `pytest` to work and haven't been changed since I got 
that part of my project working:

import setuptools

setuptools.setup(
name='polygons',
packages=setuptools.find_packages(),
)

- `docs/requirements.txt` contains a single line:

sphinx-autodoc-annotation

- The Read the Docs repository URL points to my repository 
(https://github.com/chivalry/polygons).
- The RtD setting for "Install your project inside a virtualenv using setup.py 
install" is checked.
- The RtD setting for "Requirements file" points to `docs/requirements.txt`.

The "Module Index" link gets included in `index.html` 
(http://polygons.readthedocs.io/en/latest/), but the `py-modindex.html` file is 
missing.

My understanding is that with the virtualenv setting above, RtD will use the 
`setup.py` file to install the project so that Sphinx can read the 
documentation found in the Python docstrings. I'm using function annotations 
and would like `sphyinx-autodoc-annotation` to make use of those when creating 
the built docs files. All of this works splendidly on my local machine when I 
run `make html` while in the `docs` folder. Now I'm trying to get it to work on 
Read the Docs.

Thanks,
Chuck

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: how to control formatting of a namedtuple in a list

2016-11-17 Thread Boylan, Ross
Actually,
>> print(list(foo, bar))
Traceback (most recent call last):  

  File "", line 1, in

TypeError: list() takes at most 1 argument (2 given)   

Though 
>>> [foo, bar]
['ham, eggs, cheese', 'bacon, toast'] 
which admittedly would be confusing if the strings weren't quoted. But display, 
or formatted values, are not intended to allow reconstruction of the objects; 
that's what repr is for. 

The argument that the display of list is already low-level, and so everything 
inside the list should be displayed low-level, seems a bit of a stretch.

Overriding repr is serviceable for me, but it requires violating the intended 
semantics of repr, namely that the result could be converted back to the 
original object. I'm trying to get a display that has only some of the 
information in the object.  My understanding is that str is supposed to provide 
that.

At any rate, I agree there are reasons to use repr inside a list.

Ross

From: Python-list [python-list-bounces+ross.boylan=ucsf@python.org] on 
behalf of Ethan Furman [et...@stoneleaf.us]
Sent: Thursday, November 17, 2016 4:18 PM
To: python-list@python.org
Subject: Re: how to control formatting of a namedtuple in a list

On 11/17/2016 04:09 PM, MRAB wrote:
> On 2016-11-17 23:49, Boylan, Ross wrote:

>> Thank you; I can confirm that overriding __repr__ makes the list display as 
>> I wanted.
>>
>> The decision to use repr inside the list seems very odd, given the context, 
>> namely formatting something for display or looking for a simple string 
>> representation.  It seems more natural to me to use str or, if in a format, 
>> the default formatting all the way down.  Is there a good reason it's repr?
>
> Given a string, say:
>
> >>> s = 'foo'
>
> str shows:
>
> >>> print(str(s))
>
> whereas repr shows:
>
> >>> print(repr(s))
> 'foo'
>
> If it was in a list, would you want it to show:
>
> [foo]
>
> or:
>
> ['foo']
>
> ?

Another example:

  >>> foo = 'ham, eggs, cheese'
  >>> bar = 'bacon, toast'

if list used str instead of repr:

  >>> print(list(foo, bar))
  [ham, eegs, cheese, bacon, toast]

How many items are in that list?  (Hint: it isn't 5. ;)

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: how to control formatting of a namedtuple in a list

2016-11-17 Thread Boylan, Ross
Thank you; I can confirm that overriding __repr__ makes the list display as I 
wanted.

The decision to use repr inside the list seems very odd, given the context, 
namely formatting something for display or looking for a simple string 
representation.  It seems more natural to me to use str or, if in a format, the 
default formatting all the way down.  Is there a good reason it's repr?

Ross

From: Python-list [python-list-bounces+ross.boylan=ucsf@python.org] on 
behalf of Chris Angelico [ros...@gmail.com]
Sent: Thursday, November 17, 2016 3:24 PM
To: python-list@python.org
Subject: Re: how to control formatting of a namedtuple in a list

On Fri, Nov 18, 2016 at 10:04 AM, Boylan, Ross <ross.boy...@ucsf.edu> wrote:
> Even after defining custom __str__ and __format__ methods they don't affect 
> the display of objects when they are in a list.  Is there a way to change 
> that, other than explicitly converting each list element to a string?
>

Yep! Inside a list, it's the repr that gets shown. So you should be
able to do this:

class Foo(namedtuple("Foo", "x")):
def __repr__(self):
  return "foolish({})".format(self.x)

This will also affect the other forms - if you don't define __str__,
it'll use __repr__. So this should be all you need.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


how to control formatting of a namedtuple in a list

2016-11-17 Thread Boylan, Ross
Even after defining custom __str__ and __format__ methods they don't affect the 
display of objects when they are in a list.  Is there a way to change that, 
other than explicitly converting each list element to a string?

The last line of output below shows that when I format the list I get standard 
formatting of my objects instead of my custom format.

Code
#! /usr/bin/python3
from collections import namedtuple

class Foo(namedtuple("Foo", "x")):
__slots__ = ()

def __str__(self):
  return "foolish({})".format(self.x)

def __format__(self, spec):
  return self.__str__()

f=Foo(4)
print(f)
print(str(f))
print("{}".format(f))
print("{}".format([f]))  # a list with one f

Output
foolish(4)
foolish(4)
foolish(4)
[Foo(x=4)]

I'm running Python 3.4.

Thanks.
Ross
-- 
https://mail.python.org/mailman/listinfo/python-list


error in syntax description for comprehensions?

2017-03-30 Thread Boylan, Ross
https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries
describes the syntax for comprehensions as
comprehension ::=  expression comp_for
comp_for  ::=  [ASYNC] "for" target_list "in" or_test [comp_iter]
comp_iter ::=  comp_for | comp_if
comp_if   ::=  "if" expression_nocond [comp_iter]

Is the comp_for missing an argument after "in"?
One has to follow the definition of or_test and its components, but I can't 
find anything that results to a single variable or expression.

Actually, I'm not sure what or_test would do there either with or  without an 
additional element following "in". 

Ross Boylan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26350] Windows: signal doc should state certains signals can't be registered

2017-08-08 Thread Ross Rosen

Ross Rosen added the comment:

I'm not sure if this is helpful, but I thought it might be useful for you to 
hear a non-expert user's perspective.  (In summary, I'm agreeing with the OP.)

I spent a lot of time getting some signal handling working on OSX. Then finally 
in my process got to porting to Windows. I spent a bunch more time scratching 
my head trying to figure out why it wasn't working. Even after reading the 
os.kill and signal docs and searching for "Windows" I still wasn't clear what 
was wrong.  

This thread was the answer. 

So my suggestion at the least would be to put warnings in the signal doc, and 
clarify the language in the os.kill.

--
nosy: +Ross Rosen

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26350>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Meaning of abbreviated terms

2018-05-12 Thread Ross Wilson
The "plist" abbreviation goes back to at least 1958 as it was used in 
the Lisp implementation [0].  And it may even predate Lisp.  I'm very 
sure that what actually went into a plist has often changed over the 
years, but the name persists.


Lisp also used "association lists" [1] which were a key/value data 
structure, usually called an "alist" or "a-list".


Ross

[0] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node108.html
[1] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node153.html


On 12/5/2561 BE 13:45, Bob Martin wrote:

in 793617 20180511 072806 Steven D'Aprano 
<steve+comp.lang.pyt...@pearwood.info> wrote:

On Fri, 11 May 2018 07:20:36 +, Bob Martin wrote:


in 793605 20180511 044309 T Berger <brg...@gmail.com> wrote:

On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote:

On 2018-05-05 17:57, T Berger wrote:

What does the "p" in "plist" stand for? Is there a python glossary
that spells out the meanings of abbreviated terms?


"plist" is "property list". It's listed in the Python documentation.

Thanks for the answer. Missed it till now.

In IBM-speak it was parameter list.



But that's not where plists came from, was it? As I understand it, the
plist data format was invented by Apple, and they called it a property
list.

How old is Apple?
I was using plist for parameter list in OS/360 in 1965.


--
https://mail.python.org/mailman/listinfo/python-list


Re: How to start gnuradio

2018-07-31 Thread Ross Wilson
I had a paddle through the manual at
https://www.gnuradio.org/doc/doxygen/page_python_blocks.html and apparently
some DSP operations use numpy.

Ross

On Wed, 1 Aug 2018 at 11:56  wrote:

>
>
> After some research I found out that "sudo apt-get install python-numpy"
> solved the problem.
>
> Can anyone clarify how python-numpy solves the problem?
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-06 Thread Ross Burton


Change by Ross Burton :


--
pull_requests: +8543
stage:  -> patch review

___
Python tracker 
<https://bugs.python.org/issue34585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-05 Thread Ross Burton


New submission from Ross Burton :

Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of floats 
and doubles.  This hurts when cross-compiling because a default is set, 
resulting in Python silently falling back to sub-optimal codepaths.

A partial improvement would be to not set a fallback, to force the user to set 
the right byte order explicitly.

However this test can be done without running anything.  autoconf-archive has a 
macro that uses a carefully constructed double that encodes to an ASCII string 
in the binary, which is then examined using grep.  Evil genius.

Attached is a POC using this.  Currently the autoconf-archive macro only 
handles big and little endian not the ARM OABI mixed-endian format, so 
configure.ac assumes if the byte order is unknown then it's the crazy 
mixed-endian.

To be honest OABI is so old now, I don't believe anyone actually uses it 
anymore: everyone still on ARMv4 should have moved to EABI many years ago, and 
the mixed-endian support could be removed from Py3 in the future.

--
components: Build
files: 0001-Don-t-do-runtime-test-to-get-float-byte-order.patch
keywords: patch
messages: 324627
nosy: rossburton
priority: normal
severity: normal
status: open
title: Don't use AC_RUN_IFELSE to determine float endian
versions: Python 3.8
Added file: 
https://bugs.python.org/file47788/0001-Don-t-do-runtime-test-to-get-float-byte-order.patch

___
Python tracker 
<https://bugs.python.org/issue34585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36125] Cannot cross-compile to more featureful but same tune

2019-02-26 Thread Ross Burton


New submission from Ross Burton :

My build machine is a Haswell Intel x86-64. I'm cross-compiling to x86-64, with 
-mtune=Skylake -avx2.  During make install PYTHON_FOR_BUILD loads modules from 
the *build* Lib/ which contain instructions my Haswell can't execute:

| 
_PYTHON_PROJECT_BASE=/data/poky-tmp/master/work/corei7-64-poky-linux/python3/3.7.2-r0/build
 _PYTHON_HOST_PLATFORM=linux-x86_64 PYTHONPATH=../Python-3.7.2/Lib 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_x86_64-linux-gnu python3.7 -v 
-S -m sysconfig --generate-posix-vars ;\
Illegal instruction

--
components: Build
messages: 336688
nosy: rossburton
priority: normal
severity: normal
status: open
title: Cannot cross-compile to more featureful but same tune
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue36125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36125] Cannot cross-compile to more featureful but same tune

2019-02-26 Thread Ross Burton


Ross Burton  added the comment:

>From what I can tell:

configure.ac sets PYTHON_FOR_BUILD like this if cross-compiling:

PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) 
_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f 
pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) 
'$interp

Note how PYTHONPATH is set to the source and build paths for Lib/.

The intention appears to be that the sysconfig.py in the build is used.  In my 
case that directory is also full of shared libraries that Python happily loads, 
and then fails.

--

___
Python tracker 
<https://bugs.python.org/issue36125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-01 Thread Ross Biro


New submission from Ross Biro :

The only point in the string.Formatter class that really depends on string 
output is line 245: return ''.join(result), auto_arg_index.  

I'm currently working on a problem that would be much easier if I could get 
access to the result list instead of having that join called.

I propose creating another overridable method in string.Formatter, say oformat 
that calls _vformat and is called by vformat. oformat would have the guts of 
vformat and just return the result list.  vformat would then consist of the 
call ot oformat and the join.  See Below.  The recursive call to _vformat would 
also need some slight modification.

The work would not be difficult and I'm willing to do it, provided there is 
sufficient interest.

def vformat(self, format_string, args, kwargs):
result = self.oformat(format_string, args, kwargs)
return ''.join(result)

def oformat(self, format_string, args, kwargs):
used_args = set()
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
self.check_unused_args(used_args, args, kwargs)
return result

--
components: Library (Lib)
messages: 336945
nosy: Ross Biro
priority: normal
severity: normal
status: open
title: Modify Formatter Class to handle arbitrary objects
type: enhancement
versions: Python 2.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue36159>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36125] Cannot cross-compile to more featureful but same tune

2019-03-02 Thread Ross Burton


Ross Burton  added the comment:

strace disagrees.  By putting strace in PYTHON_FOR_BUILD and then invoking make 
sharedmods:

| openat(AT_FDCWD, 
"/data/poky-tmp/master/work/corei7-64-poky-linux/python3/3.7.2-r0/build/build/lib.linux-x86_64-3.7/_heapq.cpython-37m-x86_64-linux-gnu.so",
 O_RDONLY|O_CLOEXEC) = 3
| read(3, 
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\20\0\0\0\0\0\0"..., 832) = 
832
| fstat(3, {st_mode=S_IFREG|0755, st_size=62104, ...}) = 0
| mmap(NULL, 23880, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f93d7cb9000
| mmap(0x7f93d7cba000, 4096, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f93d7cba000
| mmap(0x7f93d7cbb000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x2000) = 0x7f93d7cbb000
| mmap(0x7f93d7cbc000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f93d7cbc000
| close(3)= 0
| mprotect(0x7f93d7cbc000, 4096, PROT_READ) = 0
| --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7f93d7cbab10} ---
| +++ killed by SIGILL (core dumped) +++
| Illegal instruction
| Makefile:625: recipe for target 'sharedmods' failed

We do have patches but I don't think they affect this part of the build.

--

___
Python tracker 
<https://bugs.python.org/issue36125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36125] Cannot cross-compile to more featureful but same tune

2019-03-03 Thread Ross Burton


Ross Burton  added the comment:

That's exactly the glitch.  I'm cross-compiling to a more powerful IA process 
from IA.  This *is* a cross-compilation but the triple is the same.  Assuming 
that you can rely on the loader to not open target binaries when they're on the 
path to load from is unwise.

--

___
Python tracker 
<https://bugs.python.org/issue36125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-12 Thread Ross Biro


Ross Biro  added the comment:

I'm currently writing a language translator between two domain specific
computer languages.  Because some expressions occur repeatedly, but in
slightly different contexts, I make multiple passes.  The first pass
reduces everything it can and leaves place holder objects for things it
can't reduce.  Later passes replace the objects with their final expression
in the new language.  The final expression varies by context, so every time
it's reevaluated, it could change.  I would really like to handle things
like a + b as

"{a} + {b}".format(a=a, b=b)

This works great when a and b are strings.  But when they are place holder
objects, I wasn't able to find a good solution.  Although the Formatter
class came so close that I thought I would suggest the change.  What I
ended up doing was replacing objects with unique strings so that I could
use format and then using regular expressions on the output string to split
it into an array and replace the string identifiers with the original
objects.  The change I've suggested to the Formatter class would have
allowed me to skip the regular expressions.

Ross

On Mon, Mar 11, 2019 at 11:47 PM Lisa Roach  wrote:

>
> Lisa Roach  added the comment:
>
> Can you give an example use case for this? F-strings are the newer method
> of string interpolation, I'm not sure it's worth putting effort into adding
> features to string.Formatter.
>
> --
> nosy: +lisroach
>
> ___
> Python tracker 
> <https://bugs.python.org/issue36159>
> ___
>

-- 
*Ross Biro* | CTO
___

O: 240-380-2231|  F: 240-556-0361 <(240)%20556-0361>
The Interface Financial Group <https://interfacefinancial.com/>

CONFIDENTIALITY NOTICE: This email message, including any attachments, is
for the sole use of the intended recipient/s and may contain confidential &
privileged information. Any unauthorized review, use, disclosure, or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
messages and any attachments.

--

___
Python tracker 
<https://bugs.python.org/issue36159>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Wind Rose Plotting in Python

2019-09-05 Thread Ross Wilson
On Thu, 5 Sep 2562 at 22:00 Madhavan Bomidi  wrote:

> Hi,
>
> Can someone help me on how to make the wind rose plotting (similar to the
> figure 2 in the paper:
> https://agupubs.onlinelibrary.wiley.com/doi/epdf/10.1029/2011JD016386) in
> Python?
>
> The input file contains the data in 4 columns:
>
> [date, time, wind_speed, wind_direction]
>
> Look forward to your support and suggestions.
>

Hi Madhavan,

I can only see the first page of the paper you linked, so this might not
help.

Try looking at the "windrose" third-party library for matplotlib at
https://github.com/python-windrose/windrose .  The matplotlib page of
third-party libraries is at
https://matplotlib.org/3.1.1/thirdpartypackages/index.html#windrose .

Ross
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Ross Rhodes


New submission from Ross Rhodes :

http library missing HTTP status code 418 "I'm a teapot".

--
messages: 361106
nosy: trrhodes
priority: normal
severity: normal
status: open
title: http library missing HTTP status code 418 "I'm a teapot"

___
Python tracker 
<https://bugs.python.org/issue39507>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39507] http library missing HTTP status code 418 "I'm a teapot"

2020-01-31 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
pull_requests: +17665
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18291

___
Python tracker 
<https://bugs.python.org/issue39507>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38999] Python launcher on Windows does not detect active venv

2019-12-24 Thread Ross Boylan

Ross Boylan  added the comment:

As someone who finds the current behavior surprising, and having lost 
significant time because of it, I have a couple of comments.

1) If the venv created a python3 (or 2, as appropriate) file, would the 
expected behavior with !#/usr/bin/env python3 be restored?  I think the 
previous analysis said that python3 doesn't match the venv because there is no 
python3 in the venv path.  So putting one there would fix it.  Of course, it 
would only help for newly created venvs.  The pythonN file would need to be in 
addition to the python file, not instead of it, so that invocations of python 
without a number continued to work as expected.

2) There appear to be two separate sections of the documentation which govern 
this case. 3.7.1.2 of Python Setup and Usage says "If the launcher is run with 
no explicit Python version specification, and a virtual environment (created 
with the standard library venv module or the external virtualenv tool) active, 
the launcher will run the virtual environment’s interpreter rather than the 
global one. "
If py myscript.py is invoked that seems to fit this case, but obviously that's 
not what's happening.  I realize one could interpret the python3 in the shebang 
as an "explicit version specification", but a) that's not on the command line, 
which seems the more natural reading and b) it's only a partial specification, 
since it doesn't say which python3 to use.

Then section 3.7.2 is about !# lines.  So if you invoke py without a version 
specifier, but the invoked file has a !#, does 3.7.1.2 or 3.2 apply?

--
nosy: +rossb

___
Python tracker 
<https://bugs.python.org/issue38999>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-04-18 Thread Ross Rhodes


Ross Rhodes  added the comment:

Unable to dedicate time to this issue under the change of circumstances. Happy 
for someone else to re-open this if they take an interest in picking up this 
work.

--
resolution:  -> postponed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-03-20 Thread Ross Rhodes


New submission from Ross Rhodes :

Hello,

Thoughts on a new function in the math module to find prime factors for 
non-negative integer, n? After a brief search, I haven't found previous 
enhancement tickets raised for this proposal, and I am not aware of any 
built-in method within either Python's math module or numpy, but happy to be 
corrected on that front.

If there's no objection and the method does not already exist, I'm happy to 
implement it and open for review.

Ross

--
messages: 364711
nosy: trrhodes
priority: normal
severity: normal
status: open
title: Math module method to find prime factors for non-negative int n
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-03-21 Thread Ross Rhodes

Ross Rhodes  added the comment:

Hi Tim,

Are there any open discussions or threads following the proposed “imath” 
module? I’m a relatively new entrant to the Python community, so if there’s any 
ongoing discussion on that front I’d be happy to read further.

I think as a first step it would be good to implement this logic for a limited 
range of non-negative n, imposing an upper limit (suggestions welcome) to make 
sure all provided input can be safely processed. We can then build from there 
to support larger n going forward if the demand is out there.

Ross

--

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-03-21 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Serhiy,

Thanks for sharing your thread. I support this proposal, and would be happy to 
help where time permits if we can gather sufficient support.

I inadvertently posted my support twice on your thread with no obvious means of 
deleting the duplicate post, since the first one had a delay appearing. 
Regardless, how can we best move forward with this idea?

Ross

--

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-03-21 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Steven,

I agree, your set of proposed methods seem sensible to me. I'm happy to start 
with an implementation of at least some of those methods and open for review, 
taking this one step at a time for easier review and regular feedback.

> Another question: since factorization can take a long time, should it be a 
> generator that yields the factors as they are found?

Yes, I think a generator is a sensible shout. Happy to proceed with this 
suggestion.

Ross

--

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40028] Math module method to find prime factors for non-negative int n

2020-03-21 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Serhiy,

> Provide a pull request.

Apologies, by "this idea" I should clarify I meant the "imath" module proposal. 
On this particular enhancement, yes, I'm happy to work on and later provide a 
pull request.

--

___
Python tracker 
<https://bugs.python.org/issue40028>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2020-12-29 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22839
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23996

___
Python tracker 
<https://bugs.python.org/issue42778>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2020-12-29 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Tom,

Thanks for raising this issue. I've opened a PR to permit us to set 
`follow_symlinks` in both os.path and pathlib. Feel free to leave feedback.

--

___
Python tracker 
<https://bugs.python.org/issue42778>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41781] Typos in typing.py

2020-12-26 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22804
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23957

___
Python tracker 
<https://bugs.python.org/issue41781>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42756] smtplib.LMTP.connect() raises TypeError if `timeout` is not specified

2020-12-27 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22814
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23969

___
Python tracker 
<https://bugs.python.org/issue42756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42756] smtplib.LMTP.connect() raises TypeError if `timeout` is not specified

2020-12-27 Thread Ross Rhodes

Ross Rhodes  added the comment:

Hello Wüstengecko,

Thanks for raising this issue. I've opened a PR which I believe will resolve 
the problem, but it's difficult to verify this against the mock socket setup. 
Feel free to leave feedback.

--

___
Python tracker 
<https://bugs.python.org/issue42756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41781] Typos in typing.py

2020-12-26 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hello Patrick,

Thanks for opening this issue. I'm creating a PR to resolve the typo in 
"_allow_reckless_class_cheks", but I'm unable to find "instnance". Presumably 
the latter was resolved in an earlier PR.

--

___
Python tracker 
<https://bugs.python.org/issue41781>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42352] A string representation of slice objects with colon syntax

2020-11-13 Thread Ross Barnowski


New submission from Ross Barnowski :

It would be nice if there were a way to get a string representation of a slice 
object in extended indexing syntax, e.g.

```
>>> myslice = slice(None, None, 2)
>>> print(myslice)
'::2'
```

One motivating use-case is in descriptive error messages, e.g.

```
TypeError(f"Can't slice {myobj}, try list({myobj})[{myslice}]")
```

In this case, it is much more natural for `myslice` to use the extended 
indexing syntax than the slice str/repr.

Perhaps this could be done via __str__, or if that is too big a change, maybe 
via __format__ e.g. `f"{myslice:asidx}"`

It's simple enough to write a conversion function, but this feels like a 
feature that would fit best upstream. I searched the issue tracker, PRs on 
GitHub, and the Python documentation and didn't see any related 
issues/PRs/articles.

xref: https://github.com/networkx/networkx/pull/4304

--
messages: 380921
nosy: rossbar
priority: normal
severity: normal
status: open
title: A string representation of slice objects with colon syntax
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42352>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42173] Drop Solaris support

2020-11-02 Thread Gordon Ross


Gordon Ross  added the comment:

I can understand the frustrations around dealing with minority platforms, but 
please remember that the illumos project (www.illumos.org) is basically the 
inheritor of problems around "Build on Solaris" for 3rd party software like 
Python.  There are several OS distributions based on illumos that would be 
impacted by removing the ability to (easily) build Python. I'm confident we can 
find some people to help maintain build-bots etc. if that's what it takes.  If 
you're still looking for such help, let me know and I'll ask on 
develop...@list.illumos.org for volunteers.

Thanks!  -GWR

--
nosy: +gwr

___
Python tracker 
<https://bugs.python.org/issue42173>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41914] test_pdb fails

2020-12-30 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Sumagna,

test_pdb appears to be working as expected on my machine. I realise this was 
posted a few months ago so would you mind trying again and seeing if the issue 
persists? If so, which OS are you running your tests on?

--
nosy: +trrhodes

___
Python tracker 
<https://bugs.python.org/issue41914>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42787] email.utils.getaddresses improper parsing of unicode realnames

2020-12-30 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Konstantin,

Thanks for raising this issue. It appears the field provided in your example 
does not conform to RFC 2822 followed by this email library. Square brackets 
are treated as special characters in [section 
3.2.1](https://tools.ietf.org/html/rfc2822#section-3.2.1), which is handled in 
the 
[_parseaddr](https://github.com/python/cpython/blob/master/Lib/email/_parseaddr.py#L219)
 file.

The above combined with the fact that any [failed parsing returns an two-tuple 
of ('', 
'')](https://github.com/python/cpython/blob/master/Lib/email/utils.py#L212) I 
believe explains the behavior observed.

--
nosy: +trrhodes

___
Python tracker 
<https://bugs.python.org/issue42787>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42794] test_nntplib fails on CI

2020-12-31 Thread Ross Rhodes


Ross Rhodes  added the comment:

Server is returning '215 Newsgroup descriptions in form "group description"', 
but an empty list of lines, so it's reaching the 'nothing' case in 
_getdescriptions: 
https://github.com/python/cpython/blob/master/Lib/nntplib.py#L660

--
nosy: +trrhodes

___
Python tracker 
<https://bugs.python.org/issue42794>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42916] Support for DICOM image file format in imghdr module

2021-01-16 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
nosy: +trrhodes
nosy_count: 2.0 -> 3.0
pull_requests: +23050
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24227

___
Python tracker 
<https://bugs.python.org/issue42916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42916] Support for DICOM image file format in imghdr module

2021-01-16 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hello Charles,

Following the format provided, I've opened a PR to implement your proposal. 
Feedback welcome.

--

___
Python tracker 
<https://bugs.python.org/issue42916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42756] smtplib.LMTP.connect() raises TypeError if `timeout` is not specified

2021-01-01 Thread Ross Rhodes


Change by Ross Rhodes :


--
pull_requests: +22886
pull_request: https://github.com/python/cpython/pull/24050

___
Python tracker 
<https://bugs.python.org/issue42756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Release 0.3.4 of orderedstructs including a C++/Python SkipList

2021-04-29 Thread Paul Ross
I have released v0.3.4 of the orderedstructs package that contains a high
performance SkipList implemented in C++ with Python bindings. A SkipList
behaves as an always sorted list with, typically, O(log(n)) cost for
insertion, look-up and removal. This makes it ideal for such operations as
computing the rolling median of a large dataset.

The characteristics of this SkipList implementation include:

   - No capacity restrictions apart from available memory.
   - Works with any C++ type  that has meaningful comparison operators.
   - The C++ SkipList can be compiled as thread safe.
   - The Python SkipList is thread safe.
   - Python SkipLists can be long/float/bytes/object types, the latter can
   have user defined comparison functions.
   - With Python 3.8+ SkipLists can be combined with the
   multiprocessing.shared_memory
   
<https://docs.python.org/3/library/multiprocessing.shared_memory.html#module-multiprocessing.shared_memory>
   module for concurrent operation on large arrays. For example concurrent
   roling medians
   
<https://skiplist.readthedocs.io/en/latest/rolling_median.html#rolling-median-in-python-with-multiprocessing-shared-memory>
   which speed up near linearly with the number of cores.
   - The implementation is extensively performance tested in C++ and Python.

There are a some novel features to this implementation:

   - A SkipList is a probabilistic data structure but we have deterministic
   tests that work for any (sane) random number generator. See testing a
   probabalistic data structure
   
<http://skiplist.readthedocs.io/en/latest/test_notes.html#testing-a-probabilistic-structure>
   - This SkipList can dynamically generate visualisations of its current
   internal state. See visualising a skiplist
   
<http://skiplist.readthedocs.io/en/latest/visualisations.html#skiplist-visualisation-label>

Project source: https://github.com/paulross/skiplist
PyPi: https://pypi.org/project/orderedstructs/
Documentation: http://skiplist.readthedocs.io/en/latest/index.html

Paul Ross.
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue42916] Support for DICOM image file format in imghdr module

2021-02-08 Thread Ross Rhodes

Ross Rhodes  added the comment:

Looking for input from other contributors here. Naturally with a PR already 
open I’m inclined to keep these changes, but if the majority agree that it is 
too specific a format then I’m happy to hear alternative suggestions?

Ross

--

___
Python tracker 
<https://bugs.python.org/issue42916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2021-02-08 Thread Ross Rhodes

Ross Rhodes  added the comment:

Thanks for sharing the alternative approach, Serhiy. Sounds like the proposed 
changes aren’t necessary if the combined use of samestat and lstat achieve the 
desired behaviour.

Any objections if I close the open PR?

--

___
Python tracker 
<https://bugs.python.org/issue42778>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Mutable defaults

2021-02-10 Thread Ross Wilson
On Thu, 11 Feb 2564 BE at 12:52 Grant Edwards 
wrote:

> On 2021-02-11, J. Pic  wrote:
>
> > I just meant removing the whole "default value mutating" story, not
> > removing mutable variables. Really, I was wondering if there was a use
> case
> > where this actually turns to an advantage,
>
> I've seen people show how it can be used to provide function-scope
> persistent storage -- the equivalent of declaring a static variable in
> a C function. I don't think I've seen that done in the wild, though.


Not sure this qualifies as "use in the wild", but the memoized naive
Fibonacci is very nice when written this way:

def fib(n, memo={0: 0, 1: 1}):
if n not in memo:
memo[n] = fib(n-1) + fib(n-2)
return memo[n]
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42916] Support for DICOM image file format in imghdr module

2021-04-12 Thread Ross Rhodes

Ross Rhodes  added the comment:

PR already open to support DICOM based on the first 132 characters. Marked 
“stale” since I haven’t had any feedback on GitHub, yet.

--

___
Python tracker 
<https://bugs.python.org/issue42916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43123] email MIME splitting

2021-04-12 Thread Ross Rhodes

Ross Rhodes  added the comment:

PR now “stale” since I have not received any feedback, yet.

--

___
Python tracker 
<https://bugs.python.org/issue43123>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43123] email MIME splitting

2021-02-07 Thread Ross Rhodes


Change by Ross Rhodes :


--
keywords: +patch
nosy: +trrhodes
nosy_count: 3.0 -> 4.0
pull_requests: +23267
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24475

___
Python tracker 
<https://bugs.python.org/issue43123>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43123] email MIME splitting

2021-02-07 Thread Ross Rhodes


Ross Rhodes  added the comment:

Hi Martin,

Looking into this further, it appears we already catch CR-LF characters in 
header values, but your test case shows that we do not run the same checks on 
header names.

I've opened a PR to rectify this - feel free to leave feedback.

Ross

--

___
Python tracker 
<https://bugs.python.org/issue43123>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Ross Martin


Ross Martin  added the comment:

I would like to fix this, if it hasnt been assigned already.

--
nosy: +MrRBM97

___
Python tracker 
<https://bugs.python.org/issue45147>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton


Ross Burton  added the comment:

Cool, glad to see the additional checks.

--

___
Python tracker 
<https://bugs.python.org/issue45749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton


New submission from Ross Burton :

If my openssl is built with no-scrypt then the Python build of hashlib fails 
(as EVP_PBE_scrypt isn't present), but the overall compile succeeds.

--
components: Build
messages: 405954
nosy: rossburton2
priority: normal
severity: normal
status: open
title: Silently fails to build hashlib if openssl has disabled algorithms

___
Python tracker 
<https://bugs.python.org/issue45749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton


Change by Ross Burton :


--
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



justifying text...and also...correct use of classes...

2004-12-29 Thread Ross La Haye

Few questions.  I have a module combin which contains Combin and Prob
classes.  This is the Prob class:

class Prob:
def binprob(self,n,k,p):
fewerthan = sum([Combin().kcomb(n,i)*((p**i)*(1-p)**(n-i)) for i in
range(k)])
exact = Combin().kcomb(n,k)*((p**k)*(1-p)**(n-k))
notexact = 1 - exact
atleast = 1 - fewerthan
atmost = fewerthan + exact
morethan = 1 - atmost

T0 = (('Fewer Than:', fewerthan),
('At Least:',  atleast),
('Exactly:',   exact),
('Not Exactly:', notexact),
('At Most:',  atmost),
('More Than:',   morethan))

for t in T0:
print t[0].rjust(12),'\t',t[1]

Is the way I've used the Combin class considered correct/appropriate in
the binprob method?  If not, what is the standard usage?  

Also, I'm trying to get my results to print close to this(.i.e., I would
like the first column to be right justified and the second column to be
exactly as it is):

Fewer Than: 0.376953125
At Least:   0.623046875
 Exactly:   0.24609375
Not Exactly:0.75390625
 At Most:   0.623046875
  More Than:0.376953125

but it comes out like this:

Fewer Than: 0.376953125
   At Least:0.623046875
Exactly:0.24609375
Not Exactly:0.75390625
At Most:0.623046875
  More Than:0.376953125

I feel like I'm missing something obvious here and apologize in advance if I
am, but I just can't figure it out.  Any help would be appreciated.  BTW,
I'm not using a dictionary because I want the results to print exactly in
the order specified and that seemed the simplest way.  Also, I used
rjust(12) because len(Not Exactly:) = 12 etc.
 
hawk


attachment: winmail.dat-- 
http://mail.python.org/mailman/listinfo/python-list

emulating an and operator in regular expressions

2005-01-02 Thread Ross La Haye

How can an and operator be emulated in regular expressions in Python?
Specifically, I want to return a match on a string if and only if 2 or more
substrings all appear in the string.  For example, for a string s = 'Jones
John' and substrings sg0 = 'Jones' and sg1 = 'John', I want to return a
match, but for substrings sg0 = 'Jones' and sg2 = 'Frank' I do not want to
return a match.  Because the expression 'A and B' is logically equivalent to
'not (not A or not B)' I thought I could try something along those lines,
but can't crack it.

Ross


attachment: winmail.dat-- 
http://mail.python.org/mailman/listinfo/python-list

Socket connection between python and C

2011-02-08 Thread Williamson, Ross X. (Guest)
Dear All,

I'm trying to implement a server/client system where the server is written in 
python and the client has to be written in c/c++.  I can happily send simple 
text through the socket. Ideally I would like make say a struct (using python 
struct library) - and then read that in using C. Is there a better way to 
package data on the server in python to send down a socket to a C client? XML? 
Pickle?

Cheers,

Ross
-- 
http://mail.python.org/mailman/listinfo/python-list


<    3   4   5   6   7   8