Didier Dorange-Pattoret a écrit :
Bonsoir,
Dans unohelper.py il y aurait cette fonction : def |
fileUrlToSystemPath( url )
lu ici : http://udk.openoffice.org/python/python-bridge.html#references
Cordialement.
|
Existe-t-il une fonction pour récupérer le nom du fichier sans URL,
l'inverse de ConvertToURL ?
Pierre Launay
Merci de ta réponse, ça marche sous Debian, je vérifierais demain sous
windows.
Il faut ajouter au début :
import unohelper
...
et à la fin
f=unohelper.fileUrlToSystemPath( xNom) #chemin du fichier .ods sans URL
e=open(f[:-3]+'h','w') #ouvre fichier.h en écriture extension ods
remplacé par h
e.write(texte) #comme avant
e.close() #comme avant
Amicalement,
Pierre Launay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]