@Dave
Grateful thanks for your web site suggestions, and I will look them
up.
@Lawrence
Pleasee accept my apologies. I mistook your brevity for a superior
snotty attitude.
--
http://mail.python.org/mailman/listinfo/python-list
On 2:59 PM, Douglas wrote:
@Diez and @David
Thanks guys. Both excellent leads. Colour me happy. I can now make
progress and meet some deadlines. :)
@Lawrence
Why reinvent rsync?
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Note: I use Linux at hom
In message
, Douglas
wrote:
>> Why reinvent rsync?
> In what way is rsync relevant to the stated problem? Did you actually
> READ the question?
Yes.
> Note: I use Linux at home (yes, even rsync) and very much prefer it to
> Windows. However, at work I have no choice but to use the resources
> t
@Diez and @David
Thanks guys. Both excellent leads. Colour me happy. I can now make
progress and meet some deadlines. :)
@Lawrence
> Why reinvent rsync?
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Note: I use Linux at home (yes, even rsync) and very mu
In message
<8dc0fa8e-f0e6-4603-9283-186551597...@a19g2000vbi.googlegroups.com>, Douglas
wrote:
> It works well enough, but now I want to make it sensitive to the "A"
> attribute (only backup the file if it is set), and update it
> afterwards (unset it). This will help me avoid wasted disk due to
This will help me avoid wasted disk due to
> needless backups.
> I have searched the inter-web and not found any info on how to do
> access/alter Windows file attributes.
> Please can someone direct me to a web page with suitable info
> (preferably with code snyppyts)?
http://code.
-web and not found any info on how to do
> access/alter Windows file attributes.
> Please can someone direct me to a web page with suitable info
> (preferably with code snyppyts)?
No windows nowhere here, but os.stat should be your friend.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
found any info on how to do
access/alter Windows file attributes.
Please can someone direct me to a web page with suitable info
(preferably with code snyppyts)?
Many thanks, in advance.
-- Douglas
--
http://mail.python.org/mailman/listinfo/python-list
Hi Tim,
> Can't help you with x-platform; but for Windows I can offer my winsys package.
> if f.readonly:
>print f.created_at, f
I like your logical model - that's exactly what I was looking for.
Thank you for sharing your code.
Cheers,
Malcolm
--
http://mail.python.org/mailman/listinfo/
On 07/13/2010 10:56 AM, pyt...@bdurham.com wrote:
Any recommendations for a cross-platform module that creates a
directory object with not only file names, but file attributes as
well?
Use cases:
- Sort files by file size or date last modified
- Filter files by read-only status
I know I can
Any recommendations for a cross-platform module that creates a
directory object with not only file names, but file attributes as
well?
Use cases:
- Sort files by file size or date last modified
- Filter files by read-only status
I know I can use various standard library functions [1] to
This is what I (just now) put together as an example:
from os import stat,mknod,chown
def match_perms(org_fname,new_fname):
# Get information on old file
st = stat(org_fname)
st_mode = st.st_mode
st_uid = st.st_uid
st_gid = st.st_gid
# Create the new file
mknod(new_fname,st
If you know what the permissions are going to be then you can use umask to
set the default file creation permissions to match. Then any files created
in that directory will have the correct permissions.
I think the "pythonic" way to solve this problem would be to code up your
own module which han
[EMAIL PROTECTED] escreveu:
> On Apr 12, 5:19 pm, [EMAIL PROTECTED] wrote:
>> On Apr 12, 4:09 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>>
...
>
> After poking around a bit I also discovered the
> shutil module. It looks like you can use
> shutil.copy2. More Pythonic, yes?
>
I have seen t
On Apr 12, 5:19 pm, [EMAIL PROTECTED] wrote:
> On Apr 12, 4:09 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>
(snipped)
>
>
> import subprocess
> retcode = subprocess.call([ "/bin/cp", "-p", oldfile, newfile ])
> On my system, this preserves the access permissions and ownership.
>
> And if you m
On Apr 12, 4:09 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] escreveu:
>
>
>
> > On Apr 12, 9:20 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> >> Hi!
>
> >> I need to process a file to produce another file that *must* have
> >> *exactly* the same attributes and permissions of
[EMAIL PROTECTED] escreveu:
> On Apr 12, 9:20 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> Hi!
>>
>> I need to process a file to produce another file that *must* have
>> *exactly* the same attributes and permissions of the former. What is the
>> best way to do this? The file must not exist with
On Apr 12, 9:20 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I need to process a file to produce another file that *must* have
> *exactly* the same attributes and permissions of the former. What is the
> best way to do this? The file must not exist with contents (it may exist
> empty) un
The os module has this ability:
http://docs.python.org/lib/os-file-dir.html
--
Kevin Kelley
On 4/12/07, Paulo da Silva <[EMAIL PROTECTED]> wrote:
Hi!
I need to process a file to produce another file that *must* have
*exactly* the same attributes and permissions of the former. What is the
best
Hi!
I need to process a file to produce another file that *must* have
*exactly* the same attributes and permissions of the former. What is the
best way to do this? The file must not exist with contents (it may exist
empty) unless it has the same attributes and permissions.
I know how to do this us
[EMAIL PROTECTED] wrote:
> I know how to "walk" a folder/directory using Python, but I'd like to
> check the archive bit for each file. Can anyone make suggestions on
> how I might do this? Thanks.
>
You must have Mark Hammond's win32 package installed, then you can
(barely tested):
import win3
Ben Cartwright wrote:
> [EMAIL PROTECTED] wrote:
> > I know how to "walk" a folder/directory using Python, but I'd like to
> > check the archive bit for each file. Can anyone make suggestions on
> > how I might do this? Thanks.
>
>
> Since the archive bit is Windows-specific, your first place to
[EMAIL PROTECTED] wrote:
> I know how to "walk" a folder/directory using Python, but I'd like to
> check the archive bit for each file. Can anyone make suggestions on
> how I might do this? Thanks.
Since the archive bit is Windows-specific, your first place to check is
Mark Hammond's Python for
I know how to "walk" a folder/directory using Python, but I'd like to
check the archive bit for each file. Can anyone make suggestions on
how I might do this? Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
24 matches
Mail list logo