Got it , MRAB, Thanks for the explanation it was such a simple thing I
was breaking my head over it
On Tue, Feb 21, 2017 at 1:34 AM, MRAB wrote:
> On 2017-02-20 19:43, Ganesh Pal wrote:
>
>> On Feb 21, 2017 12:17 AM, "Rhodri James" wrote:
>>
>> On 20/02/17 17:55, Ganesh Pal wrote:
>>
>> 1. T
FYI for people who need this.
I was looking here
http://www.codecodex.com/wiki/Calculate_an_integer_square_root
for an efficient/fast algorithm for computing integer squareroots.
Based on one of the C version examples, I think this is the most
efficient/fastest that always produces correct res
Steve D'Aprano wrote, on February 20, 2017 5:25 PM
>
> On Tue, 21 Feb 2017 02:44 am, Deborah Swanson wrote:
>
> [...]
> > Basically, I now have quite a few Python programs I use frequently,
> > and as time goes on my collection and uses of it will grow.
> Right now
> > I just want a way to sel
Simon Ward wroe, on February 20, 2017 4:36 PM
>
> On 20 February 2017 22:56:31 GMT+00:00, Deborah Swanson
> wrote:
> > Basically, I now have quite a few Python programs I use frequently,
> > and as time goes on my collection and uses of it will grow. Right
now
> > I just want a way to select w
On 2017-02-21 00:04, Peter Otten wrote:
> Tim Chase wrote:
>> On 2017-02-20 10:45, Peter Otten wrote:
>>> value = parser.get("section-1", "option-1", fallback="default
>>> value")
>>
>> Huh. Do you remember when this was added?
>
> I don't use configparser regularly, so I had to look around myse
Ben Finney wrote, on February 20, 2017 5:50 PM
>
> "Deborah Swanson" writes:
>
> > Basically, I now have quite a few Python programs I use frequently,
> > and as time goes on my collection and uses of it will grow. Right
now
> > I just want a way to select which one I'd like to run and run it.
Steve D'Aprano wrote, on February 20, 2017 4:53 PM
>
> On Tue, 21 Feb 2017 04:04 am, Deborah Swanson wrote:
>
> > That's a good idea, you can do just about anything from a shell, and
I
> > read that Linus Torvalds never uses anything except the shell.
> [...]
> > Since I will be in Windows for y
"Deborah Swanson" writes:
> Basically, I now have quite a few Python programs I use frequently, and
> as time goes on my collection and uses of it will grow. Right now I just
> want a way to select which one I'd like to run and run it. I'd like it
> to be a standalone application and some sort of
On Tue, 21 Feb 2017 02:44 am, Deborah Swanson wrote:
[...]
> Basically, I now have quite a few Python programs I use frequently, and
> as time goes on my collection and uses of it will grow. Right now I just
> want a way to select which one I'd like to run and run it. I'd like it
> to be a standal
On 20 February 2017 22:56:31 GMT+00:00, Deborah Swanson
wrote:
> Basically, I now have quite a few Python programs I use frequently,
> and
> as time goes on my collection and uses of it will grow. Right now I
> just
> want a way to select which one I'd like to run and run it
A Python applicati
On Tue, 21 Feb 2017 04:04 am, Deborah Swanson wrote:
> That's a good idea, you can do just about anything from a shell, and I
> read that Linus Torvalds never uses anything except the shell.
[...]
> Since I will be in Windows for yet awhile, it would be ideal to find an
> application that will wor
On Tue, 21 Feb 2017 06:43 am, Ganesh Pal wrote:
> How can I make my program 2 look like program 1
I don't understand the question. If you want program 2 to look like program
1, you can edit program 2 and change it to look like program 1. But why not
just use program 1? It already looks like progr
Tim Chase wrote:
> On 2017-02-20 10:45, Peter Otten wrote:
>> value = parser.get("section-1", "option-1", fallback="default
>> value")
>
> Huh. Do you remember when this was added? I see it in the 3.x docs,
> but not the 2.x docs. I remember writing my own wrappers multiple
> times for exactly
Kevin Walzer wrote, on February 20, 2017 1:15 PM
>
> On 2/19/17 10:01 PM, Deborah Swanson wrote:
> > I could probably write this myself, but I'm wondering if
> this hasn't
> > already been done many times. Anyone have some git links or other
> > places to download from?
> >
> What do you mean
On 2/19/17 10:01 PM, Deborah Swanson wrote:
I could probably write this myself, but I'm wondering if this hasn't
already been done many times. Anyone have some git links or other
places to download from?
What do you mean by "application launcher"? It's not more complicated
than "python my scri
On 2017-02-20 19:43, Ganesh Pal wrote:
On Feb 21, 2017 12:17 AM, "Rhodri James" wrote:
On 20/02/17 17:55, Ganesh Pal wrote:
1. The only difference between both the programs the difference are just
the below lines.
newdata = '64000101057804'.decode('hex')
and
newdata = ""
newdata =
On Feb 21, 2017 12:17 AM, "Rhodri James" wrote:
On 20/02/17 17:55, Ganesh Pal wrote:
> 1. The only difference between both the programs the difference are just
> the below lines.
>
> newdata = '64000101057804'.decode('hex')
>
> and
>
> newdata = ""
> newdata = '64000101057804'
> newdata
On 2017-02-20 17:55, Ganesh Pal wrote:
Hello Python world,
I am on Linux and Python 2.7 , I need some help to figure out what is
going wrong in the below piece of code
I am trying to replace seven bytes in the hexdumfile at a given offset
Program 1 works fine
#!/usr/bin/python
from qa.uti
On 20/02/17 17:55, Ganesh Pal wrote:
1. The only difference between both the programs the difference are just
the below lines.
newdata = '64000101057804'.decode('hex')
and
newdata = ""
newdata = '64000101057804'
newdata.decode('hex')
What is happening here and how do I fix this in
On 2017-02-20 10:45, Peter Otten wrote:
> value = parser.get("section-1", "option-1", fallback="default
> value")
Huh. Do you remember when this was added? I see it in the 3.x docs,
but not the 2.x docs. I remember writing my own wrappers multiple
times for exactly these purposes, even to the
Hello Python world,
I am on Linux and Python 2.7 , I need some help to figure out what is
going wrong in the below piece of code
I am trying to replace seven bytes in the hexdumfile at a given offset
Program 1 works fine
#!/usr/bin/python
from qa.utils.easy_popen import run
import pdb
def
Grant Edwards wrote, on February 20, 2017 7:37 AM
>
> On 2017-02-20, Deborah Swanson wrote:
>
> > I could probably write this myself, but I'm wondering if
> this hasn't
> > already been done many times.
>
> Yes, it has.
>
> > Anyone have some git links or other places to download from?
>
>
On 02/20/2017 03:45 AM, Peter Otten wrote:
You can provide a default value in your code with
parser = configparser.ConfigParser()
parser.read(configfile)
value = parser.get("section-1", "option-1", fallback="default value")
Perfect. Thank you!
--
=
I should also say that right now I'm using Windows XP, but hope very
soon to have Linux again. Ideally, this launcher would work in both.
I wrote, on February 20, 2017 7:44 AM
>
> Ben Finney wrote, on February 19, 2017 11:27 PM
> >
> > "Deborah Swanson" writes:
> >
> > > I could probably writ
On 02/20/2017 01:39 AM, Ben Finney wrote:
I think you misinderstand the semantics of what ‘configparser’ expects
https://docs.python.org/3/library/configparser.html#configparser-objects>:
You are absolutely correct. Thank you!
--
===
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 can know whether it's already be
On 2017-02-20, Deborah Swanson wrote:
> I could probably write this myself, but I'm wondering if this hasn't
> already been done many times.
Yes, it has.
> Anyone have some git links or other places to download from?
See the "website" and "repository" links on the pages below:
https://en.wik
Ian Pilcher wrote:
> I am trying to use ConfigParser for the first time (while also writing
> my first quasi-serious Python program). Assume that I want to parse a
> a configuration file of the following form:
>
>[section-1]
>option-1 = value1
>option-2 = value2
>
>[section-2]
>
28 matches
Mail list logo