Merecurial and Python-2.7.x, Python-3.Y

2016-10-01 Thread Michael Felt
Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone https://hg.python.org/cpython works. What is the next step to getting Python-2.7 AND Python-3.7 so I can submit patches against both versions

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 08:34, Terry Reedy wrote: No. By default, the working directory for a clone is for the default branch. Any clone can be 'updated' to any branch. I have each share clone updated to a different branch, so I never update to a different branch. -- This answers my underlying questi

working with ctypes and complex data structures

2016-10-02 Thread Michael Felt
I am trying to understand the documentation re: ctypes and interfacing with existing libraries. I am reading the documentation, and also other sites that have largely just copied the documentation - as well as the "free chapter" at O'Reilly (Python Cookbook). I am missing anything on CFields

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 19:01, Ned Batchelder wrote: On Saturday, October 1, 2016 at 9:25:57 PM UTC-4, Michael Felt wrote: Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone https://hg.python.org

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt wrote: > >a) where is documentation on "CField"'s? I will reply more later - just a quick thanks. Not using maxsize will be good, also in a different patch - also specific to AIX

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt wrote: a) where is documentation on "CField"'s? It's undocumented. So I do not feel so bad about not finding anything :) A CField is a data descriptor that accesses a struct field with

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 03-Oct-16 16:35, Michael Felt wrote: I'd alias the type instead of defining a struct, e.g. `time_t = c_long`. This preserves automatic conversion of the simple type. The reason for the not using alias is because a) I was trying to be more inline with the text of the include file. I

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 19:50, Michael Felt wrote: class perfstat_cpu_total_t(Structure): """ typedef struct { /* global cpu information */ int ncpus;/* number of active logical processors */ int ncpus_cfg; /* number of config

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
On 02-Oct-16 19:50, Michael Felt wrote: I am trying to understand the documentation re: ctypes and interfacing with existing libraries. I am reading the documentation, and also other sites that have largely just copied the documentation - as well as the "free chapter" at O'

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
On 05-Oct-16 22:29, Emile van Sebille wrote: Thanks for the reply! After a shirt coffeebreak - back into the fray - and I found the following: +76 class cpu_total: +77 def __init__(self): +78 __perfstat__ = CDLL("libperfstat.a(shr_64.o)") +79 prototype = CFUNC

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
- because it made me pause and understand better what I had written. And now the real thankyou for the detail you shared! M On 03-Oct-16 17:53, eryk sun wrote: On Mon, Oct 3, 2016 at 2:35 PM, Michael Felt wrote: On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt

Re: working with ctypes and complex data structures

2016-10-06 Thread Michael Felt
On 04-Oct-16 04:48, eryk sun wrote: On Mon, Oct 3, 2016 at 9:27 PM, Michael Felt wrote: int perfstat_subsystem_total( perfstat_id_t *name, perfstat_subsystem_total_t *userbuff, int sizeof_struct, int desired_number); ... +79 class cpu_total: +80 def __init__

Conventions and requirements for a python module

2016-10-11 Thread Michael Felt
From reading the python source, and other projects I am looking to patch I see that there is often a file __init__.py, sometimes empty (only comments), sometimes not. I have tried looking in what I hope are the "regular" places such as: https://docs.python.org, readthedocs (it took 454 second

Re: Conventions and requirements for a python module

2016-10-11 Thread Michael Felt
On 11/10/2016 17:30, Michael Torrie wrote: On 10/11/2016 08:29 AM, Michael Felt wrote: From reading the python source, and other projects I am looking to patch I see that there is often a file __init__.py, sometimes empty (only comments), sometimes not. I have tried looking in what I hope

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Felt
On 04-Feb-17 02:07, Cameron Simpson wrote: On 03Feb2017 17:21, Wildman wrote: On Sat, 04 Feb 2017 09:25:42 +1100, Cameron Simpson wrote: Also, what you describe with rc.local wouldn't work anyway, even if it had ben what was asked. Of course, you are correct. I don't know where my head w

(Initial) Questions about sysconfig.*

2016-03-04 Thread Michael Felt
First, a simple one: sysconfig.is_python_build() Return True if the current Python installation was built from source. sysconfig.is_python_build() False Now, not earth shattering, but I did build this from source - so can someone help me with understanding why Python says no? FYI: The

Re: (Initial) Questions about sysconfig.*

2016-03-04 Thread Michael Felt
a (local) patch. Michael p.s. the >>> prompts make it look very colorful in my mail program! On 2016-03-04 11:22, Peter Otten wrote: Michael Felt wrote: First, a simple one: sysconfig.is_python_build() Return True if the current Python installation wa

AIX build and (potentially missing modules

2016-03-18 Thread Michael Felt
I have been packaging python for AIX - and wanting minimal dependancies I have been ignoring the final messages from make. Personally, I do not see any real harm in the missing *audio "bits", but how terrible are the other missing "bits" for normal python programs? Many thanks for feedback!

Re: When will os.remove fail?

2017-03-14 Thread Michael Felt
On 13/03/2017 02:51, Steve D'Aprano wrote: On Mon, 13 Mar 2017 05:45 am, Alain Ketterlin wrote: Steve D'Aprano writes: [...] It seems that os.remove on Linux will force the delete even if the file is read-only or unreadable, provided you own the file. Your permissions on the file do not rea