Thanks Ian. I was able to integrate the new filemaker code into my
project (after adding a few paste specific functions from the older
version) with no difficulty. I can definitely see the problem with
moving this code back into paste; there are quite a few design
enhancements that would break existing paste command extensions.
What are your thoughts on turning filemaker into a project that stands
on its own? There's certainly a lot of value in this module, and I
think that a number or projects could utilize this super-friendly API
for non paste/fassembler purposes.
Best,
James
On Sun, Aug 10, 2008 at 4:33 PM, Ian Bicking <[EMAIL PROTECTED]> wrote:
> James Kassemi wrote:
>>
>> 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.
>
> Well, right now you can do most of these operations using the Command
> instance, which has methods like ensure_file, etc. But it specifically
> doesn't have copy commands, which is a bit of a problem. And the copydir
> modules, as you've noticed, is too separate and itself has lots of
> functionality.
>
> I'm not really sure what the future of the filemaker module will/should be.
> I've moved the code into fassembler
> (https://svn.openplans.org/svn/fassembler/trunk/fassembler/filemaker.py) and
> that code is more complete and less buggy. But it's also a bit tied to
> fassembler.
>
>
> --
> Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
>
--
James Kassemi
Ideum (http://www.ideum.com)
dl: 505-903-6758 x3
of: 505-792-1110
fx: 505-792-1111
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users