Python installation

2022-06-21 Thread Brian Karinga
nothing has changed. Please advise on what the problem could be and how it can be resolved. I look forward to hearing from you. Thank you, Brian. -- https://mail.python.org/mailman/listinfo/python-list

Making a Python program into an executable file

2022-04-11 Thread Brian Wagstaff via Python-list
Python and click the Add Python to Path option. I tried to do this, but was given the option to Upgrade Python, and once I did this the Add Python to Path option seemed not to be available. Can you advise me what to do? Best wishes, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python curses book

2021-03-30 Thread Brian Oney via Python-list
Congratulations! Indeed, I was wondering for a moment if this was a guide to al dente spaghetti code. With each curse being a funny way to mess with the colleagues performing the code review ;) Or a list of funny Monty Python curses? Or a set of programming problems that are cursed? On Marc

Re: Python Pandas split Date in day month year and hour

2020-08-19 Thread Brian Oney via Python-list
On August 19, 2020 7:32:45 PM GMT+02:00, J Conrado wrote: > > >Hi, > > >I'm satarting using Pandas to read excel. I have a meteorological >synoptic data and I have for date: > > >0   2017-11-01 00:00:00 >1   2017-11-01 03:00:00 >2   2017-11-01 06:00:00 >3   2017-11-01 09:00:00 >4   2017-11-01

Re: 3rd party mail package

2019-12-13 Thread Brian Oney via Python-list
How about a 1st party package in the stdlib? >From the hip: Take an example or two from the 'python 2 or 3 standard library >by example' book by a guy named Doug. Hth (really) -- https://mail.python.org/mailman/listinfo/python-list

Re: a regex question

2019-10-25 Thread Brian Oney via Python-list
On October 25, 2019 12:22:44 PM GMT+02:00, Maggie Q Roth wrote: >Hello > >There are two primary types of lines in the log: > >60.191.38.xx/ >42.120.161.xx /archives/1005 > >I know how to write regex to match each line, but don't get the good >result >with one regex to match both

Re: python installation.

2019-09-23 Thread Brian Korir
I used Windows x86-64 executable installer the first two times and Windows x86-64 web-based installer. They both yielded the same result. On Tue, 24 Sep 2019 05:46 Cameron Simpson, wrote: > On 24Sep2019 00:12, Brian Korir wrote: > >I receive a 'not a valid Win32...' aft

python installation.

2019-09-23 Thread Brian Korir
I receive a 'not a valid Win32...' after a few minutes of installing python 3.7.4. I have reinstalled it several times with the same results. My laptop uses windows 7, 64-bit. What can I do to solve this? Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread Brian Oney via Python-list
On Sat, 2019-09-21 at 08:57 -0700, Dave Martin wrote: > On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin > wrote: > > what does expected an indented block > > *what does an indented block mean? It means that the line of code belongs to a certain body as defined above its position

Re: Web framework for static pages

2019-08-13 Thread Brian Oney via Python-list
On August 13, 2019 4:00:30 PM GMT+02:00, "Morten W. Petersen" wrote: >Ok. Isn't it a bit splitting of hairs to talk about static site >generators >and their templates? > >Wouldn't a static site generator that can create a good, usable website >with little input be desirable? > >I could pick an

Re: Web framework for static pages

2019-08-12 Thread Brian Oney via Python-list
On August 12, 2019 9:14:55 AM GMT+02:00, morphex wrote: >Hi. > >What frameworks are there for generating static web pages in Python? I have used: https://github.com/Frozen-Flask/Frozen-Flask It's pretty simple. Develop with flask and then "freeze" it. I am looking forward to further answers

Re: Please help me

2019-08-06 Thread Brian Oney via Python-list
On Mon, 2019-08-05 at 21:10 +0430, arash kohansal wrote: > Hello ive just installed python on my pc and ive already check the > path > choice part but microsoft visual code can not find it and it does not > have > the reload item Check out: https://code.visualstudio.com/docs/languages/python or

Re: Proper shebang for python3

