I have tried os.walk in the past and couldn't get it to work reliably,
with hindsight may be due to the same issue
On 17/04/13 21:17, Ziggy wrote:
Mick, are you using os.walk() ? I haven't tried it myself but I
wouldn't be surprised if the bus.0 recursion gave it fits. The
following Python should work to circumvent the issue:
|forroot,subFolders,files inos.walk(1wdir):
if'bus.0'insubFolders:
subFolders.remove('bus.0')|
I've use os.walk() elsewhere, just haven't traversed the 1w tree with
it yet.
Paul Davis
On 04/17/2013 07:02 AM, Paul Alfille wrote:
This looks like a bug. Thanks your for finding it. The level of
descending bus.x directories is specific to your network topology.
In general, however, there is no reason to go into the bus.x
directories. All the information should be present in the root
directory. The only additional information in the bus.x directories
is specific to the bus-master (i.e. interface/* information).
So I'll fix the directory structure for the next release, but you can
easily skip bus.x directories in your program now.
Paul Alfille
On Wed, Apr 17, 2013 at 6:36 AM, Mick Sulley <[email protected]
<mailto:[email protected]>> wrote:
I am having trouble understanding the file structure, it is not
behaving
as I expected.
My structure looks like this in Nautilus -
/var/1-wire/mnt
81.8C7E30000000
alarm
bus.0
81.8C7E30000000
alarm
bus.0
10.0D54A9010800
81.8C7E30000000
alarm
interface
settings
simultaneous
structure
system
uncached
settings
simultaneous
structure
system
uncached
This is what I expected and what I see in Nautilus, however when
I try
to navigate in Python, or in a terminal, if I try
cd /var/1-wire/mnt/bus.0/bus.0
that is fine, but if I try
cd /var/1-wire/mnt/bus.0/bus.0/bus.0/bus.0
that also works, I can cd to any level of additional /bus.0
directories. I cannot see these directories in Nautilus.
I am trying to write Python code to navigate down the directory
structure, but the problem is that it just keeps going deeper and
deeper, finding more /bus.0 directories.
I am guessing that this is all expected behaviour, even though it
came
as a surprise to me:)
Is there a way to tell if the directories that I see are real (or as
real as FUSE directories ever are)?
Thanks
Mick
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for
building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free
account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Owfs-developers mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis& visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis& visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers