User Profile

Collapse

Profile Sidebar

Collapse
newlasdjfk
newlasdjfk
Last Activity: Oct 20 '09, 04:24 PM
Joined: Mar 11 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Well, I found out myslelf.
    I case someone else needs it... here it is. Apparently pythons built in:
    for line in file
    don't consider a linebreak with \r as a true linebreak (at least not in windows). So since I couldn't find out how to get this stdout with universal linebreak, so I made my own loop:

    Code:
            
    seek = 0
    line = ""
    extra_run = 5000 ## rsync.exe send returncode before terminated.
    ...
    See more | Go to post

    Leave a comment:


  • newlasdjfk
    started a topic catching stdout in realtime from subprocess

    catching stdout in realtime from subprocess

    I have read tons of posts but still can't seem to figure it out.

    I want to subprocess.Pope n() rsync.exe in windows, and print the stdout in python.

    This works...
    Code:
    import subprocess, time, os, sys
    
    cmd = "rsync.exe -vaz souce/ dest/"
    
    p = subprocess.Popen(cmd,
                         shell=True,
                         bufsize=64,
                         stdin=subprocess.PIPE,
    ...
    See more | Go to post

  • newlasdjfk
    started a topic zend pdf merge files
    in PHP

    zend pdf merge files

    Is anyone familiar with Zend Pdf framework and knows how to use it to merge two pdf-files.

    Trying to open and merge 2 pdf-files. Gives me the following error.

    --------------------------------------------------------------------------------------------
    Uncaught exception 'Zend_Pdf_Excep tion' with message 'Page is attached to one documen, but rendered in context of another
    --------------------------------------------------------------------------------------------...
    See more | Go to post
No activity results to display
Show More
Working...