Hello everyone,

I'm writing a paster plugin with PasteScript, and I'm running into a
few issues with the filemaker FileOp class.

The following code produces no interactive prompts when attempting to
copy over an existing file that contains different content. In fact,
messages state that the content has not changed. The only way to force
the newly rendered template data to be written to the destination file
is to manually delete the existing destination file.

    source_dir = os.path.join(os.path.dirname(__file__), 'templates')
    application_dir = find_my_application_root_directory()

    file_op = FileOp(source_dir=source_dir)
    file_op.copy_file('crud/controller.py_tmpl',
             dest=os.path.join(application_dir, 'controllers'),
             template_renderer=paste_script_template_renderer)

The load_content method seems to load the data from the destination
file without rendering the template if the destination file already
exists. Shouldn't the behavior of this method be to simply return the
rendered template data?

This is my first foray into the PasteScript plugin world, so I'd like
to make sure I'm approaching this operation correctly before I begin
filing bug reports.

Also, What's the current plan for the copy_dir method? Is it going to
be removed, or will it begin to implement the functionality of the
copydir.py module? I would be more than happy to implement this
functionality if it's needed and nobody else has plans with it.

Best,
James Kassemi

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to