Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python script to ease (linux) cd burning.

Name: Anonymous 2006-07-30 21:33

HAY GUYS its me again, i've brought you play asx streams in python, now i give you... linux... cd burning... simplification

usage: ./cdcheckwrite.py [files]

#!/usr/bin/env python

import os, sys

files = sys.argv[1:]

MAX_CD_SIZE = 740000000 #max size in bytes
total_size = 0

for i in files:
    total_size += int(os.path.getsize(i))

if total_size > MAX_CD_SIZE:
    print
    print "ERROR: File list of %s bytes, exceedes max size of %s bytes!" \
        %(total_size, MAX_CD_SIZE)
    print "Consider Splitting up the files"
    print
    sys.exit()
else:
    print
    print "Burning files:"
    for i in files:
        print i
    print

stomped_filelist = '"'+'" "'.join(files)+'"'
print stomped_filelist
os.system('mkisofs -r -J -l -v -o tmpiso.iso ' + stomped_filelist )
os.system("cdrecord dev=/dev/cdrom speed=52 gracetime=2 -eject -v tmpiso.iso")
print
print "Success!"
print
os.remove("tmpiso.iso")

replace with own vars, but seriously if you know how you could've written this yourself. so this is really only good for people that have the exact same setup as i do.

Name: Anonymous 2006-07-30 22:17 (sage)

Use k3b, faggot.

Name: Anonymous 2006-07-30 22:36

Python sucks sure there's an ebuild for python but it just get dropped to /opt, it's statically linked, and it's CLOSED SOURCE, which means that it is a BINARY package.

Name: Anonymous 2006-07-30 22:38 (sage)

oh you're back.

sage :D

Name: Anonymous 2006-07-30 22:50

>>2
get out of gui

Name: Anonymous 2006-07-30 23:10 (sage)

>>5

I'M SORRY THAT YOU CAN'T AFFORD ANYTHING MADE THIS DECADE, BUT THIS SHIT STILL SUCKS.

Name: Anonymous 2006-07-31 2:29

Another sage tread get?

Name: Anonymous 2006-07-31 16:51 (sage)

>>7
YES.

Name: Anonymous 2009-01-14 12:37

LISP

Name: Anonymous 2009-08-16 17:01

>>4

Name: Anonymous 2010-06-27 12:55

ur gay

Name: Anonymous 2010-06-28 10:55

beware the army of 12 year old autistics

Name: Anonymous 2010-12-21 21:36

Name: Sgt.Kabuᇧጓkiman踖 2012-05-28 19:31

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List