[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-05 Thread Brad Larsen
Brad Larsen added the comment: > Just curious, how did you find this? I am working on some new CodeQL queries (https://securitylab.github.com/tools/codeql/) and saw a warning about this self-assignment from one of the existing queries. LGTM apparently regularly scans cpython: ht

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Brad Larsen
Change by Brad Larsen : -- keywords: +patch pull_requests: +24572 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25904 ___ Python tracker <https://bugs.python.org/issu

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Brad Larsen
New submission from Brad Larsen : In Modules/_randommodule.c:600, `longval` is used in its own initialization. This seems to be a typo introduced in commit cc0cd43c0f9 for bpo-1635741. 585 static int 586 _random_exec(PyObject *module) 587 { 588 _randomstate *state

[issue43631] Update to OpenSSL 1.1.1k

2021-03-30 Thread Brad Warren
Brad Warren added the comment: To be fair, I doubt my project is affected by the CVEs. I was just looking to upgrade instead of trying to verify that. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43631] Update to OpenSSL 1.1.1k

2021-03-29 Thread Brad Warren
Brad Warren added the comment: When do you expect there will be new macOS and Windows downloads available at https://www.python.org/downloads/ that use OpenSSL 1.1.1k? One of my projects is relying on these files and I wasn't sure the ETA here

[issue43631] Update to OpenSSL 1.1.1k

2021-03-29 Thread Brad Warren
Change by Brad Warren : -- nosy: +bmw ___ Python tracker <https://bugs.python.org/issue43631> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-21 Thread Brad Warren
Brad Warren added the comment: Thanks for the help! I was mistaken here. The behavior I want is to not add the option to the namespace regardless of whether or not the user set it. I was initially under the impression that dest=SUPPRESS caused this behavior, however, it seems to have

[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-15 Thread Brad Warren
New submission from Brad Warren : argparse internally sets dest=SUPPRESS in action classes like _HelpAction and _VersionAction to prevent an attribute from being created for that option on the resulting namespace. Can users creating custom Action classes also use this functionality without

[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Brad Larsen
Brad Larsen added the comment: Nice work with the quick fix! I'm also happy to see the addition of the Linux ASAN builder -- that should help detect memory errors earlier on in the future. -- ___ Python tracker <https://bugs.python.

[issue41697] Heap buffer overflow in the parser

2020-09-02 Thread Brad Larsen
New submission from Brad Larsen : It looks like commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 introduced a heap buffer overflow: commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 (HEAD -> master, origin/master, origin/HEAD) Author: Pablo Galindo Date: Wed Sep 2 17:44:19 2

[issue41204] Use of unitialized variable `fields` along error path in code generated from asdl_c.py

2020-07-03 Thread Brad Larsen
New submission from Brad Larsen : In commit b1cc6ba73 from earlier today, an error-handling path can now read an uninitialized variable. https://github.com/python/cpython/commit/b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a#diff-fa7f27df4c8df1055048e78340f904c4R695-R697 In particular, asdl_c.py

[issue40561] Provide docstrings for public-facing webbrowser functions

2020-05-09 Thread Brad Solomon
Brad Solomon added the comment: To no surprise, not a lot of activity with the module over the last few years as it is fairly cut-and-dry. $ git shortlog -sn --since '5 years ago' Lib/webbrowser.py 3 Serhiy Storchaka 1 David Steele 1 Guido van Rossum 1 Michael Haas

[issue40561] Provide docstrings for public-facing webbrowser functions

2020-05-09 Thread Brad Solomon
Brad Solomon added the comment: The module source notes "Maintained by Georg Brandl." -- ___ Python tracker <https://bugs.python.org/issue40561> ___ ___

[issue40561] Provide docstrings for public-facing webbrowser functions

2020-05-09 Thread Brad Solomon
Change by Brad Solomon : -- nosy: +georg.brandl ___ Python tracker <https://bugs.python.org/issue40561> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40561] Provide docstrings for public-facing webbrowser functions

2020-05-08 Thread Brad Solomon
Change by Brad Solomon : -- keywords: +patch pull_requests: +19312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/1 ___ Python tracker <https://bugs.python.org/issu

[issue40561] Provide docstrings for public-facing webbrowser functions

2020-05-08 Thread Brad Solomon
New submission from Brad Solomon : Currently 'pydoc webbrowser.open' simply displays the function signature without a useful explanation of what 'new' does (and the parameter name/value set is not intuitive by name alone). -- assignee: docs@python components: Documentation messages

[issue38387] Document PyDoc_STRVAR

2019-10-06 Thread Brad Solomon
New submission from Brad Solomon : The C-API reference would benefit from a short mention of PyDoc_STRVAR usage, since it is used so frequently within Modules/. -- assignee: docs@python components: Documentation messages: 354053 nosy: bsolomon1124, docs@python priority: normal

[issue37982] Add a --minify argument to json.tool

2019-08-29 Thread Brad Solomon
Brad Solomon added the comment: > json.tool produces more readable representation. Your option is opposite to > this purpose. That is correct, though I'm not sure what point you're trying to make. The purpose of minifying isn't to make the input more readable; it's to co

[issue37982] Add a --minify argument to json.tool

2019-08-29 Thread Brad Solomon
Brad Solomon added the comment: Since, as you point out, json.tool is made for convenience, I see the reverse of pretty-printing (minifying) being just as convenient: $ cat > expanded.json < { > "foo": "bar", > "json": "obj&

[issue37982] Add a --minify argument to json.tool

2019-08-29 Thread Brad Solomon
Change by Brad Solomon : -- keywords: +patch pull_requests: +15277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15601 ___ Python tracker <https://bugs.python.org/issu

[issue37982] Add a --minify argument to json.tool

2019-08-29 Thread Brad Solomon
New submission from Brad Solomon : I propose adding a command line `--minify` flag to the json/tool.py module. This flag, if specified, uses `indent=None` and `separators=(',', ':')` to eliminate indent and separator whitespace in the output. Minifying JSON (as is also done frequently

[issue12178] csv writer doesn't escape escapechar

2019-08-14 Thread Brad MacGregor
Brad MacGregor added the comment: I needed this patch for a project, so I compiled python with the patch applied, and tested my specific use case, and it worked. Thanks for the patch! -- nosy: +avatarofhope ___ Python tracker <ht

[issue36960] Make datetime docs more user-friendly

2019-05-18 Thread Brad Solomon
New submission from Brad Solomon : The datetime docs are chalk full of detail. This is a positive aspect, and represents a huge amount of work by Tim Peters and A.M. Kuchling. However, it also may function as an obstacle for beginner readers and those simply seeking to answer a basic question

[issue36496] Local variables can be used uninitialized in _PyPreConfig_Read()

2019-03-31 Thread Brad Larsen
Change by Brad Larsen : -- keywords: +patch pull_requests: +12576 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36496> ___ ___ Py

[issue36496] Local variables can be used uninitialized in _PyPreConfig_Read()

2019-03-31 Thread Brad Larsen
New submission from Brad Larsen : In bpo-36301, in commit f72346c47537657a287a862305f65eb5d7594fbf, a couple possible uses of uninitialized variables were introduced into Python/preconfig.c. In particular, in _PyPreConfig_Read(), along an error-handling path, the `init_utf8_mode

[issue36495] Out-of-bounds array reads in Python/ast.c

2019-03-31 Thread Brad Larsen
New submission from Brad Larsen : There are currently 2 places in Python/ast.c on master where an out-of-bounds array read can occur. Both were introduced with the merge of of typed_ast into CPython in commit dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c (bpo-35766, GH-11645). In both places

[issue36253] Use after free in ctypes test suite

2019-03-31 Thread Brad Larsen
Brad Larsen added the comment: I was just going to submit a patch for this, then I found this issue. I can confirm; I see the same use-after-free without the fix. -- nosy: +blarsen ___ Python tracker <https://bugs.python.org/issue36

[issue33797] json int encoding incorrect for dbus.Byte

2018-06-07 Thread Brad Bishop
New submission from Brad Bishop : JSON does not correctly encode dbus.Byte from dbus-python on 2.7: dbus.Byte is a subclass of int with its own __str__ implementation. >>> import json >>> import dbus >>> json.dumps(dbus.Byte(0)) '\x00' On 3.x: >>> import

[issue31670] Associate .wasm with application/wasm

2018-05-10 Thread Brad Nelson
Brad Nelson <bradnel...@google.com> added the comment: We have a provisional registration for application/wasm now with IANA: https://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml This is also shipping in Firefox and Chrome.

[issue31456] SimpleCookie fails to parse any cookie if an entry has whitespace in the name

2017-10-10 Thread Brad Smith
Brad Smith <bra...@gmail.com> added the comment: According to RFC-6265 (which also references RFC-2616 to define "tokens"), the space character (and whitespace in general) is not valid in cookie-names or cookie-values. RFC-6265: https://tools.ietf.org/html/rfc6265#sectio

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread Brad Nelson
Brad Nelson <bradnel...@google.com> added the comment: Tentative might be an understatement. There was 4 browser sign-off on using that mime type within the WebAssembly CG, which has drafted the spec so far. We're in the process of handing v1 of the spec off to the WebAssembly Working

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread Brad Nelson
Change by Brad Nelson <bradnel...@google.com>: -- keywords: +patch pull_requests: +3841 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread Brad Nelson
New submission from Brad Nelson <bradnel...@google.com>: WebAssembly is tentatively spec'ed to require the application/wasm mime type for download sources: https://github.com/WebAssembly/design/blob/master/Web.md The mimetype module should associate .wasm with this mimetype to allow

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen
Brad Larsen added the comment: @eryksun, you are right! The output *is* an absolute path as far as `os.path.isabs` is concerned. @ned.deily, you are right about my example --- I transcribed it wrong, and it should be `-c`. The system in question is not a Mac OS system, but a Linux system

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen
Brad Larsen added the comment: It looks like sys.executable is *not* always an absolute path. In Python 2.7: $ which python2.7 /opt/local/bin/python2.7 $ cd /opt/local/bin $ ../bin/python2.7 -m 'import sys; print(sys.executable)' /opt/local/bin/../bin/python2.7 Also

[issue7159] Urllib2 authentication memory.

2016-05-24 Thread Brad Olson
Brad Olson added the comment: Yes, Go ahead. Thanks. On Tue, May 24, 2016 at 1:56 AM, Terry J. Reedy <rep...@bugs.python.org> wrote: > > Terry J. Reedy added the comment: > > Should this be closed? A substantial patch was pushed year ago and I see > no indica

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-16 Thread Brad Larsen
Brad Larsen added the comment: Yeah, this appears to be fixed along with #24552. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24630

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-14 Thread Brad Larsen
Brad Larsen added the comment: Both test cases cause segfaults for me: (1) on 64-bit Python 3.4.3 built from source on Mac OS X (2) on the system 64-bit Python 3.4.3 from Debian Jessie I do not see the segfaults with a 64-bit build of the latest sources (cpython `default` branch

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
New submission from Brad Larsen: `load_newobj_ex` in can crash with a null pointer dereference. File Modules/_pickle.c: static int load_newobj_ex(UnpicklerObject *self) { PyObject *cls, *args, *kwargs; PyObject *obj; PickleState *st = _Pickle_GetGlobalState

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
Brad Larsen added the comment: Seems to be similar to #24552, but not the same problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24630

[issue24630] null pointer dereference in `load_newobj_ex`

2015-07-13 Thread Brad Larsen
Brad Larsen added the comment: Also, it appears that the `ob_type` field of `cls` need not be NULL; it can be an arbitrary value treated as a memory location. Attached another POC that triggers this case. -- Added file: http://bugs.python.org/file39922/bug-nonnull.py

[issue24618] Invalid read in PyCode_New

2015-07-12 Thread Brad Larsen
New submission from Brad Larsen: `PyCode_New` can read invalid heap memory. File Objects/codeobject.c: PyCodeObject * PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names

Google Web Search API

2015-04-29 Thread brad . ahlers
Does anyone know of any current Python projects that utilize Google's search engine to return quick answers to questions? For example, if you Google When did Abraham Lincoln die, Google returns April 15, 1865 before listing any results. I know of many projects that utilize Google search to

subprocess command fails

2015-02-20 Thread Brad s
# cat makekeys.py #!/usr/bin/python3.4 import subprocess import sys import string import os.path import datetime import shlex from time import gmtime, strftime from subprocess import Popen, PIPE, STDOUT pretime = strftime(%Y%m%d%H, gmtime()) time = datetime.datetime.strptime(pretime,'%Y%m%d%H')

Re: subprocess command fails

2015-02-20 Thread Brad s
= %r % (cmdargv,)) sfmove = subprocess.call(cmdargv) also, is the % to Python what precision is to C++? On Friday, February 20, 2015 at 6:30:51 PM UTC-5, Brad s wrote: # cat makekeys.py #!/usr/bin/python3.4 import subprocess import sys import string import os.path import datetime import

Re: subprocess command fails

2015-02-20 Thread Brad s
Time adjustment error: # python3.4 timefix.py 2015022105 2015-02-21 05:00:00 Traceback (most recent call last): File timefix.py, line 15, in module ndate = datetime.datetime.strptime(timeadd, '%Y%m%d%H') TypeError: must be str, not datetime.datetime # cat timefix.py #!/usr/bin/python3.4

Re: subprocess command fails

2015-02-20 Thread Brad s
fixed with now = datetime.datetime.now() later = now + datetime.timedelta(days=2*365) striplater = later.strftime('%Y%m%d%H') # python3.4 makekeys.py Enter the domain to configure keys for? test1234.com Generating key

[issue21488] codecs.encode/decode documentation inconsistency

2014-05-12 Thread Brad Aylsworth
New submission from Brad Aylsworth: The documentation page for codecs (https://docs.python.org/2/library/codecs.html) shows keyword arguments for codecs.encode and codecs.decode, but they throw an error if keyword arguments are used. codecs.decode.__doc__ reports 'decode(obj, [encoding

Re: Venus / GuthVenus for iPhone, Nexus, Droid and Android Jelly Bean

2014-03-17 Thread Brad Guth
On 3/17/2014 3:33 PM, Thrinaxodon wrote: In article 71ab5220-6d5d-46bf-b33a-16aae6c87...@googlegroups.com, bradg...@gmail.com says... On Wednesday, February 5, 2014 2:59:23 PM UTC-8, Brad Guth wrote: On Saturday, January 11, 2014 3:52:10 PM UTC-8, Brad Guth wrote: NOVA and Discovery Channel

PyTexas: last day for $25 registration, talk proposal

2012-09-01 Thread Brad Allen
Just wanted to send out this quick reminder--today is the last day for PyTexas $25 registration; starting tomorrow it will cost $50. http://www.pytexas.org/chance/1/register/ Today is also your last day to post your talk proposals. http://www.pytexas.org/chance/1/talks/add/ Btw, there

Re: PyTexas: last day for $25 registration, talk proposal

2012-09-01 Thread Brad Allen
Whoops, false alarm. Tomorrow, August 31 is actually the last day to register and pay at the $25 rate for PyTexas. Likewise for talk proposals. On Thu, Aug 30, 2012 at 3:36 PM, Brad Allen bradallen...@gmail.com wrote: Just wanted to send out this quick reminder--today is the last day

[issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile

2012-07-05 Thread Brad Tilley
for this to happen? I ask because we are seeing some file corruption on a GPFS filesystem where we are using Python 2.6 and shutil.copyfile with symlinks. I'm not on this list, so cc me if you reply to the list and want me to see the response. Thanks, Brad

Re: emacs user interface design? a talk by Bret Victor

2012-02-27 Thread Brad
On Feb 26, 7:01 pm, NanoThermite FBibustards nanothermitefbibustardsa...@gmail.com wrote: @Xah Lee, he only tell one point, fast interpreter avoiding Edit- Compile-Run cycle, and make it INTERACTIVE, the guy did not teach nothing of design. The principle was first given by Margaret Hamilton

signed to unsigned

2012-02-17 Thread Brad Tilley
In C or C++, I can do this for integer conversion: unsigned int j = -327681234; // Notice this is signed. j will equal 3967286062. I thought with Python that I could use struct to pack the signed int as an unsigned int, but that fails: x = struct.pack(I, -327681234) Traceback (most recent call

Re: signed to unsigned

2012-02-17 Thread Brad Tilley
more efficient way to do this though. Cheers, Chris Thanks Chris! I was doing it backwards. I only have a few of these right now, so performance isn't a concern. I appreciate the advice. Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: signed to unsigned

2012-02-17 Thread Brad Tilley
0x -327681234 3967286062 Very nice! Thanks for that example. Unsigned long longs: 0x -9151314442815602945 9295429630893948671L -- http://mail.python.org/mailman/listinfo/python-list

Make a small function thread safe

2011-12-16 Thread Brad Tilley
} A thread locks the function on entrance and then releases it on exit. What is the equivalent way to do this in Python? Many thanks! Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
On Fri, Dec 16, 2011 at 8:33 AM, Tim Wintle tim.win...@teamrubber.comwrote: On Fri, 2011-12-16 at 05:21 -0800, Brad Tilley wrote: 107 void increment_counter( unsigned int counter ) 108 { 109 boost::mutex::scoped_lock lock( counter_lock ); 110

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
On Fri, Dec 16, 2011 at 9:24 AM, Brad Tilley kj4...@gmail.com wrote: On Fri, Dec 16, 2011 at 8:33 AM, Tim Wintle tim.win...@teamrubber.comwrote: On Fri, 2011-12-16 at 05:21 -0800, Brad Tilley wrote: 107 void increment_counter( unsigned int counter ) 108 { 109

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
than the explicit acquire() and release() so I'll use that approach. I appreciate your advice. Brad -- http://mail.python.org/mailman/listinfo/python-list

10 Reasons You Should Attend PyTexas 2011...Register Now!

2011-08-11 Thread Brad Allen
If you're in the Texas area, please check out this post explaining registration and the 10 reasons you should consider attending PyTexas 2011: http://pytexas.blogspot.com/2011/08/10-reasons-you-should-attend-pytexas.html We opened registration on Monday morning with this post to the local user

PyTexas 2011 Call for Proposals

2011-06-13 Thread Brad Allen
PyTexas 2011, the fourth annual Python programming conference for Texas and the surrounding region, will take place Saturday September 10 and Sunday September 11, 2011 at Texas AM University in College Station, Texas. Last year with 94 attendees, PyTexas 2010 reached critical mass to achieve an

python 3 - instantiating class from user input

2011-04-06 Thread Brad Bailey
I dont understand why this is such a big deal. Nor do i understand why google can't find a reasonable answer. If one can't figure out from the title what I'm trying to do, then a look at code should firmly plant the intent. The general idea of the code is, in my opinion, very basic. I notice,

Python CPU

2011-04-01 Thread Brad
Hi All, I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL or Verilog? -Brad -- http://mail.python.org/mailman/listinfo/python-list

RE: Python Tools for Visual Studio from Microsoft - Free Open Source

2011-03-13 Thread Brad Davies
From: pa...@cruzio.com To: santacruz-...@hotmail.com Subject: Fw: Python Tools for Visual Studio from Microsoft - Free Open Source Date: Thu, 10 Mar 2011 18:47:19 -0800 - Original Message - From: pyt...@bdurham.com To: roland garros rolandgarros...@gmail.com;

Python SIG for Healthcare IT

2011-03-11 Thread Brad Allen
For those seeking to work with Python-based tools in the healthcare IT industry, this SIG (special interest group) can provide a forum to discuss challenges and hopefully foster knowledge sharing and tools development. Relevant topics include tools for working with healthcare standard data

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-13 Thread Brad Greenlee
Brad Greenlee b...@footle.org added the comment: Understood. I just felt that fileobj.mode == None should be handled the same way that GzipFile(...,mode=None) is handled. I've submitted a patch to Django: http://code.djangoproject.com/ticket/14681

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-12 Thread Brad Greenlee
Brad Greenlee b...@footle.org added the comment: GzipFile.__init__ considers mode == None to be the equivalent of undefined, and sets it to the default of 'rb'. I see fileobj.mode == None as the same thing. That said, it is probably a bug in Django as well; I'll look into that. I still think

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-12 Thread Brad Greenlee
Brad Greenlee b...@footle.org added the comment: Yes, but if I actually passed mode=None in, the behavior would be the same, no? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10392

[issue10392] GZipFile crash when fileobj.mode is None

2010-11-11 Thread Brad Greenlee
New submission from Brad Greenlee b...@footle.org: If GZipFile.__init_ is passed a fileobj that has a mode attribute set to None, it will crash with a 'NoneType' object is unsubscriptable error when it tries to read the first character of the mode. I ran across this when trying to pass

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-26 Thread Brad
On Aug 25, 4:05 am, Alex McDonald b...@rivadpm.com wrote: Your example of writing code with memory leaks *and not caring because it's a waste of your time* makes me think that you've never been a programmer of any sort. Windows applications are immune from memory leaks since programmers can

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Brad
in comp.lang.forth have a penchant for sarcasm - one of the reasons I always read their posts. Maybe it gets lost on the international crowd, but I love it. -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Brad
of the stack pointer. -Brad -- http://mail.python.org/mailman/listinfo/python-list

PyTexas 2010 Call for Proposals

2010-06-14 Thread Brad Allen
PyTexas 2010, the fourth annual Python programming conference for Texas and the surrounding region, will take place Saturday August 28, 2010 at the Baylor University in Waco, Texas. A variety of activities are under consideration, including tutorials, scheduled talks, Lightning Talks, Open Spaces,

PyTexas survey

2010-05-27 Thread Brad Allen
Hello Python Community, If you live in the Texas region, please help with PyTexas 2010 planning by filling out the new survey. This will tell us things like whether the planned Aug 28 date works for you, whether you have a user group in your area, and more importantly your t-shirt size :-).

Re: Can I make sqlite3 or shelve work reliably on any Win/Linux/Mac?

2010-02-22 Thread Brad Harms
# Mac binary elif 'darwin' == sys.platform: import _sqlite3_mac as _sqlite3 sys.modules['_sqlite3'] = _sqlite3 I'm not exactly sure when you would run this code. It would have to be sometime before you import the main sqlite3 module. -- Brad Harms -- http://alphaios.net -- http

Re: method to intercept string formatting % operations

2010-02-05 Thread Brad Allen
On Fri, Feb 5, 2010 at 9:49 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Anyway why would you want to use the tuple form ? it's beaten in every aspect by the dictionary form. I'm subclassing a namedtuple, and adding some additional functionality such as __getitem__, __setitem__, so

Re: KeyboardInterrupt

2009-12-09 Thread Brad Harms
of your script as possible. The signal that the OS sends to the Python interpreter is irrelevant. -- Brad Harms -- http://alphaios.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-12-04 Thread Brad Harms
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote: Brad Harms fearsomedragon...@gmail.com writes: Anyway, it looks like the docs agree with you (http://docs.python.org/glossary.html#term-attribute), so I'm not going to argue. That's good, because the terms are quite well established

Re: Feature request: String-inferred names

2009-12-04 Thread Brad Harms
cumbersome to say properties or dynamic attributes using __getattr__ or __getattribute__ all the time. That will be my last message for a while...good night, c.p.l. -- Brad Harms -- http://alphaios.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-12-03 Thread Brad Harms
On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote: On Mon, 30 Nov 2009 18:55:46 -0800, The Music Guy wrote: Lie Ryan, I think I see what you're saying about using __dict__ to add members to a class, but it's not quite the same. __dict__ is only for attributes, NOT properties,

Re: Feature request: String-inferred names

2009-12-03 Thread Brad Harms
On Tue, 2009-12-01 at 16:58 +0100, Bruno Desthuilliers wrote: The Music Guy a écrit : (snip) Lie Ryan, I think I see what you're saying about using __dict__ to add members No members in Python - only attributes. to a class, but it's not quite the same. __dict__ is only for

Re: Feature request: String-inferred names

2009-11-29 Thread Brad Harms
On Sun, Nov 29, 2009 at 7:49 PM, Lie Ryan lie.1...@gmail.com wrote: On 11/29/2009 12:22 PM, The Music Guy wrote: When I first started seeing @ show up in Python code, I said what the heck is that? It looks so weird and _ugly_.I would never try to mess with that. But I started seeing it more

Re: Feature request: String-inferred names

2009-11-29 Thread Brad Harms
Python's distinction between items and attributes, but I don't want to be limited by it due to mere syntactical constraints, either. May the Penguin in the sky bless your every subroutine, Brad Harms -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-11-25 Thread Brad
On Nov 25, 10:49 pm, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 25, 2009 at 6:35 PM, The Music Guy fearsomedragon...@gmail.com wrote: Hello all, I just posted to my blog about a feature that I'd like to see added to Python. Before I go through the trouble of learning how to write

[issue7159] Urllib2 authentication memory.

2009-10-17 Thread Brad Olson
New submission from Brad Olson br...@movedbylight.com: For each request requiring HTTP authentication, urllib2 submits the request without authentication, receives the server's 401 error/challenge, then re-submits the request with authentication. This is compliant behavior. The problem comes

Re: Sequence splitting

2009-07-03 Thread Brad
. Either way, what I am still wondering is if people would find a built- in implementation useful? -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-03 Thread Brad
are not allowed to post to this mailing list reply. Perhaps because I am posting through Google groups? Or maybe one must be an approved member to post? -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-03 Thread Brad
(keys, d.has_key) There are probably a dozen other approaches, but the existing filter is fast, clear, and *almost* good enough. So when is this useful in general: Whenever filter itself is useful, but you want to use both sides of the partitioning work it already does. -Brad -- http

Re: Sequence splitting

2009-07-02 Thread Brad
(and less clear imo). I fixed my version to take a bool default. Either way, I'm not really looking for additional ways to do this in Python unless I've totally missed something. What I am considering is writing it in C, much like filter. -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-02 Thread Brad
On Jul 2, 8:17 pm, Pablo Torres N. tn.pa...@gmail.com wrote: On Jul 2, 9:56 pm, schickb schi...@gmail.com wrote: I have fairly often found the need to split a sequence into two groups based on a function result. This sounds like it belongs to the python-ideas list.  I suggest posting

Re: Sequence splitting

2009-07-02 Thread Brad
On Jul 2, 9:08 pm, Paul Rubin http://phr...@nospam.invalid wrote: Brad schi...@gmail.com writes: On Jul 2, 8:14 pm, Paul Rubin http://phr...@nospam.invalid wrote: schickb schi...@gmail.com writes: def split(seq, func=None):     if func is None:         func = bool     t, f

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2009-03-26 Thread Brad Miller
Brad Miller bonel...@gmail.com added the comment: On Thu, Mar 26, 2009 at 4:29 PM, Barry A. Warsaw rep...@bugs.python.orgwrote: Barry A. Warsaw ba...@python.org added the comment: I propose that you only document the getitem header access API. I.e. the thing that info() gives you can

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2009-03-18 Thread Brad Miller
Changes by Brad Miller bonel...@gmail.com: -- nosy: +bmiller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list mailing

[issue5232] Setting font from preference dialog in IDLE on OS X broken

2009-03-17 Thread Brad Miller
Brad Miller bonel...@gmail.com added the comment: I get the same problem when I try to change the key set. This is on on intel build using Tk 8.5, and the latest 3.1 source checked out with bzr. I too changed the order of /Library/Frameworks and /System/Library/Frameworks in setup.py

[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2009-03-11 Thread Brad Miller
Brad Miller bonel...@gmail.com added the comment: I hand applied the patch because I hoped it would fix the problem of the cursor going all the way to the left of the in the Python shell when you press home or ctrl-a. The patch as it is does not solve this problem on the Mac. I've uploaded

[issue5276] IDLE startup file .Idle.py not documented

2009-03-10 Thread Brad Miller
Brad Miller bonel...@gmail.com added the comment: Here's a simple patch that documents the different startup files. It is missing a good use case for .Idle.py but I'd be happy to add that if someone can give me one. -- keywords: +patch message_count: 1.0 - 2.0 nosy: +bmiller

[issue2610] string representation of range and dictionary views

2009-03-10 Thread Brad Miller
Brad Miller bonel...@gmail.com added the comment: Just to restart the discussion on the original issue since I see that the latest 3.1 has solved the problem with dict_keys, dict_values, etc al objects. Many thanks! A suggestion was made by Alexander to create a custom displayhook

String Comparison Testing

2008-12-24 Thread Brad Causey
to locate any documentation online that outlines restrictions when using special characters. Any thoughts? Thanks! -Brad Causey CISSP, MCSE, C|EH, CIFI Zero Day Consulting -- http://mail.python.org/mailman/listinfo/python-list

VERY simple string comparison issue

2008-12-24 Thread Brad Causey
to locate any documentation online that outlines restrictions when using special characters. Any thoughts? Thanks! -Brad -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >