What kind of "thread safe" are deque's actually?

2023-03-27 Thread Travis Griggs
A while ago I chose to use a deque that is shared between two threads. I did so because the docs say: "Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.”

mapLast, mapFirst, and just general iterator questions

2022-06-14 Thread Travis Griggs
I want to be able to apply different transformations to the first and last elements of an arbitrary sized finite iterator in python3. It's a custom iterator so does not have _reversed_. If the first and last elements are the same (e.g. size 1), it should apply both transforms to the same

Polymorphic imports

2021-09-21 Thread Travis Griggs
I guess this is kind of like mocking for testing. I have a simple module that's imported in a number of other spots in my program. There's a condition in the OS/filesystem where I'd like to import a polymorphically compatible variant of the same module. Can this be accomplished in a sort of

[issue44507] Favor needed ASAP

2021-06-24 Thread Glenn Travis
New submission from Glenn Travis : - This mail is in HTML. Some elements may be ommited in plain text. - Hi to you! Need a favor from you, do you have an account with Amazon? Glenn Travis -- messages: 396511 nosy: Old Sub Sailor priority: normal severity: normal status: open title

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-04-29 Thread Glenn Travis
Glenn Travis added the comment: Here is a copy of the Apple Python call as of April 29, 2021. To my way of thinking it seems that Apple is saying that someday they will indeed eliminate all the included “scripting” software from macOS and they further imply that one should install an. Up

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-04-28 Thread Glenn Travis
Glenn Travis added the comment: I see that this remains alive. I do have a newer question. Apple continues to say that they are going to drop all their included versions of python and I believe ruby in some future version of macOS. I thought that this would happen in Big Sur, but python

Re: Fun Generators

2021-04-23 Thread Travis Griggs
> On Apr 23, 2021, at 05:55, Frank Millman wrote: > > On 2021-04-23 7:34 AM, Travis Griggs wrote: >> Doing an "industry experience" talk to an incoming class at nearby >> university tomorrow. Have a couple points where I might do some "fun things"

Fun Generators

2021-04-22 Thread Travis Griggs
Doing an "industry experience" talk to an incoming class at nearby university tomorrow. Have a couple points where I might do some "fun things" with python. Said students have been learning some python3. I'm soliciting any *fun* generators people may have seen or written? Not so much the cool

Re: Canonical conversion of dict of dicts to list of dicts

2021-03-30 Thread Travis Griggs
> On Mar 30, 2021, at 12:11, Stestagg wrote: > > For completeness, from 3.5 onwards, you can also do the following: > > [{'name': n, **d} for n, d in dod.items()] > Reading through these, personally I like this one best. I'm curious what about it was enabled in 3.5? Was **kwarg expansion

Code Formatter Questions

2021-03-28 Thread Travis Griggs
I've been looking into using a code formatter as a code base size has grown as well as contributing developers. I've found and played with autopep, black, and yapf. As well as whatever pycharm has (which may just be gui preferences around one of those 3). I have 2 questions: 1) Are there any

[issue40649] [Errno 1]

2020-05-17 Thread Glenn Travis
Glenn Travis added the comment: I think that you are referring to Gatekeeper. Something that I have run into with various applications, such as certain utility files in Ortho4XP and even when adding aircraft to X-Plane(some of the developers refuse to become approved Apple developers

[issue40649] [Errno 1]

2020-05-17 Thread Glenn Travis
Glenn Travis added the comment: As per your suggestion I have sent an email to python help, just looking for info regarding what you would consider the key permission settings. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40649] [Errno 1]

2020-05-17 Thread Glenn Travis
Glenn Travis added the comment: ok, fine. So what permissions would indicate that "the Python interpreter can read it." The Get Info screenshot that he sent me looks just like mine with regard to permissions. The long list in terminal shows nothing special. I am not having proble

[issue40649] [Errno 1]

2020-05-16 Thread Glenn Travis
Glenn Travis added the comment: I think that I will ask him to reinstall Python. Which can be a scary process for him. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40649] [Errno 1]

2020-05-16 Thread Glenn Travis
Change by Glenn Travis : Added file: https://bugs.python.org/file49159/errormessage.jpg ___ Python tracker <https://bugs.python.org/issue40649> ___ ___ Python-bugs-list m

[issue40649] [Errno 1]

