[Tutor] Directory Structure
Chris
chris2014 at postbox.xyz
Fri Sep 29 15:34:08 EDT 2017
On Fri, 29 Sep 2017 19:41:27 +0100
Alan Gauld via Tutor <tutor at python.org> wrote:
> On 29/09/17 18:02, Chris wrote:
>
> > I'd like to store a directory tree in a python script.
>
> That doesn't make much sense.
> A directory tree is stored on the hard disk.
> A python script is the source code to a program you execute
>
> What do you mean by "store the directory tree in the script"?
> Do you mean you want the script to copy an existing directory
> tree? Or to create a new one? Or to store some kind of
> representation of the tree in memory when your code runs?
> Or create a static model of a directory tree in
> your source code?
> Or something else? - if so, what?
I want to store some kind of representation of the tree in memory when
the code runs. Then I could not only move the mails but also create
lists, e.g. a table with mail headers.
> Again that's not very clear.
> Which mail system? Which OS? Some use a single file?
> Others use a directory tree (so I'm guess you mean one of those)
> and others use a database.
Directory tree, it's called Maildir. Server is dovecot.
> And what are you trying to do? remove old folders from the
> existing mail system - that could screw up its internal
> integrity checking (checksums for example)~ - or create
> an archive elsewhere?
Create an archive elsewhere. Copything the mails isn't the problem.
Finding them is easy. I just don't know howto represent the tree in the
script.
> Once we understand what you actually want to do we might
> find something suitable. But for now I have no clue what
> exactly you need.
Sorry, my question wasn't detailed enough.
- Chris
More information about the Tutor
mailing list