strings for beginers

S

Sapote

I am attempting to modify a python program (Discspan) that I
downloaded from sourceforge. I know nothing of Python and little of
programming.

The program will back ups large numbers of files to to multiple
DVDs. The burning routine was rather primitive I have modified the
burn burn_cmd to write an iso file to the hard drive. Unnfortunately
I do not understand the string building that is going on here

I have an incrementing variable disc_num that I could insert in the
line below to create discspanisoX.iso where X is incrementing...

burn_cmd = "mkisofs -udf -o /home/donkey/discspaniso.iso -graft-
points --path-list %s" %(temp_list)

^^^^^
 
T

Tim Wintle

I have an incrementing variable disc_num that I could insert in the
line below to create discspanisoX.iso where X is incrementing...

burn_cmd = "mkisofs -udf -o /home/donkey/discspaniso.iso -graft-
points --path-list %s" %(temp_list)

burn_cmd = "mkisofs -udf -o /home/donkey/discspaniso%d.iso
-graft-points --path-list %s" %(x,temp_list)

(i.e. %d for an integer, %s for a string, %f for a float etc.)
 
T

Tim Wintle

burn_cmd = "mkisofs -udf -o /home/donkey/discspaniso%d.iso
-graft-points --path-list %s" %(x,temp_list)

obviously I meant to say

burn_cmd = "mkisofs -udf -o /home/donkey/discspaniso%
d.iso-graft-points --path-list %s" %(disc_num,temp_list)

- hadn't noticed the variable was disc_num.

Full explanation should be easily found on Google.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top