2020-05-16 Thread Glenn Travis
Glenn Travis added the comment: I think that there is something odd going on with his python install. He just tried to run a very simple python script that I made for him, print('Hello there python interperter') And he got the same error message again. I do not know what more information

[issue40649] [Errno 1]

2020-05-16 Thread Glenn Travis
Change by Glenn Travis : -- title: [Errno 1} -> [Errno 1] ___ Python tracker <https://bugs.python.org/issue40649> ___ ___ Python-bugs-list mailing list Un

[issue40649] [Errno 1}

2020-05-16 Thread Glenn Travis
New submission from Glenn Travis : A fellow on the X-Plane forum reported getting this: cd desktop/Ortho4XP-130 ianrobertson@Ians-iMac Ortho4XP-130 % python3 Ortho4XP_v130.py /Library/Frameworks/Python.framework/Versions/3.8/bin/python3: can't open file 'Ortho4XP_v130.py': [Errno 1

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-15 Thread Glenn Travis
Glenn Travis added the comment: Is there no way to edit a previous comment? Anyway, I can get it to work as described, but the Launcher Preferences window also opens when I run a script. Did I miss a setting? -- ___ Python tracker <ht

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis
Glenn Travis added the comment: It is working now. However, I end up with two terminal windows open. One is the one that I opened and the second appears to have been opened by the Launcher?? -- ___ Python tracker <https://bugs.python.

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis
Glenn Travis added the comment: Thank you Ned. So close now. After your final fix, if I understood you correctly, we will no longer have to open Terminal? And, excuse my vast knowledge gap, but will it ever be possible to not have the terminal run in the future

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis
Glenn Travis added the comment: Well heck. I just tried it, and got an error. The error does not occur when I run the script directly from the Terminal, nor when I run it via IDLE (double click) Last login: Thu May 14 07:57:11 on ttys000 But what do I know? % cd '/Volumes/BigHDD/Ortho4XP

[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis
Glenn Travis added the comment: I appreciate the update. As an aside, I keep the terminal in the dock. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40477] Launcher on Catalina

2020-05-11 Thread Glenn Travis
Glenn Travis added the comment: I tried to report this concern under Documentation, but got shot down as duplicate. I have the same results. I tried to make Launcher the default "Open With" application for a script, also tried dragging (and Option dragging) the script to th

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2020-05-09 Thread Glenn Travis
Glenn Travis added the comment: Thank you, but how in the world does one know where to look or find that document at github. I tried to search earlier and got hundreds of listings for python doc. Sent from my iPhone > On May 9, 2020, at 16:36, Glenn Travis wrote: > > Thank

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2020-05-09 Thread Glenn Travis
Glenn Travis added the comment: Thank you Remi > On May 9, 2020, at 4:15 PM, Rémi Lapeyre wrote: > > > Rémi Lapeyre added the comment: > > Hi Gleen, the best way forward is to propose an improvement to the current > documentation. It will get reviewed and

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2020-05-09 Thread Glenn Travis
Glenn Travis added the comment: So, how do we wake this sleeping concern up? -- nosy: +TotallyLost ___ Python tracker <https://bugs.python.org/issue32

[issue40580] Macintosh Documentation Still Bad

2020-05-09 Thread Glenn Travis
Glenn Travis added the comment: Pull - Request? -- ___ Python tracker <https://bugs.python.org/issue40580> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40580] Macintosh Documentation Still Bad

2020-05-09 Thread Glenn Travis
Glenn Travis added the comment: Thank you for your reply. I just wanted to renew or recall attention to the older one. It seems to have been dormant for too long. A C program is like a fast dance on a newly waxed dance floor by people carrying razors. -W.R. And now for something

[issue40580] Macintosh Documentation Still Bad

2020-05-09 Thread Glenn Travis
New submission from Glenn Travis : This was reported two years ago, and still is not fixed https://bugs.python.org/issue32824#msg312028 and the documentation is even older. It starts off referencing "Mac OS X 10.8" and Apple Documents that are archived. Then the section referen

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-11 Thread Travis Lazar
Travis Lazar added the comment: FYI: this affects tornado_http and django_template as well. -- ___ Python tracker <https://bugs.python.org/issue38739> ___ ___

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-08 Thread Travis Lazar
Travis Lazar added the comment: Really appreciate all the commentary and references here. Thanks for that. The resolution of disabling html5lib in pyperformance is good. I'll assume no html5lib benchmarking in pyperformance (master) until a version of html5lib is released compatible

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
Travis Lazar added the comment: Forgot to include that this was built on an aarch64 (Ampere eMAG) system. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
New submission from Travis Lazar : When running pyperformance html5lib test, the application crashes with "ImportError: cannot import name 'Mapping' from 'collections' (/py3buildpath/lib/python3.9/collections/__init__.py)" To reproduce: 1 - Build Python from source. I produce

