strings for beginers

Discussion in 'Python' started by Sapote, Mar 7, 2009.

  1. Sapote

    Sapote Guest

    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)

    ^^^^^
     
    Sapote, Mar 7, 2009
    #1
    1. Advertising

  2. Sapote

    Tim Wintle Guest

    On Sat, 2009-03-07 at 12:53 -0800, Sapote wrote:
    > 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.)
     
    Tim Wintle, Mar 7, 2009
    #2
    1. Advertising

  3. Sapote

    Tim Wintle Guest

    On Sat, 2009-03-07 at 21:25 +0000, Tim Wintle wrote:
    > 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.
     
    Tim Wintle, Mar 7, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Skywise
    Replies:
    11
    Views:
    4,681
  2. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    768
    Malcolm
    Jun 24, 2006
  3. Replies:
    6
    Views:
    414
    blangela
    Mar 9, 2007
  4. Additya

    Html for Beginers

    Additya, Dec 8, 2009, in forum: HTML
    Replies:
    9
    Views:
    572
    Jukka K. Korpela
    Dec 10, 2009
  5. Replies:
    1
    Views:
    236
    Seebs
    Nov 9, 2010
Loading...

Share This Page