2019-07-21 Thread Brian Oney via Python-list
On July 21, 2019 10:04:47 AM GMT+02:00, Manfred Lotz wrote: >On Sun, 21 Jul 2019 10:21:55 +1000 >Cameron Simpson wrote: > >> On 21Jul2019 09:31, Chris Angelico wrote: >> >On Sun, Jul 21, 2019 at 9:15 AM Cameron Simpson >> >wrote: So you mean that a tool that depends on running on a >> >c

Re: Proper shebang for python3

2019-07-20 Thread Brian Oney via Python-list
On Sat, 2019-07-20 at 15:26 -0500, Tim Daneliuk wrote: > On 7/20/19 2:56 PM, Peter J. Holzer wrote: > > On 2019-07-20 14:11:44 -0500, Tim Daneliuk wrote: > > > So, no, do NOT encode the hard location - ever. Always use env to > > > discover the one that the user has specified. The only exception

Trouble Downloading Python and Numpy

2019-05-29 Thread Contreras, Brian J
am unable to open any python files or write code within the program. I was told by a colleague that I may need a python path environmental variable, but I have not found asite that provides this. If I could get some support with the download I would greatly appreciate it. Warm Regards, Brian

Re: CAD Application

2019-05-06 Thread Brian Oney via Python-list
FreeCAD is written in Python. It has a python interpreter. -- https://mail.python.org/mailman/listinfo/python-list

Re: PYTHON equivalents of BITAND and BITSHIFT of MATLAB

2019-05-01 Thread Brian Oney via Python-list
d rounding to the nearest integer towards negative infinity. Any overflow bits are truncated. ' So the equivalent would be: >>> typeBits = FCF >> 9 Cheers Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find files with a string

2019-01-09 Thread Brian Oney via Python-list
On Wed, 2019-01-09 at 08:29 -0800, anton.gridus...@gmail.com wrote: > Hello everyone! > > I need to find a file, that contains a string TeNum > > I try to > > import os > import sys > def find_value(fname): > value = 0 > with open(fname, encoding='cp866') as fn: > try: >

Re: mouse click automation

2019-01-01 Thread Brian Oney via Python-list
I am unfamiliar with pynput. I have had good experience with pyautogui. As your script isn't yet advanced, you may consider it. https://pyautogui.readthedocs.io/en/latest/introduction.html -- https://mail.python.org/mailman/listinfo/python-list

Re: polar coordinates?

2018-12-19 Thread Brian Christiansen
professor Grimes "Roman bathhouse tiling" representation of PI (I have not, as of when I typed this message cut and pasted it into my IDE to see exactly what happens). I think I will use it, or perhaps an adaptation of it for my "Roman bathhouse tiling" representation of PI.

Re: polar coordinates?

2018-12-18 Thread Brian Christiansen
) if choice == "d": pi_as_dots() main() -- My Yonkoma: https://www.flickr.com/photos/brian0908/albums/72157680223526176 The E-mail associated with the account is a "spamcatcher" account that I got to every couple of months to empty out, and anything sent to it will not be seen for probably several months, if it is seen at all. Brian Christiansen -- https://mail.python.org/mailman/listinfo/python-list

Re: polar coordinates?

2018-12-17 Thread Brian Christiansen
. -- My Yonkoma: https://www.flickr.com/photos/brian0908/albums/72157680223526176 The E-mail associated with the account is a "spamcatcher" account that I got to every couple of months to empty out, and anything sent to it will not be seen for probably several months, if it is seen at

polar coordinates?

2018-12-09 Thread Brian Christiansen
he E-mail associated with the account is a "spamcatcher" account that I got to every couple of months to empty out, and anything sent to it will not be seen for probably several months, if it is seen at all. Brian Christiansen -- https://mail.python.org/mailman/listinfo/python-list

Re: What Python books to you recommend to beginners?

