Re: Create multiple sqlite tables, many-to-many design

2019-08-15 Thread Gregory Ewing
Chris Angelico wrote: I prefer to say "Trails" for the table, and "Trail" would then refer to a single row from that table. That makes sense for a data structure in your program that contains a collection of rows. But I've come to the view that SQL tends to read better if the names of the datab

Re: Create multiple sqlite tables, many-to-many design

2019-08-15 Thread Chris Angelico
On Thu, Aug 15, 2019 at 7:41 PM Gregory Ewing wrote: > > Chris Angelico wrote: > > I prefer to say "Trails" for the table, and "Trail" would then refer > > to a single row from that table. > > That makes sense for a data structure in your program that contains a > collection of rows. But I've come

Re: Create multiple sqlite tables, many-to-many design

2019-08-15 Thread Peter Otten
Chris Angelico wrote: > On Thu, Aug 15, 2019 at 7:41 PM Gregory Ewing > wrote: >> >> Chris Angelico wrote: >> > I prefer to say "Trails" for the table, and "Trail" would then refer >> > to a single row from that table. >> >> That makes sense for a data structure in your program that contains a >>

absolute path to a file

2019-08-15 Thread Paul St George
Can someone please tell me how to get the absolute path to a file? I have tried os.path.abspath. In the code below I have a problem in the final line (15). # |import bpy|| ||import os|| || ||texture_list = []|| || ||with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", "w") as outstream:|

Re: absolute path to a file

2019-08-15 Thread Chris Angelico
On Fri, Aug 16, 2019 at 6:01 AM Paul St George wrote: > > Can someone please tell me how to get the absolute path to a file? I > have tried os.path.abspath. In the code below I have a problem in the > final line (15). > > # > |import bpy|| > ||import os|| > || > ||texture_list = []|| > || > ||with

Re: absolute path to a file

2019-08-15 Thread Manfred Lotz
On Thu, 15 Aug 2019 22:00:17 +0200 Paul St George wrote: > Can someone please tell me how to get the absolute path to a file? I > have tried os.path.abspath. In the code below I have a problem in the > final line (15). > > # > |import bpy|| > ||import os|| > || > ||texture_list = []|| > || > |

Re: absolute path to a file

2019-08-15 Thread Cameron Simpson
On 15Aug2019 22:52, Manfred Lotz wrote: On Thu, 15 Aug 2019 22:00:17 +0200 Paul St George wrote: But I want an absolute path such as: ---Plane uses image01.tif saved at /Users/Lion/Desktop/test8/image01.tif ---Plane uses image02.tif saved at /Users/Lion/Desktop/images/image02.tif If it is rel

Re: absolute path to a file

2019-08-15 Thread Manfred Lotz
On Fri, 16 Aug 2019 09:00:38 +1000 Cameron Simpson wrote: > On 15Aug2019 22:52, Manfred Lotz wrote: > >I did this: > >from pathlib import Path > >abs_myfile = Path('./myfile').resolve() > >which worked fine for me. > > There is also os.path.realpath(filename) for this purpose. In modern > Py