write()

Discussion in 'Python' started by Hyun-su, Aug 22, 2011.

  1. Hyun-su

    Hyun-su Guest

    Hi,
    I have a file which is 3D data ([pixel_x, pixel_y, pixel_z])

    I want to plot and write into other file as 1 dimension ([:, y_cut,
    z_cut])

    How can I do it?
     
    Hyun-su, Aug 22, 2011
    #1
    1. Advertising

  2. Hyun-su wrote:
    > I have a file which is 3D data ([pixel_x, pixel_y, pixel_z])
    >
    > I want to plot and write into other file as 1 dimension ([:, y_cut,
    > z_cut])
    >
    > How can I do it?


    I'd write a loop along these lines:

    with open(outputfile, 'w') as o:
    for pixel_x, pixel_y, pixel_z in input_data:
    o.write(...)


    If you want a better suggestion, I'd suggest that you provide more info.
    Also, and that is very important, you should indicate which efforts you
    already too. In particular, I'd suggest the introductory tutorial on Python
    (see http://docs.python.org) and E.S. Raymonds essay on smart questions
    (search the web for it). If you don't show effort, people will assume you
    are lazy and just need someone to do your homework for you.

    Good luck!

    Uli

    --
    Domino Laser GmbH
    Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
     
    Ulrich Eckhardt, Aug 22, 2011
    #2
    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. =?Utf-8?B?QWJlbCBDaGFu?=
    Replies:
    6
    Views:
    9,523
    Rahul
    May 3, 2006
  2. Peter Hansen
    Replies:
    1
    Views:
    408
    Joona I Palaste
    Aug 24, 2003
  3. JasBascom
    Replies:
    1
    Views:
    374
    John Harrison
    Feb 24, 2004
  4. Peter Hansen
    Replies:
    1
    Views:
    432
    Joona I Palaste
    Aug 24, 2003
  5. Chuck Amadi
    Replies:
    0
    Views:
    540
    Chuck Amadi
    Jun 22, 2004
Loading...

Share This Page