Re: python decorator

2017-02-21 Thread Argentinian Black ops lll
*** SOLVED *** -- https://mail.python.org/mailman/listinfo/python-list

Re: python decorator

2017-02-21 Thread Argentinian Black ops lll
Thanks for the quick response...! you saved me a lot of time, thank you! -- https://mail.python.org/mailman/listinfo/python-list

Re: python decorator

2017-02-21 Thread Cameron Simpson
On 21Feb2017 22:44, alfredocabre...@gmail.com wrote: I have a python function and a decorator that works just fine. def fun_cache(function): memo = {} def wrapper(*args): if args in memo: return memo[args] else: rv = function(*args) memo[args

Re: [ANN] New Slack Group Dedicated to learning Python

2017-02-21 Thread Joe Anonimist
On Wednesday, 22 February 2017 08:07:01 UTC+1, Joe Anonimist wrote: > Hello all! > > Me and a few other Python enthusiasts started a Slack group dedicated to > learning Python. All of us know the basics of Python and our goal is to > acquire new skills that would help us get jobs as Python deve

[ANN] New Slack Group Dedicated to learning Python

2017-02-21 Thread Joe Anonimist
Hello all! Me and a few other Python enthusiasts started a Slack group dedicated to learning Python. All of us know the basics of Python and our goal is to acquire new skills that would help us get jobs as Python developers. Our plan is to collaborate on Python projects to get experience and be

python decorator

2017-02-21 Thread alfredocabrera4
I have a python function and a decorator that works just fine. def fun_cache(function): memo = {} def wrapper(*args): if args in memo: return memo[args] else: rv = function(*args) memo[args] = rv return rv return wrapper

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Ethan Furman wrote, on February 21, 2017 1:13 PM > > On 02/21/2017 11:59 AM, Deborah Swanson wrote: > > > I think I'll have a go with Cooperative Linux first > > It certainly looks interesting, but doesn't seem to have any > activity since late 2014. > > -- > ~Ethan~ I can't remember where I

Re: Python application launcher (for Python code)

2017-02-21 Thread Ethan Furman
On 02/21/2017 11:59 AM, Deborah Swanson wrote: I think I'll have a go with Cooperative Linux first It certainly looks interesting, but doesn't seem to have any activity since late 2014. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
I wrote, on February 21, 2017 12:12 PM > > Grant Edwards wrote, on February 21, 2017 11:21 AM > > NB: I haven't used any of these lately... > > > http://unxutils.sourceforge.net/ > http://www.mingw.org/ (look for msys) > https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f05

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Chris Warrick wrote, on February 21, 2017 11:26 AM > > On 21 February 2017 at 20:21, Grant Edwards > wrote: > > On 2017-02-21, Rob Gaddi wrote: > >> On 02/20/2017 06:16 PM, Deborah Swanson wrote: > >> > >> > [snip lots about using Windows but rather be > >> > using Linux but not wanting to have

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Grant Edwards wrote, on February 21, 2017 11:21 AM > > On 2017-02-21, Rob Gaddi wrote: > > On 02/20/2017 06:16 PM, Deborah Swanson wrote: > > > > > [snip lots about using Windows but rather be > > > using Linux but not wanting to have to spend lots of > > > energy switching right now] > > > > You

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Jim wrote, on February 21, 2017 9:51 AM > > On 02/21/2017 09:43 AM, Deborah Swanson wrote: > > I like Linux for this job, as it has a number of capabilities that > > Windows doesn't have, and I was looking for an improvement on what I > > can do in Windows. If you do a lot of computing it's nice

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread Terry Reedy
On 2/21/2017 1:02 PM, Wildman via Python-list wrote: Python 3.4.2 Linux platform I am working on a program that has tabs created with ttk.Notebook. The code for creating the tabs is working but there is one thing I have not been able to figure out. As is, the tabs are located up against the lo

Re: Python application launcher (for Python code)

2017-02-21 Thread Chris Warrick
On 21 February 2017 at 20:21, Grant Edwards wrote: > On 2017-02-21, Rob Gaddi wrote: >> On 02/20/2017 06:16 PM, Deborah Swanson wrote: >> >> > [snip lots about using Windows but rather be >> > using Linux but not wanting to have to spend lots of >> > energy switching right now] >> >> You know, I'

Re: Python application launcher (for Python code)

2017-02-21 Thread Grant Edwards
On 2017-02-21, Rob Gaddi wrote: > On 02/20/2017 06:16 PM, Deborah Swanson wrote: > > > [snip lots about using Windows but rather be > > using Linux but not wanting to have to spend lots of > > energy switching right now] > > You know, I'm always reluctant to recommend it, because it can > definit

Re: problems installing pylab

2017-02-21 Thread Terry Reedy
On 2/21/2017 10:47 AM, Robert William Lunnon wrote: I am trying to install pylab alongside python 3.6. On Windows 10 as you said at the bottom. However when I type python -m pip install pylab Try py -3.6 -m pip install pylab The '.6' should not be needed, but will make the command fail

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
On Tue, 21 Feb 2017 18:22:31 +, MRAB wrote: > On 2017-02-21 18:02, Wildman via Python-list wrote: >> Python 3.4.2 >> Linux platform >> >> >> I am working on a program that has tabs created with ttk.Notebook. >> The code for creating the tabs is working but there is one thing I >> have not been

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
On Tue, 21 Feb 2017 12:02:50 -0600, Wildman wrote: > Python 3.4.2 > Linux platform > > > I am working on a program that has tabs created with ttk.Notebook. > The code for creating the tabs is working but there is one thing I > have not been able to figure out. As is, the tabs are located up > a

Re: Request Help With ttk.Notebook Tabs

2017-02-21 Thread MRAB
On 2017-02-21 18:02, Wildman via Python-list wrote: Python 3.4.2 Linux platform I am working on a program that has tabs created with ttk.Notebook. The code for creating the tabs is working but there is one thing I have not been able to figure out. As is, the tabs are located up against the low

Re: Python application launcher (for Python code)

2017-02-21 Thread Rob Gaddi
On 02/20/2017 06:16 PM, Deborah Swanson wrote: > [snip lots about using Windows but rather be > using Linux but not wanting to have to spend lots of > energy switching right now] You know, I'm always reluctant to recommend it, because it can definitely get you tied in knots. But you're about t

Request Help With ttk.Notebook Tabs

2017-02-21 Thread Wildman via Python-list
Python 3.4.2 Linux platform I am working on a program that has tabs created with ttk.Notebook. The code for creating the tabs is working but there is one thing I have not been able to figure out. As is, the tabs are located up against the lower edge of the caption bar. I would like to have them

Re: Python application launcher (for Python code)

2017-02-21 Thread Pavol Lisy
On 2/21/17, Deborah Swanson wrote: > Chris Angelico wrote, on February 21, 2017 7:30 AM >> >> On Wed, Feb 22, 2017 at 2:16 AM, Deborah Swanson >> wrote: >> > Really? We used software called Powershell a couple decades ago in >> > the 90s, as an improvement on the DOS box. I didn't like it much a

Re: Python application launcher (for Python code)

2017-02-21 Thread Jim
On 02/21/2017 09:43 AM, Deborah Swanson wrote: BartC wrote, on February 21, 2017 5:52 AM On 20/02/2017 15:44, Deborah Swanson wrote: Ben Finney wrote, on February 19, 2017 11:27 PM "Deborah Swanson" writes: I could probably write this myself, but I'm wondering if this hasn't already b

Re: Python application launcher (for Python code)

2017-02-21 Thread eryk sun
On Tue, Feb 21, 2017 at 1:25 AM, Steve D'Aprano wrote: > (2) Add each category to the PYTHONPATH. One easy way to do so is by adding > the directories to a .pth file. PYTHONPATH isn't a synonym for sys.path. The PYTHONPATH environment variable gets used by every installed interpreter, which can b

Re: Python application launcher (for Python code)

2017-02-21 Thread Grant Edwards
On 2017-02-21, Deborah Swanson wrote: > Yes, I can see that only one person who has responded so far is remotely > familiar with what an application launcher is, and that person only > alluded to one, and hinted at some features I saw that could possibly be > used as an application launcher. I

problems installing pylab

2017-02-21 Thread Robert William Lunnon
Dear Python I am trying to install pylab alongside python 3.6. However when I type python -m pip install pylab I get the message No module named site In the documentation [documentation for installing python modules in python 3.6.0 documentation] it says: The above example assumes that the opt

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Chris Angelico wrote, on February 21, 2017 7:30 AM > > On Wed, Feb 22, 2017 at 2:16 AM, Deborah Swanson > wrote: > > Really? We used software called Powershell a couple decades ago in > > the 90s, as an improvement on the DOS box. I didn't like it much and I > > was going through software lik

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
BartC wrote, on February 21, 2017 5:52 AM > > On 20/02/2017 15:44, Deborah Swanson wrote: > > Ben Finney wrote, on February 19, 2017 11:27 PM > >> > >> "Deborah Swanson" writes: > >> > >>> I could probably write this myself, but I'm wondering if > this hasn't > > > >>> already been done many tim

Re: Python application launcher (for Python code)

2017-02-21 Thread Chris Angelico
On Wed, Feb 22, 2017 at 2:16 AM, Deborah Swanson wrote: > Really? We used software called Powershell a couple decades ago in the > 90s, as an improvement on the DOS box. I didn't like it much and I was > going through software like candy those days. Maybe that version > disappeared. It may have r

RE: Python application launcher (for Python code)

2017-02-21 Thread Deborah Swanson
Dennis Lee Bieber wrote, on February 21, 2017 4:19 AM > > On Mon, 20 Feb 2017 18:16:14 -0800, "Deborah Swanson" > declaimed the following: > > > >Yes, I've used Powershell, a couple decades ago, but it would be a > > Uhm... PowerShell 1.0 only came out ONE decade ago... > > Be af

Re: str.format fails with JSON?

2017-02-21 Thread Chris Angelico
On Wed, Feb 22, 2017 at 2:19 AM, Carlo Pires wrote: > What I wanted was an output without errors, like: > > From {"value": 1}, value=1 > > I think Python should ignore value not matching integers or identifiers. This > will make str.format more robust and usable. It cannot be used if the text >

Re: str.format fails with JSON?

2017-02-21 Thread Carlo Pires
Em terça-feira, 21 de fevereiro de 2017 11:39:13 UTC-3, Chris Angelico escreveu: > On Wed, Feb 22, 2017 at 1:23 AM, Carlo Pires wrote: > > Hi, > > > > When I run this piece of code: > > > > 'From {"value": 1}, value={value}'.format(value=1) > > Firstly, this code is in error; I suspect you want

Re: str.format fails with JSON?

2017-02-21 Thread Jussi Piitulainen
carlopi...@gmail.com writes: > Hi, > > When I run this piece of code: > > 'From {"value": 1}, value={value}'.format(value=1) > > Python complains about the missing "value" parameter (2.7.12 and > 3.6.x): Perhaps you know this, but just to be sure, and for the benefit of any reader who doesn't: do

Re: str.format fails with JSON?

2017-02-21 Thread Peter Otten
carlopi...@gmail.com wrote: > Hi, > > When I run this piece of code: > > 'From {"value": 1}, value={value}'.format(value=1) > > Python complains about the missing "value" parameter (2.7.12 and 3.6.x): > > Traceback (most recent call last): > File "test_format.py", line 1, in > 'From {"v

Re: str.format fails with JSON?

2017-02-21 Thread Chris Angelico
On Wed, Feb 22, 2017 at 1:23 AM, wrote: > Hi, > > When I run this piece of code: > > 'From {"value": 1}, value={value}'.format(value=1) Firstly, this code is in error; I suspect you wanted a couple of literal braces, so what you want is: >>> 'From {{"value": 1}}, value={value}'.format(value=1)

Re: Derivative timezone?

2017-02-21 Thread Skip Montanaro
I figured out that I can drop down to a lower level and use a manually constructed tz file to create the desired timezone object. The pytz package has a build_tzinfo() function which takes a zone name and an open file object). Skip On Tue, Feb 21, 2017 at 8:06 AM, Skip Montanaro wrote: > Is it

str.format fails with JSON?

2017-02-21 Thread carlopires
Hi, When I run this piece of code: 'From {"value": 1}, value={value}'.format(value=1) Python complains about the missing "value" parameter (2.7.12 and 3.6.x): Traceback (most recent call last): File "test_format.py", line 1, in 'From {"value": 1}, value={value}'.format(value=1) KeyError:

Derivative timezone?

2017-02-21 Thread Skip Montanaro
Is it possible to create a timezone which is a derivative of an existing timezone? I'd like to create one which is several hours different ahead of America/Chicago, but follows Chicago's DST changes. My initial attempt was to create a timezone object using pytz: tz = pytz.timezone("America/Chicago

Re: Python application launcher (for Python code)

2017-02-21 Thread BartC
On 20/02/2017 15:44, Deborah Swanson wrote: Ben Finney wrote, on February 19, 2017 11:27 PM "Deborah Swanson" writes: I could probably write this myself, but I'm wondering if this hasn't already been done many times. Can you describe what you are looking for, in enough detail that we ca

Distributing "Python 3.4 for iOS"

2017-02-21 Thread pertoger
I distribute learning apps via an MDM server. There are two possibilities for deploying apps; either to users via their Apple-ID or directly to devices (iPads). Alas my users don’t have Apple-IDs, so I have to distribute apps directly to their devices. Sadly «Python 3.4 for iOS» is in Appstore n