From: AVL <info@atmsk.ru> To: м-р <mandrake-russian@altlinux.ru> Subject: [mdk-re] скрипт на питоне help!!! Date: Mon Nov 19 21:36:18 2001 Message-ID: <20011119215847.52fbaddb.info@atmsk.ru> (raw) дописываю тут скриптик на питоне. уперся в гадость. преобразование типов в следующих строчках не работает. StatAfm=os.stat(FileAfm); AfmSize=StatAfm[6]; AfmMtime=StatAfm[8]; StatPfb=os.stat(FilePfb); PfbSize=StatPfb[6]; PfbMtime=StatPfb[8]; temp = Font_Xml_Record; # temp = string.replace(temp,'%AfmSize%',AfmSize); # temp = string.replace(temp,'%AfmMtime%',eval(AfmMtime)); # temp = string.replace(temp,'%PfbSize%',eval(StatPfb[6])); # temp = string.replace(temp,'%PfbMtime%',eval(StatPfb[8])); вот эти закоментаренные строчки порождают ошибку: [avl@avl paratype]$ ./GPinst Traceback (most recent call last): File "./GPinst", line 83, in ? temp = string.replace(temp,'%AfmSize%',AfmSize); File "/usr/lib/python2.1/string.py", line 369, in replace return s.replace(old, new, maxsplit) TypeError: expected a character buffer object если print AfmSize; то все в порядке а вот тоже самое подставить в шаблон никак. :( что делать?
next reply other threads:[~2001-11-19 21:36 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-11-19 21:36 AVL [this message] 2001-11-19 21:47 ` Victor Sovetov 2001-11-19 22:37 ` AVL 2001-11-19 22:47 ` AVL 2001-11-20 0:45 ` [mdk-re] " Mikhail Zabaluev 2001-11-20 2:02 ` AVL
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011119215847.52fbaddb.info@atmsk.ru \ --to=info@atmsk.ru \ --cc=mandrake-russian@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git