Le 31/07/2017 ? 03:28, Gregory Pittman a ?crit :
On 07/30/2017 01:07 PM, Ronan Patrix wrote:
Bonjour ? tous,
Je tente de r?utiliser le script pr?sent? ici
(https://wiki.scribus.net/canvas/Printing_4-up_tickets_to_hard_copy_printer)
pour r?aliser un facturier avec une incr?mentation de la num?rotation
avant l'enregistrement en pdf de chaque fichier, et je tombe sur cette
erreur :
Traceback (most recent call last):
File "<string>", line 8, in <module>
IOError: [Errno 2] No such file or directory:
'E:\\_MonDossier\\0_Mod\xc3\xa8les\\Factures_A5.py'
Quand je tente de lancer tout ou partie du script dans la console, j'ai
des messages d'erreur d'indentation ou simplement 'init' qui s'affiche
sans plus de r?sultats.
Je vous joint le script. N'?tant pas tr?s ? l'aise avec python, je me sent un
peu d?pass?. C'est
pour cela que je fait appel ? votre aide.
Je suis sur Win 7 avec Scribus 1.4.6 et Python 3.6.
J'ai ? chaque d?marrage de scribus un message d'erreur concernant
ghostscript.
Merci pour votre soutien.
Bien cordialement.
Ronan
Hi Ronan,
This is not a very well written Python script. For one thing, I don't
know why it has a line 'import scribus', then later 'from scribus import
Printer' and so on. There is also some messiness with the indentation.
I gather you must have modified what is shown on the wiki...?
Greg
___
Scribus Mailing List: scribus at lists.scribus.net<mailto:scribus at
lists.scribus.net>
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Hi,
Thanks for your answer , I first emailed back only to you so lets share.
Most of the mistakes quoted above are on the original code (see link in my
first email), I only replaced the hard print part with pdf saving function.
I finally found a solution good enough for me, by typing this command in the
console :
for idx in range(3):
setText("F4431780" + `(idx)`, "Fnbr1")
setText("F4431780" + `(idx)`, "Fnbr2")
setText("F4431780" + `(idx)`, "Fnbr3")
filename = ("F4431780" + `(idx)`)
pdf = scribus.PDFfile()
pdf.file = filename+".pdf"
pdf.save()
But if I try to load any external python script file, I still get the same
error message, is there a specific configuration to tune in scribus to make
external script working ?
Thanks for your support.
Ronan
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
URL:
<http://lists.scribus.net/pipermail/scribus/attachments/20170731/b5f4817f/attachment.html>