How do/can I generate a PKCS#12 file the cryptography module?

2019-02-13 Thread Travis Griggs
I’m using the cryptography module (https://cryptography.io/en/latest/) to try and generate some cert/key/identities. It's pretty easy using said module to generate the contents of .pem file for a private key: keyPEMBytes = privateKey.private_bytes(

More elegant way to avoid this hacky implementation of single line reduce for grouping a collection?

2019-01-25 Thread Travis Griggs
Yesterday, I was pondering how to implement groupby, more in the vein of how Kotlin, Swift, Objc, Smalltalk do it, where order doesn’t matter. For example: def groupby(iterable, groupfunc): result = defaultdict(list) for each in iterable:

[issue34758] http.server module sets incorrect mimetype for WebAssembly files

2018-09-20 Thread Travis O'Neill
New submission from Travis O'Neill : Mimetype is set to application/octet-stream for .wasm files instead of the correct application/wasm. This causes streaming compile feature to fail (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly

Google weirdness

2018-07-12 Thread Travis McGee
I somehow managed to trigger the dialog below by typing in a certain Python phrase to Google. Anyone know what it's about? It shows up in what appears to be terminal screen. Viz: Google has a code challenge ready for you. Been here before? This invitation will expire if you close this page.

Simplest way to clobber/replace one populated directory with another?

2018-05-15 Thread Travis Griggs
I have a directory structure that might look something like: Data Current A B C Previous A X In as simple/quick a step as possible, I want to rename Current as Previous including the contents and wiping out the

[issue33421] Missing documentation for typing.AsyncContextManager

2018-05-14 Thread Travis DePrato
Change by Travis DePrato <trav...@umich.edu>: -- pull_requests: +6507 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33421> ___ _

[issue33421] Missing documentation for typing.AsyncContextManager

2018-05-14 Thread Travis DePrato
Change by Travis DePrato <trav...@umich.edu>: -- pull_requests: +6508 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33421> ___ _

[issue33421] Missing documentation for typing.AsyncContextManager

2018-05-03 Thread Travis DePrato
New submission from Travis DePrato <trav...@umich.edu>: The documentation for the typing module makes no mention of AsyncContextManager, which is defined in Lib/typing.py as AsyncContextManager = _alias(contextlib.AbstractAsyncContextManager, T_co) as of >= Python 3.8; b

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
> On Apr 17, 2018, at 11:15 AM, MRAB <pyt...@mrabarnett.plus.com> wrote: > > On 2018-04-17 17:02, Travis Griggs wrote: >> I posted this on SO, but… yeah… >> I'm doing some serial protocol stuff and want to implement a basic byte >> stuffing algorithm in pytho

Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
I posted this on SO, but… yeah… I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. Though really what this really generalizes to is “what is the most pythonic way to transform one sequence of bytes where some bytes are passed through 1:1, but

ANN: AnacondaCON February 7-9, Austin TX --- Python powered Open Data Science Conference

2017-01-12 Thread Travis Oliphant
adoption of Python for data science and numerical / technical computing. I really hope to see you there. Best, Travis Oliphant -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-25 Thread Travis Griggs
> On Oct 25, 2016, at 5:55 AM, Chris Angelico wrote: > > On Tue, Oct 25, 2016 at 11:45 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> On Tue, Oct 25, 2016 at 11:09 PM, Marko Rauhamaa wrote: Blocking calls are

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Travis Griggs
> On Sep 13, 2016, at 13:57, rgrigo...@gmail.com wrote: > > It would help newbies and prevent confusion. for each in ['cake'] + ['eat', 'it'] * 2: print(each) -- https://mail.python.org/mailman/listinfo/python-list

[issue27217] IDLE 3.5.1 not using Tk 8.6

2016-06-04 Thread Glenn Travis
Glenn Travis added the comment: Alas, I apologize -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27217> ___ ___ Python-bugs-list

[issue27217] IDLE 3.5.1 not using Tk 8.6

2016-06-04 Thread Glenn Travis
Glenn Travis added the comment: Thank you again, Does that mean that I will need to reinstall 8.6 when python 3.6 comes out? > On Jun 4, 2016, at 11:34 AM, Ned Deily <rep...@bugs.python.org> wrote: > > > Ned Deily added the comment: > > Well, 8.6 is the latest versio

[issue27217] IDLE 3.5.1 not using Tk 8.6

2016-06-04 Thread Glenn Travis
Glenn Travis added the comment: Ok, Thank you. I wonder why they have OS X version 8.6, which seems to be the default dl link page? > On Jun 4, 2016, at 11:25 AM, Ned Deily <rep...@bugs.python.org> wrote: > > > Ned Deily added the comment: > > Assuming you are usi

[issue27217] IDLE 3.5.1 not using Tk 8.6

2016-06-04 Thread Glenn Travis
New submission from Glenn Travis: I do not know if this is truly an issue, but it is a concern to me. I installed Tk 8.6 after reading all the Macintosh OS warnings online and in the IDLE window. However, according to the About IDLE box, IDLE is still "using" 8.5; and the war

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-31 Thread Travis Griggs
> On Mar 30, 2016, at 2:36 PM, Gregory Ewing > wrote: > > Tim Golden wrote: > >> (I don't know how other English-speaking groups say the word, but in >> England the first syllable is stressed and the second is the >> conventional short "uh" sound). > > I can

How to fix my imports/file structure

2016-01-20 Thread Travis Griggs
I wrote a simple set of python3 files for emulating a small set of mongodb features on a 32 bit platform. I fired up PyCharm and put together a directory that looked like: minu/ client.py database.py collection.py test_client.py test_database.py test_client.py My

Confused by python-dbus weird behavior

2016-01-11 Thread Travis Griggs
This may not be a great list for this question (which would be?); it’s a big group, and I’m hoping there’s some people here that cross into these same areas. I’m new to dbus, it seems it’s a sort of CORBA for the Linux world. :) Python seems to be a popular way to interact with it. I’m trying

Re: When I need classes?

2016-01-11 Thread Travis Griggs
> On Jan 10, 2016, at 9:48 AM, Bernardo Sulzbach > wrote: > > Essentially, classes (as modules) are used mainly for organizational purposes. > > Although you can solve any problem you would solve using classes > without classes, solutions to some big problems may be

[issue24628] load_workbook giving ValueError: invalid literal for int()

2015-07-13 Thread Travis
New submission from Travis: This code works fine with all my workbooks except the one with a heavier amount of data. Please let me know if you want the excel file I am trying to open with this code. -- components: IDLE, IO, Installation, Interpreter Core, Library (Lib), Macintosh

Re: Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Travis Griggs
I should proof my posts before I send them, sorry Subject nearly says it all. If i’m using pathlib, what’s the simplest/idiomatic way to simply count how many files are in a given directory? I was surprised (at first) when len(self.path.iterdir()) didn’t work. I don’t see anything in the

Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Travis Griggs
Subject nearly says it all. If i’m using pathlib, what’s the simplest/idiomatic way to simply count how many files are in a given directory? I was surprised (at first) when len(self.path.iterdir()) I don’t say anything on the in the .stat() object that helps me. I could of course do the

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread Travis A. Everett
Travis A. Everett added the comment: Thanks, Martin--I should've thought to check to see if it'd just been pushed back in the list. I was just focusing on a workaround for another problem and did a double-take when the traceback value didn't match what was set. This resolution is fine by me

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-11 Thread Travis A. Everett
New submission from Travis A. Everett: When BaseException.with_traceback(tb) is used, the __traceback__ property is properly set, but the property gets overwritten when the exception is raised. The attached file demonstrates the issue by raising exception a, which doesn't use with_traceback

[issue23902] let exception react to being raised or the setting of magic properties (like __cause__) within Python

2015-04-09 Thread Travis Everett
New submission from Travis Everett: I've been working on a testing tool which raises its own exceptions from those thrown by code under test. The tool's exceptions do some analysis to categorize and add additional information to the underlying exceptions, and they need access to the __cause__

Concatenating Strings

2015-04-09 Thread Travis Griggs
I was doing some maintenance now on a script of mine… I noticed that I compose strings in this little 54 line file multipole times using the + operator. I was prototyping at the time I wrote it and it was quick and easy. I don’t really care for the way they read. Here’s 3 examples: if k +

Re: [SerialConnection] Help

2015-04-09 Thread Travis Griggs
On Apr 7, 2015, at 8:42 AM, Hugo Caldas hcalda...@gmail.com wrote: read and write the port values with multi threading Care to elaborate what you mean by this part? In general, serial ports and multi threading don’t mix well. IOW, you’ll need to use multithreading pieces to make sure you

Re: MicroPython 1.4.1 released

2015-04-09 Thread Travis Griggs
On Apr 4, 2015, at 4:43 PM, Damien George damien.p.geo...@gmail.com wrote: Hello everyone, We are pleased to announce the release of MicroPython version 1.4.1! MicroPython is an implementation of Python 3.4 which is optimised for systems with minimal resources, including

Re: Newbie looking for elegant solution

2015-03-25 Thread Travis Griggs
On Mar 24, 2015, at 8:28 PM, Chris Angelico ros...@gmail.com wrote: On Wed, Mar 25, 2015 at 2:13 PM, otaksoftspamt...@gmail.com wrote: I have a list containing 9600 integer elements - each integer is either 0 or 1. Starting at the front of the list, I need to combine 8 list elements

Re: Python Worst Practices

2015-03-02 Thread Travis Griggs
On Mar 1, 2015, at 5:53 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 1 Mar 2015 20:16:26 + (UTC), alister alister.nospam.w...@ntlworld.com declaimed the following: The language is called English, the clue is in the name. interestingly most 'Brits' can switch between

Re: Pyston 0.3 self-hosting

2015-02-27 Thread Travis Griggs
On Feb 24, 2015, at 9:47 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Pyston 0.3, the latest version of a new high-performance Python implementation, has reached self-hosting sufficiency: http://blog.pyston.org/2015/02/24/pyston-0-3-self-hosting-sufficiency/

Re: Python Worst Practices

2015-02-27 Thread Travis Griggs
On Feb 25, 2015, at 12:45 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: http://www.slideshare.net/pydanny/python-worst-practices Any that should be added to this list? Any that be removed as not that bad? I read ‘em. I thought they were pretty good, some more than others. And I

Python Peewee Query Example Needed

2015-02-16 Thread Travis VanDame
I'm new to python and peewee and was looking for an example on how to query a mysql table with a datetime column only returning rows that are 30 days old. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Peewee Query Example Needed

2015-02-16 Thread Travis VanDame
On Monday, February 16, 2015 at 12:35:00 PM UTC-6, Travis VanDame wrote: I'm new to python and peewee and was looking for an example on how to query a mysql table with a datetime column only returning rows that are 30 days old. Well this is what I've come up with @classmethod def

pymongo and attribute dictionaries

2015-02-04 Thread Travis Griggs
I really like pymongo. And I really like Python. But one thing my fingers really get tired of typing is someDoc[‘_’id’] This just does not roll of the fingers well. Too many “reach for modifier keys” in a row. I would rather use someDoc._id Googling shows that I’m not the first to want to do

Re: pymongo and attribute dictionaries

2015-02-04 Thread Travis Griggs
On Feb 4, 2015, at 9:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Wed, Feb 4, 2015 at 9:50 AM, Travis Griggs travisgri...@gmail.com wrote: I really like pymongo. And I really like Python. But one thing my fingers really get tired of typing is someDoc[‘_’id’] This just does

Re: Cairo module

2015-02-03 Thread Travis Griggs
On Feb 3, 2015, at 1:00 PM, Poul Riis prii...@gmail.com wrote: I just tried the Cairo Python module. I ran the test file below. It works perfectly but instead of saving the resulting image as a file I want to see it displayed directly on the screen. How can I do that? I have quiet a

Re: Is there a cairo like surface for the screen without the window hassle

2015-02-03 Thread Travis Griggs
On Feb 2, 2015, at 5:20 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: I need to have a program construct a number of designs. Of course I can directly use a pfd surface and later use a pdf viewer to check. But that becomes rather cumbersome fast. But if I use a cairo-surface for

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-29 Thread Travis Thieman
Travis Thieman added the comment: Thank you all for the helpful comments. A revised attempt is attached as -2.patch, with improved behavior around using cwd if the child is never called and orig_executable if it is. I opted not to fix the issue with the redundancy in the error message as I

[issue22864] Add filter to multiprocessing.Pool

2014-11-15 Thread Travis Thieman
Travis Thieman added the comment: Why is it insufficient to run a synchronous 'filter' over the list returned by 'Pool.map'? These functional constructs are inherently composable, and we should favor composing simple implementations of each rather than implementing special cases of them

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-15 Thread Travis Thieman
Travis Thieman added the comment: The attached patch includes the first element in args in _execute_child to the OSError exception subclass. This correctly populates the 'filename' field on the resulting exception. A test is also included that fails without the patch. -- keywords

Re: FYI: Micro Python running on kickstarter pyBoard project, now shipping

2014-10-23 Thread Travis Griggs
On Oct 23, 2014, at 2:11 PM, sohcahto...@gmail.com wrote: On Thursday, October 23, 2014 10:07:26 AM UTC-7, jkn wrote: Hi all I haven't heard in mentioned here, but since I saw one of the boards today thought I'd pass on the news: The Kickstarter 'MicroPython' project, which has a

Re: Toggle

2014-10-08 Thread Travis Griggs
): return Red() Blue().toggle().toggle().toggle().toggle().toggle() :) -- Travis Griggs Objologist Some of them wanted to sell me snake oil and I'm not necessarily going to dismiss all of these, as I have never found a rusty snake. --Terry Pratchett -- https://mail.python.org/mailman

