Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Martin A. Brown
Hello and good afternoon, The image: > http://imgur.com/a/CwA2G To me, this looks like a 'graph', which is a more general data structure -- it does not look like a 'tree' (in the computer-science meaning of the term, anyway). For purposes of all of my comments and answers below, I confess

Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Michael C
I dont know what a data model is :( I am thinking with one entry, I can have (x,y,z). Z is probably a list and it says to what point it connects to. so it's a list of lists. The problem then becomes: how do I generate a list of possible routes? So I'll potentially have a very big list of routes

Re: [Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Mats Wichmann
On 08/14/2017 03:06 PM, Alan Gauld via Tutor wrote: > > Forwarding to the list. > > Forwarded Message > > > > > pic > http://imgur.com/a/CwA2G > > On Mon, Aug 14, 2017 at 8:55 AM, Alan Gauld via Tutor > wrote: > > On

[Tutor] Fwd: Re: "Path tree"

2017-08-14 Thread Alan Gauld via Tutor
Forwarding to the list. Forwarded Message pic http://imgur.com/a/CwA2G On Mon, Aug 14, 2017 at 8:55 AM, Alan Gauld via Tutor > wrote: On 13/08/17 21:07, Michael C wrote: > Please look at the picture attached: This

Re: [Tutor] "Path tree"

2017-08-14 Thread Michael C
http://imgur.com/a/CwA2G I don't know to do this with math :( On Sun, Aug 13, 2017 at 1:07 PM, Michael C wrote: > Hi all: > > I am trying to formulate a "path-finding" function, and I am stuck on this > problem: > > Please look at the picture attached:

Re: [Tutor] conditional renaming folder and files in the tree

2017-08-14 Thread Mats Wichmann
On 08/14/2017 09:18 AM, banda gunda wrote: > Dear Tutor, > > > I have made some progress! > > But not yet got the results. > > Attached is revised code. > > > Specifically, the problem in below: > > > for root, dirs, files in os.walk(".", topdown=False): > for name in files: >

Re: [Tutor] conditional renaming folder and files in the tree

2017-08-14 Thread Peter Otten
banda gunda wrote: > Dear Tutor, > > > I have made some progress! > > But not yet got the results. > > Attached is revised code. > > > Specifically, the problem in below: > > > for root, dirs, files in os.walk(".", topdown=False): > for name in files: >

Re: [Tutor] conditional renaming folder and files in the tree

2017-08-14 Thread banda gunda
Dear Tutor, I have made some progress! But not yet got the results. Attached is revised code. Specifically, the problem in below: for root, dirs, files in os.walk(".", topdown=False): for name in files: print(os.path.join(root, name)) os.rename(path + name, path +

Re: [Tutor] "Path tree"

2017-08-14 Thread Alan Gauld via Tutor
On 13/08/17 21:07, Michael C wrote: > Please look at the picture attached: This is a text mailing list, no binary attachments allowed. The server strips them off. You need to put it on a web site and provide a link. > consisting of (x,y). Now I am trying to make a function go through this >

Re: [Tutor] "Path tree"

2017-08-14 Thread Mats Wichmann
On 08/13/2017 02:07 PM, Michael C wrote: > Hi all: > > I am trying to formulate a "path-finding" function, and I am stuck on this > problem: > > Please look at the picture attached: Those dots are coordinates of (x,y), > and this tree can be thought of as a list of tuples, with each tuple >

Re: [Tutor] Percentage of installations without setuptools (Was if __name__=='__main__' ...)

2017-08-14 Thread Thomas Güttler
Am 13.08.2017 um 02:12 schrieb Steven D'Aprano: On Fri, Aug 11, 2017 at 02:35:00PM +0200, Thomas Güttler wrote: How high is the percentage of python installation which don't have setuptools? I have no clue. Is it 5%, 10%, 15% ...? I know there is no definite answer to this question. But