2018-11-28 Thread Brian Oney via Python-list
On Wed, 2018-11-28 at 08:44 -0600, Skip Montanaro wrote: > What do people recommend? The target is Python 3.6 and 3.7. The > audience at work is a mostly financial/statistical crowd, so exposure > to things like Pandas would be nice, though I'm sure there are > dedicated books for just that. Given

Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Brian Oney via Python-list
On Tue, 2018-11-27 at 13:50 +0100, srinivasan wrote: > > *except BluetoothctlError, e:* > I don't have python3.6 available, but I believe the proper syntax is: except BluetoothctlError as e: print(e) See: https://docs.python.org/3/tutorial/errors.html?highlight=exception HTW -- h

Re: how to match list members in py3.x

2018-11-25 Thread Brian Oney via Python-list
On Sun, 2018-11-25 at 07:43 -0800, Muhammad Rizwan wrote: > for each word in each line how can we check to see if a word is already > present in a list and if it is not how to append that word to a new list For your problem consider a set. https://en.wikipedia.org/wiki/Set_theory For the python

Re: All of a sudden code started throwing errors

2018-11-14 Thread Brian Oney via Python-list
On Wed, 2018-11-14 at 09:47 +0100, srinivasan wrote: > -68 >= -60 It's a problem with your test of wifi strength. Good job of making informative output and running tests! -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE Default Working Directory

2018-11-14 Thread Brian Oney via Python-list
On Tue, 2018-11-13 at 10:33 -0600, Bev in TX wrote: > > On Nov 12, 2018, at 10:07 AM, Brian Oney > > wrote: > > On Mon, 2018-11-12 at 09:35 -0600, Bev in TX wrote: > > > I am not the OP and I’m on macOS — no shortcuts. How would one do the > > > same thing

Re: IDLE Default Working Directory

2018-11-12 Thread Brian Oney via Python-list
On Mon, 2018-11-12 at 09:35 -0600, Bev in TX wrote: > On Nov 12, 2018, at 9:16 AM, eryk sun wrote: > > On 11/12/18, Christman, Roger Graydon mailto:d...@psu.edu>> > > wrote: > > > I looked in IDLE's own configuration menu, and didn't see anything there > > > -- > > > and I fear that I might have

Re: Issue in parsing the strings in python code

2018-11-12 Thread Brian Oney via Python-list
On Mon, 2018-11-12 at 14:17 +, Rhodri James wrote: > On 12/11/2018 09:37, srinivasan wrote: > > Because the problem is every time when ever I see the output using the > > "nmcli c show", the below output is the weird output, so instead of > > connecting to SSID "NIFunkloch" it randomly connect

Re: Good editor for python

2018-11-11 Thread Brian J. Oney via Python-list
ugh. To get the functionality you miss is pretty simple with spacemacs.  For more information and platform-specific instructions, please see the following link. https://github.com/syl20bnr/spacemacs The basic template already activates python support. That's my two cents. Cheers Brian On Sun,

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-07 Thread Brian J. Oney via Python-list
On Wed, 2018-11-07 at 10:22 +0100, srinivasan wrote: > blkid -o export %s | grep \'TYPE\' | cut -d\"=\" -f3 You don't need to escape the single quotes. Try either: "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3" or: 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3' or: "blkid -o export %s | g

[ANN] maildog, Re: email automation

2018-10-30 Thread Brian Oney via Python-list
On Tue, 2018-10-23 at 13:58 +0200, Brian J. Oney wrote: > On Tue, 2018-10-23 at 10:31 +0100, Ali Rıza KELEŞ wrote: > > On Tue, 23 Oct 2018 at 09:07, Thomas Jollans wrote: > Now that it seems that I will be writing this. So I have gotten so far as to have a little package cal

Re: regular expression problem