Re: How to show a dictionary sorted on a value within its data?

2014-10-01 Thread Travis Griggs
Sent from my iPhone On Oct 1, 2014, at 04:12, Peter Otten __pete...@web.de wrote: `lambda` is just a fancy way to define a function inline Not sure fancy is the correct adjective; more like syntactic tartness (a less sweet version of syntactic sugar). :) --

Python stdout goes where under systemd? (Was: Example of python service running under systemd?)

2014-09-12 Thread Travis Griggs
Thanks all for the help/advice. I’m getting there. To experiment/learn, I made a simple python program (/Foo/cyclic.py): #!/usr/bin/env python3 import time while True: time.sleep(5) with open('sound', 'r') as file: currentValue = file.read()

Re: Python stdout goes where under systemd? (Was: Example of python service running under systemd?)

2014-09-12 Thread Travis Griggs
On Sep 12, 2014, at 12:05 PM, Travis Griggs travisgri...@gmail.com wrote: Thanks all for the help/advice. I’m getting there. To experiment/learn, I made a simple python program (/Foo/cyclic.py): #!/usr/bin/env python3 import time while True: time.sleep(5

Re: Newer Debian versions of python on older Debian distros?

2014-09-11 Thread Travis Griggs
On Sep 8, 2014, at 5:06 PM, Chris Angelico ros...@gmail.com wrote: Alternatively, you could just run Debian Jessie. I have a few Jessie systems on the network, with a Python 3.4 IIRC, and there've been no stability problems lately. Both options are pretty easy. In the end, we were able to get

