Hi,

so, this part is done using DAL (scripted).

I use subprocess like below to run external scripts and stuff. when
failures, I want to dump the log in the DB.

proc = subprocess.Popen(strCmd,shell=True,
                        stdin=subprocess.PIPE,
                        stdout=subprocess.PIPE,
                        stderr=subprocess.PIPE)

            if updStr is None:
                out = proc.communicate()
                ... bla bla
                if len(out[1])>0:

so the resulting 'out[1] gets stored in the DB.


here's an example of one of the tables:

        db.define_table('scriptCompiler',
                Field('uuid',length=64,default=uuid.uuid4()),
                Field('cmdName'),
                Field('scriptCompiler_directory'),
                Field('log','text'))
        db.commit()

I use 'text' to provide for larger logs.

thanks for your help! :)

Mart


On Apr 27, 12:03 am, Massimo Di Pierro <[email protected]>
wrote:
> No. Can you provide an example of code that make that happen?
>
> On Apr 26, 7:17 pm, mart <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > is it expected for a text field to split the text on line breaks and
> > insert the '|' character? If yes, is there a way to change that
> > behavior?
>
> > Thanks,
> > Mart :)

Reply via email to