2018-10-28 Thread Brian Oney via Python-list
On Sun, 2018-10-28 at 22:04 +0100, Karsten Hilbert wrote: > [^<:] Would a simple regex work? I mean: ~$ python Python 2.7.13 (default, Sep 26 2018, 18:42:22)  [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> t = '$$' >>> re.f

Re: Accessing clipboard through software built on Python

2018-10-28 Thread Brian Oney via Python-list
You don't have to start from scratch. You don't to do anything other than learn to use anamnesis. I use anamnesis as my clipboard manager. I you can easily tell to get which ever one you want (i.e. the thousandth item). # Inform yourself https://sourceforge.net/projects/anamnesis/ # Install it

Re: email automation

2018-10-23 Thread Brian J. Oney via Python-list
ron jobs. I prefer the former for the handy logging options. What about a python solution? What would the advantage of a python queue be over a systemd timer? I guess that's an apples an oranges comparison. In my case I most likely would have a raspberry pi running a python script to read and possibly answer any emails. Thanks again for the tips. Regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

email automation

2018-10-22 Thread Brian Oney via Python-list
and kicking, a bit overkill for my use-case); 2. build on the examples in 'Automate the boring stuff'; 3. forget about it. Please tell me about any possible alternatives I missed. Kind regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: ESR "Waning of Python" post

2018-10-16 Thread Brian Oney via Python-list
On October 17, 2018 7:56:51 AM GMT+02:00, Marko Rauhamaa wrote: >I can't be positive about swapping. I don't remember hearing thrashing. >However, I do admit running emacs for months on end and occasionally >with huge buffers so the resident size can be a couple of gigabytes. > That's a pretty

Re: regex string matching python3