Example of python service running under systemd?

2014-09-11 Thread Travis Griggs
I’ve been reading lots of systemd docs. And blogs. Etc. At this point, I think I would benefit from learning by example… Does anyone have an example .service file that they use to launch a long running service written as a python program? If there is any example of what you changed to your

Re: Example of python service running under systemd?

2014-09-11 Thread Travis Griggs
On Sep 11, 2014, at 11:18 AM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Depends what you want. Mine is not a web service. My main.py looks like this: #!/usr/bin/env python3 import cycle import pushTelemetry from threading import Thread def main():

Re: Example of python service running under systemd?

2014-09-11 Thread Travis Griggs
On Sep 11, 2014, at 2:29 PM, Ervin Hegedüs airw...@gmail.com wrote: Hi Travis, On Thu, Sep 11, 2014 at 02:06:48PM -0700, Travis Griggs wrote: On Sep 11, 2014, at 11:18 AM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Depends what you want. Mine is not a web service. My

Newer Debian versions of python on older Debian distros?

2014-09-08 Thread Travis Griggs
(I realize that this may be seen as off topic for as a general python question, but given my historical experience with the Debian community’s predilection to answer all questions with a grumpy “go read the very very very very large and ever shifting fine manual”, I’m hoping for better luck

Halfway point between interactive and daemon?

2014-08-22 Thread Travis Griggs
I have a python3 program that performs a long running service on a semi embedded linux device. I've been in the prototyping stage. I just run it from the command line and use print() statements to let me know the thing is making acceptable process. At some point, I need to properly daemonize

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-22 Thread Travis Griggs
On Aug 21, 2014, at 12:55 AM, icefap...@gmail.com wrote: Hi, just wanting to do a shot in the dark,but maybe this syntax is Pythonic (in a we-are-all-grown-ups fashion, ahem)enough to get its way into the language this is what yours truly thinks: don't we all know that : means the next

Re: TypeError: 'bytes' object is not callable error while trying to converting to bytes.

2014-08-05 Thread Travis Griggs
On Aug 4, 2014, at 22:57, Chris Angelico ros...@gmail.com wrote: On Tue, Aug 5, 2014 at 3:47 PM, Satish ML satishmlwiz...@gmail.com wrote: bytes = file.read() You've just shadowed the built-in type 'bytes' with your own 'bytes'. Pick a different name for this, and you'll be fine. 'data'

Re: PEP8 and 4 spaces

2014-07-05 Thread Travis Griggs
font. So the value of the along ed indent is lost anyway. But wasn't that what spaces were supposed to give us over tabs, some separation from the trading betwixt different editors? Chuckle. Travis Griggs -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: This Swift thing

2014-06-06 Thread Travis Griggs
On Jun 5, 2014, at 1:14, Alain Ketterlin al...@dpt-info.u-strasbg.fr wrote: Swift's memory management is similar to python's (ref. counting). Which makes me think that a subset of python with the same type safety would be an instant success. Except that while you don't need to regularly

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-06 Thread Travis Griggs
On Jun 4, 2014, at 4:01 AM, Tim Chase python.l...@tim.thechases.com wrote: If you use UTF-8 for everything It seems to me, that increasingly other libraries (C, etc), use utf8 as the preferred string interchange format. It’s universal, not prone to endian issues, etc. So one *advantage* you

Re: IDE for python

2014-05-29 Thread Travis Griggs
On May 28, 2014, at 3:43, Sameer Rathoud sameer.rath...@gmail.com wrote: Hello everyone, I am new to python. I am currently using python 3.3 With python I got IDLE, but I am not very comfortable with this. Please suggest, if we have any free ide for python development. --

Re: How keep Python 3 moving forward

2014-05-24 Thread Travis Griggs
Sent from my iPhone On May 24, 2014, at 7:35, blindanagram no...@nowhere.net wrote: On 24/05/2014 08:13, wxjmfa...@gmail.com wrote: Le vendredi 23 mai 2014 22:16:10 UTC+2, Mark Lawrence a écrit : An article by Brett Cannon that I thought might be of interest

Why does isoformat() optionally not print the fractional seconds?

2014-04-22 Thread Travis Griggs
Python(3) let me down today. Better to be explicit, and all that, didn’t pan out for me. I have time series data being recorded in a mongo database (I love pymongo). I have an iOS app that consumes the data. Since JSON doesn’t have a time format, I have to stringify the times when transmitting

Re: test

2014-03-15 Thread Travis Griggs
On Mar 15, 2014, at 14:24, Mark H Harris harrismh...@gmail.com wrote: test Pass -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-23 Thread Travis Griggs
On Feb 23, 2014, at 17:09, Mark Lawrence breamore...@yahoo.co.uk wrote: For the benefit of newbies, besides the obvious indentation error above, the underscore basically acts as a dummy variable. I'll let the language lawyers give a very detailed, precise description :) You mean a

Re: Remove comma from tuples in python.

2014-02-21 Thread Travis Griggs
On Feb 21, 2014, at 6:32 AM, Roy Smith r...@panix.com wrote: In article mailman.7230.1392992078.18130.python-l...@python.org, Peter Otten __pete...@web.de wrote: [x*x for (x,) in lst] [paraphrasing...] can be better written as: [x*x for [x] in items] I'm torn between, Yes, the

Re: Can global variable be passed into Python function?

2014-02-21 Thread Travis Griggs
On Feb 21, 2014, at 4:13 AM, Ned Batchelder n...@nedbatchelder.com wrote: Man, do I hate this idea that Python has no variables. It has variables (names associated with values, and the values can change over the course of the program), they just don't work the same as C or Fortran

  1   2   3   4   >