Re: [Tutor] tar a directory

2016-11-03 Thread Ben Finney
Bill Nolf writes: > python version 2.6.6 > > I'm trying to tar/gzip a directory, the directory is defined as an variable > > I want to tar and gzip the directory archive in the example below: > > import tarfile > dirarchive = /a/b/c/archive This code will not run. I can guess what you might mea

[Tutor] tar a directory

2016-11-03 Thread Bill Nolf
python version 2.6.6 I'm trying to tar/gzip a directory, the directory is defined as an variable I want to tar and gzip the directory archive in the example below: import tarfile dirarchive = /a/b/c/archive Test 1 tar.add(dirarchive) Error: name 'tar' not defined Test 2 tarfile.add(dirarch

Re: [Tutor] compress directory

2016-11-03 Thread Ben Finney
Bill Nolf writes: > How do I compress (gzip and/or tar) a directory in python? I found > examples of compressing a file using gzip or tar but not a directory. The Python standard library https://docs.python.org/3/library/> contains implementations of many common tools. It's well worth searchin

Re: [Tutor] compress directory

2016-11-03 Thread boB Stepp
On Thu, Nov 3, 2016 at 10:48 AM, Bill Nolf wrote: > How do I compress (gzip and/or tar) a directory in python? I found examples > of compressing a file using gzip or tar but not a directory. > thanks I did a search for almost your exact question and got this: http://stackoverflow.com/questions

[Tutor] compress directory

2016-11-03 Thread Bill Nolf
How do I compress (gzip and/or tar) a directory in python? I found examples of compressing a file using gzip or tar but not a directory. thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.o

[Tutor] Turn off digest mode before participating in the forum (was: Module webbrowser.os)

2016-11-03 Thread Ben Finney
Alan Gauld via Tutor writes: > Please do not send the entire digest. > Delete all that is not relevant. Rather: Don't reply to the digest message. It breaks threading (because you're not replying to the actual message that was sent by the person you're responding to). Digest mode is only for us

Re: [Tutor] Module webbrowser.os

2016-11-03 Thread Alan Gauld via Tutor
On 03/11/16 06:43, Palanikumar Gopalakrishnan wrote: > On Wed, Nov 2, 2016 at 7:36 AM, wrote: ... >> Today's Topics: >> >>1. Re: Python code (Danny Yoo) >>2. Re: implementing sed - termination error (c...@zip.com.au) >>3. Module webbrowser.os (Palanikumar Gopalakrishnan) >>4. Re: i

Re: [Tutor] Module webbrowser.os

2016-11-03 Thread Alan Gauld via Tutor
On 03/11/16 01:31, Steven D'Aprano wrote: > On Wed, Nov 02, 2016 at 09:16:56AM +, Alan Gauld via Tutor wrote: >> >> webbrowser.os(umask(0x777)) > > I think you've missed the round brackets () and imagined a dot . :-) Umm, yes, here is the actual session from my xterm: web.os.umask(0x777)

Re: [Tutor] Module webbrowser.os

2016-11-03 Thread Palanikumar Gopalakrishnan
On Wed, Nov 2, 2016 at 7:36 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to >