2018-10-01 Thread Brian J. Oney via Python-list
On Mon, 2018-10-01 at 10:49 -0700, nanman3...@gmail.com wrote: > I have a string like this:  >  > b'\tC:94.3%[S:89.9%,D:4.4%],F:1.7%,M:4.0%,n:1440\n' >  > And I would like to  extract the numbers corresponding to S,D,F and M in this > string and convert them into an array like this:  >  > [ '89.9'

Re: JPEGImage() hangs

2018-09-27 Thread Brian Oney via Python-list
Could you please try another tool like `convert'? E.g. $ convert 102_PANA/P1020466.JPG test.png What does that say? -- https://mail.python.org/mailman/listinfo/python-list

Re[2]: [OT] master/slave debate in Python

2018-09-26 Thread Brian Grawburg
. Brian Grawburg Wilson, NC -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] master/slave debate in Python

2018-09-26 Thread Brian Oney via Python-list
> PS: I'm not a great fan of it, but I think we all know that off-topic is > in a way what this list excels at. +1 An open source community thrives on being open. It also welcomes those who like to pick a fight for various, usually personal reasons. Has any heard of that Python language? I hear

Re: 2 Bugs: in Python 3 tutorial, and in bugs.python.org tracker registration system

2018-09-22 Thread Brian Oney via Python-list
That's one thing that confused me. Generators are supposed to be one-off iterators. Iterators, *I understood* as reusable iterables. -- https://mail.python.org/mailman/listinfo/python-list

Re: What is not working with my "map" usage?

2018-09-21 Thread Brian Oney via Python-list
Hi Viet, map applies the function to each of the elements of the list you provide. It would be roughly equivalent to: [add_all_elements(x) for x in alist] It may help you to consider the term and function "map" from the view of linear algebra. Apparently it's a common term: https://en.wikiped

Re: Fumbling with emacs + elpy + flake8

2018-09-13 Thread Brian Oney via Python-list
s ~/.emacs.d emacs It may be a rabbit hole, but that adventure belongs to emacs, somehow. Cheers Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help to put the output from terminal in a csv file

2018-09-07 Thread Brian Oney via Python-list
Please study the following to get you started. It looks like JSON output that you are dealing, which is good. I added a ", to the "body"-line, because I assume that you botched that when giving an example. ```python #!/usr/bin/env python import json output = ''' {    "error" : {   "body"

Re: >< swap operator

2018-08-14 Thread Brian Oney via Python-list
On Tue, 2018-08-14 at 10:55 -0400, Dennis Lee Bieber wrote: > On Tue, 14 Aug 2018 06:18:41 -0700 (PDT), skybuck2...@hotmail.com declaimed > the following: > > > On Monday, August 13, 2018 at 10:01:37 PM UTC+2, Léo El Amri wrote: > > > On 13/08/2018 21:54, skybuck2...@hotmail.com wrote: > > > > I j

Re: Want to be a rockstar programmer?

2018-07-23 Thread Brian Oney via Python-list
meh, I'm more into 90s and 00s metal rock and punk rock. Oh well, I knew it wasn't meant to be. ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: For next loops

2018-07-23 Thread Brian Oney via Python-list
What if ply != com in the first (0th) iteration?  It's better to have an 'else:'-statement in your case, I suppose. -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 10:38 -0400, Dennis Lee Bieber wrote: > On Fri, 20 Jul 2018 11:00:09 +0200, Brian Oney via Python-list > declaimed the following: > > > Are 16|1 and 16+1 internally the same operation (for integers)? > > For those integers the EFFECT/RESULT

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 18:07 +0900, xffox wrote: > On Fri, Jul 20, 2018 at 08:25:04AM +0200, Brian Oney via Python-list wrote: > > Therefore, what book or learning course do you recommend? I imagine > > something that tours or skims > > the fundamentals of Boolean algebra a

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 06:37 +, Steven D'Aprano wrote: > On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote: > > > PS: Can I twiddle bits in Python? > > Yes. > > These operators work on ints: > > bitwise AND: & > bitwise OR:

[OT] Bit twiddling homework

2018-07-19 Thread Brian Oney via Python-list
what book or learning course do you recommend? I imagine something that tours or skims the fundamentals of Boolean algebra and digital logic, and then goes to C and some fun homework problems. It may seem to you that the emphasis there is wrongly placed. Thank you for the tips. Cheers, Brian

Re: RANT why the *%#&%^ does installing pip not install setuptools???

2018-07-05 Thread Brian J. Oney via Python-list
On Stretch: ~ $ aptitude show python-pip Package: python-pip   Version: 9.0.1-2 ... Maintainer: Debian Python Modules Team ... Depends: ca-certificates, python-pip-whl (= 9.0.1-2), python:any (< 2.8), python:any (>= 2.7.5-5~) Recommends: build-essential, python-all-dev (>= 2.6

Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
On Wed, 2018-06-20 at 12:36 +0200, George Fischhof wrote: > Hi, > You can also try click library from pypi, that is a very good command line > stuff. > > George Thank you for the tip. I am away of click and it's awesomeness, but am hesitant because it's not apart of stdlib. I have gotten bitten

Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
Thanks Peter! That's pretty slick. I will get it working for sure now. Regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
INTER -l') parser.parse_known_args(['-o', 'sides=one-sided', '-o', 'test=crap']) Namespace(options='test=crap', printer=None)) How should I deal with multiple options being fed into my script? Thanks! Cheers, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: text mining

2018-06-16 Thread Brian Oney via Python-list
На 15 юни 2018 г. 14:57:46 GMT+02:00, Steven D'Aprano написа: >Seriously, you are asking strangers to help you out of the goodness of >their heart. If your intention was to send the message that you're >lazy, >drunk, or just don't give a damn about the question, you were >successful. Answers

Re: stock quotes off the web, py style

2018-05-16 Thread Brian Oney via Python-list
thank you for that tip. I missed that somehow... На 16 май 2018 г. 16:31:37 GMT+02:00, Peter Otten <__pete...@web.de> написа: >Friedrich Rentsch wrote: > >> >>> ibm = urllib2.urlopen >> ("https://api.iextrading.com/1.0/stock/IBM/quote";).read() >> >>> ibm = eval (ibm) > >Dont do this. You are al

RE: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
And thank you Joseph as well. Thank you, Brian Gibbemeyer Sr Software Engineer Watson Health - Value Based Care Phone: 1-7349133594 | Mobile: 1-7347258319 E-mail: bgibb...@us.ibm.com 100 Phoenix Dr Ann Arbor, MI 48108-2202 United States From: "Joseph L. Casale" To: &q

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
Thank you Ethan,,, that worked. Thank you, Brian Gibbemeyer Sr Software Engineer Watson Health - Value Based Care Phone: 1-7349133594 | Mobile: 1-7347258319 E-mail: bgibb...@us.ibm.com 100 Phoenix Dr Ann Arbor, MI 48108-2202 United States From: Ethan Furman To: Python Date

RE: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
ot; -Original Message- From: Python-list On Behalf Of Brian Gibbemeyer Sent: Tuesday, April 24, 2018 11:01 AM To: Ethan Furman Cc: python-list@python.org Subject: Re: Issue with python365.chm on window 7 > The file at > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.python.

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
side, nothing appears in the right pane. From: Ethan Furman To: python-list@python.org Date: 04/24/2018 11:31 AM Subject:Re: Issue with python365.chm on window 7 Sent by:"Python-list" On 04/24/2018 07:15 AM, Brian Gibbemeyer wrote: > I found that Python

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
python365.chm on window 7 Sent by:"Python-list" On Wed, Apr 25, 2018 at 12:15 AM, Brian Gibbemeyer wrote: > Yes actually I am a Sr Software Engineer. I am not an expert in one > language. I am pretty handy in picking up new concepts and applying the > concepts to me

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
The links without the url defense wrappers https://www.python.org/downloads/release/python-365/ https://www.python.org/ftp/python/3.6.5/python365.chm Thank you, Brian Gibbemeyer Sr Software Engineer Watson Health - Value Based Care From: "Brian Gibbemeyer" To: Bob

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
comes with python install. This is the graphic I sent. Bob Should be able to see it but the list will not Thank you, Brian Gibbemeyer Sr Software Engineer Watson Health - Value Based Care From: Bob Martin To: python-list@python.org Date: 04/24/2018 02:18 AM Subject:

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
Did you download it form the web? https://www.python.org/downloads/release/python-364/ That is the one not working. I id not know about the .chm that was installed with the product until this morning. Thank you, Brian Gibbemeyer Sr Software Engineer Watson Health - Value Based Care Phone

Re: Issue with python365.chm on window 7

2018-04-24 Thread Brian Gibbemeyer
see my comments below denoted by + From: Terry Reedy To: python-list@python.org Date: 04/23/2018 06:45 PM Subject:Re: Issue with python365.chm on window 7 Sent by:"Python-list" This is a good place to start. > But I downloaded .chm version of the Python guide

Re: Issue with python365.chm on window 7

2018-04-23 Thread Brian Gibbemeyer
From: Brian Gibbemeyer/Detroit/IBM To: python-list@python.org, d...@python.org Date: 04/23/2018 03:35 PM Subject:Issue with python365.chm on window 7 Not sure which email this should go to. But I downloaded .chm version of the Python guide and found that it is not working in

Re: Python gotcha of the day

2018-03-14 Thread Brian Oney via Python-list
explicit is better than implicit. That gives me an idea for a module with the following debugging command line functionality. import sass >>> "" ":p" Traceback: Are you telling me that ' ' is supposed to an operator? (Rock thrown) On March 14, 2018 10:40:38 AM GMT+01:00, Thomas Jollans wr

Re: Python Templating Language

2017-12-18 Thread Brian Oney via Python-list
you may consider checking out a more general approach. Noweb was the first to my knowledge and lead the way for Sweave (R or S), and pyweave, as mentioned. https://en.wikipedia.org/wiki/Noweb Cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Templating Language

2017-12-17 Thread Brian J. Oney via Python-list
I am not exactly sure what you mean, so I will guess. Jinja may be what you're looking for. It's an important component of flask & ansible, for example. pyweave may also serve your purposes. HTH -- https://mail.python.org/mailman/listinfo/python-list

Accessing Self Inside Decorator with parameters

2017-12-14 Thread Brian Herman
def preform_action(self): print("test") Is there any way to do this pythonically? -- Thanks, Brian Herman kompile.org <http://www.kompile.org> -- https://mail.python.org/mailman/listinfo/python-list

advice for inventory software

2017-11-30 Thread Brian J. Oney via Python-list
functionality in the near future (plus a mild case of 'I wanna code' [aka NIH] syndrome), push me to learn and implement this myself. Thanks in advance! Cheers Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is python and idle?

2017-07-21 Thread Brian Case
Thank you, That is where it is. Would not have found it without your help. Now, to find IDLE. rgrds, Brian On 7/21/2017 10:19 AM, Nathan Ernst wrote: Check your user folder. For me, on my PC, python is installed at C:\Users\nernst\AppData\Local\Programs\Python Regards, Nate On Fri, Jul

Where is python and idle?

2017-07-21 Thread Brian Case
folders C:\Program Files and C:\Program Files (x86)? Regards, Brian Case -- https://mail.python.org/mailman/listinfo/python-list

Re: Converting py files to .exe and .dmg

2015-12-31 Thread Brian Simms
On Tuesday, 29 December 2015 01:09:30 UTC+9, Adam M wrote: > On Monday, December 28, 2015 at 10:35:41 AM UTC-5, Brian Simms wrote: > > Hi there, > > > > I have done a lot of looking around online to find out how to convert > > Python files to .exe and .dmg file

Converting py files to .exe and .dmg

2015-12-28 Thread Brian Simms
Hi there, I have done a lot of looking around online to find out how to convert Python files to .exe and .dmg files, but I am confused. Could someone provide pointers/advice as to how I can turn a Python file into a Windows .exe and Mac .dmg file. Thanks for any help. -- https://mail.python.

Problem Running tkinter gui Code

2015-12-27 Thread brian . moreira
Hi there. I trying to run a simple code that opens a Tkinter window with text in it, on my windows 8 machine using Python 3.4.3 I used to ge: “ImportError: no tkinter module exists” But now it opens a windows Wizard screen that prompts me to Modify, Repair, or Uninstall Python. I have tried

Re: Cryptographically strong random numbers

2015-10-16 Thread Brian Gladman
On 16/10/2015 17:25, Steven D'Aprano wrote: > Hello folks, [snip detail] > randbelow(end): > return a random integer in the half-open interval 0...end > (including 0, excluding end) > > randint(start, end): > return a random integer in the closed interval start...end > (including

Re: [RELEASED] Python 3.5.0rc3 is now available

2015-09-08 Thread Brian Gladman
On 08/09/2015 02:35, Larry Hastings wrote: > > > On behalf of the Python development community and the Python 3.5 release > team, I'm relieved to announce the availability of Python 3.5.0rc3, also > known as Python 3.5.0 Release Candidate 3. > > The next release of Python 3.5 will be Python 3.5.

Python client support for NATS.io

2015-08-26 Thread brian
Hello all...we're updating our Python client support at NATS.io cloud messaging project, and as part of that would like to get your input on which version of Python: https://groups.google.com/forum/#!topic/natsio/e6aoJ6GYqTw Thanks in advance to anyone who has a moment to let us know. Best,

Re: what windows compiler for python 3.5?

2015-07-24 Thread Brian Gladman
On 24/07/2015 12:04, Chris Angelico wrote: > On Fri, Jul 24, 2015 at 8:53 PM, Robin Becker wrote: >> yes I build extensions for reportlab. Unfortunately, despite our MSDN >> subscription to the Visual Studio stuff we have no access to the Visual >> Studio Version 2015. Last one in my downloads is

Re: a more precise distance algorithm

2015-05-27 Thread Brian Blais
On Mon, May 25, 2015 at 11:11 PM, Steven D'Aprano wrote: > > Let's compare three methods. > > def naive(a, b): > return math.sqrt(a**2 + b**2) > > def alternate(a, b): > a, b = min(a, b), max(a, b) > if a == 0: return b > if b == 0: return a > return a * math.sqrt(1 + b**2 /

Re: find all multiplicands and multipliers for a number

2015-04-12 Thread Brian Gladman
On 12/04/2015 18:20, Paul Rubin wrote: > Steven D'Aprano writes: >> Um, "simple sieve"? You're using Miller-Rabin to check for candidate >> prime factors. I don't think that counts as a simple sieve :-) > > How does Miller-Rabin help? It has to cost more than trial division. As we factor the nu

Re: find all multiplicands and multipliers for a number

2015-04-12 Thread Brian Gladman
, I have a more complex version but the simple one works well enough in this context and finds very large primes that would otherwise stall the code. Thanks for taking a look. Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: find all multiplicands and multipliers for a number

2015-04-12 Thread Brian Gladman
On 11/04/2015 03:04, Steven D'Aprano wrote: > It may be a bit slow for very large numbers. On my computer, this takes 20 > seconds: > > py> pyprimes.factors.factorise(2**111+1) > [3, 3, 1777, 3331, 17539, 25781083, 107775231312019L] > > > but that is the nature of factorising large numbers. >

Re: Python 3 and the requests library

2015-02-09 Thread Brian
Thank you, Ian and Zack! That was exactly the issue. Apparently, having a token.py script (one of my first Python 2 scripts to get an authorization token from a billing server) is OK for Python 2 but breaks Python 3. *face palm* Thank you again so very much! Brian On Monday, February 9, 2015

Re: Python 3 and the requests library

2015-02-09 Thread Brian
eworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.pyc But nothing is pointing to anything except what appears to be the formally installed versions of these library modules. Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 and the requests library

2015-02-09 Thread Brian
4/lib/python3.4/tokenize.py", line 40, in __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", AttributeError: 'module' object has no attribute '__all__' Googling hasn't helped track this one down. In lieu of an

Python 3 and the requests library

2015-02-09 Thread Brian
(the list in python2 is huge and not posted here): $ pip3 list httplib2 (0.9) pip (1.5.6) requests (2.5.1) setuptools (2.1) urllib3 (1.10) Notre that if I change python3 to python in my script, it works fine using the default Python 2.7.5 version. And as a Plan B I can stay with Python 2.7.5. But I'd really like to move to Python 3 on the Mac. Thanks in advance for any thoughts or help! Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 25/01/2015 00:28, Chris Angelico wrote: > On Sun, Jan 25, 2015 at 11:18 AM, Brian Gladman wrote: >> Is there a way of doing delegation rather than sub-classing? >> >> That is, can I create a class (say RF) that passes some of its methods >> to Fraction for implement

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 25/01/2015 01:31, Terry Reedy wrote: > On 1/24/2015 5:57 PM, Brian Gladman wrote: >> I would appreciate advice on how to set up delgation in Python. >> >> I am continuously implementing a function to test whether a Python >> Fraction is an integer > > Sinc

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:43, Chris Angelico wrote: > On Sun, Jan 25, 2015 at 10:38 AM, Brian Gladman wrote: >> On 24/01/2015 23:22, Chris Angelico wrote: >>> class RF(Fraction): >>> def is_integer(self): >>>return self.numerator % self.denominator == 0 &g

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:47, Gary Herron wrote: > On 01/24/2015 03:38 PM, Brian Gladman wrote: >> On 24/01/2015 23:22, Chris Angelico wrote: >>> class RF(Fraction): >>> def is_integer(self): >>> return self.numerator % self.denominator == 0 >> Thanks

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
> True Thanks Gary. As Chris says, the method he suggests is problematic since anything delegated returns a Fraction, not an RF. Patching Fraction looks nicer to use even if it is frowned on. Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:22, Chris Angelico wrote: > class RF(Fraction): > def is_integer(self): >return self.numerator % self.denominator == 0 Thanks for your help on this. I must admit that nowhere in a lot of searching did I find that delegation is achieved by doing nothing!

Delegation in Python

2015-01-24 Thread Brian Gladman
) -- which doesn't work. Any advice on how to do this would be much appreciated. Brian -- https://mail.python.org/mailman/listinfo/python-list

what is Jython?

2015-01-08 Thread Brian
there pros and cons then switching from Python to Jython? -- Regards Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: 3 Suggestions to Make Python Easier For Children

2014-08-05 Thread Brian Blais
On Sat, Aug 2, 2014 at 2:45 AM, Mark Summerfield wrote: > Last week I spent a couple of days teaching two children (10 and 13 -- too > big an age gap!) how to do some turtle graphics with Python. Neither had > programmed Python before -- one is a Minecraft ace and the other had done > Scratch.

  1   2   3   4   5   6   7   8   9   10   >