Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46667 > unrolled thread
| Started by | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| First post | 2013-06-01 08:44 -0700 |
| Last post | 2013-06-02 11:22 +0100 |
| Articles | 20 on this page of 154 — 24 participants |
Back to article view | Back to comp.lang.python
Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-01 08:44 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-01 23:02 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-02 07:01 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-02 08:22 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) David <bouncingcats@gmail.com> - 2013-06-02 18:11 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 07:35 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-02 14:36 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-02 15:51 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 08:04 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 01:15 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 08:23 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-02 15:47 -0400
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-02 16:24 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 08:36 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-02 16:55 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 09:21 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 02:31 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 09:44 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 03:05 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 10:12 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Torrie <torriem@gmail.com> - 2013-06-02 11:21 -0600
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 03:21 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 11:34 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Torrie <torriem@gmail.com> - 2013-06-02 23:40 -0600
Re: Changing filenames from Greeklish => Greek (subprocess complain) Tim Delaney <timothy.c.delaney@gmail.com> - 2013-06-03 09:10 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Tim Delaney <timothy.c.delaney@gmail.com> - 2013-06-03 09:13 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 15:02 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 22:05 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 22:22 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 22:31 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Torrie <torriem@gmail.com> - 2013-06-02 23:45 -0600
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 23:11 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-03 10:00 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 19:05 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-03 02:32 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-03 23:04 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-03 06:46 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 17:36 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-03 02:12 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) rusi <rustompmody@gmail.com> - 2013-06-03 05:54 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) nagia.retsina@gmail.com - 2013-06-03 06:48 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-03 22:37 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) rusi <rustompmody@gmail.com> - 2013-06-03 21:35 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-04 05:48 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-03 23:43 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-03 22:46 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) nagia.retsina@gmail.com - 2013-06-03 23:28 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-04 17:35 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 01:05 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Nobody <nobody@nowhere.com> - 2013-06-04 08:39 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 00:58 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Nobody <nobody@nowhere.com> - 2013-06-04 14:01 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 06:37 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 06:49 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 06:57 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-04 15:09 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 07:18 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 07:24 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Torrie <torriem@gmail.com> - 2013-06-04 09:07 -0600
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 09:57 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 10:23 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-04 19:53 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 11:27 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-04 20:45 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 11:51 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 12:32 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 13:03 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-05 07:47 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 20:44 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 21:05 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 21:15 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Torrie <torriem@gmail.com> - 2013-06-04 23:40 -0600
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 23:05 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-05 06:03 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 23:40 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 04:08 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-05 17:44 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:34 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Heiko Wundram <modelnine@modelnine.org> - 2013-06-06 10:50 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 03:35 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Heiko Wundram <modelnine@modelnine.org> - 2013-06-06 12:44 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 04:00 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Heiko Wundram <modelnine@modelnine.org> - 2013-06-06 13:09 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 04:24 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Heiko Wundram <modelnine@modelnine.org> - 2013-06-06 13:31 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 04:31 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Fábio Santos <fabiosantosart@gmail.com> - 2013-06-04 21:26 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) alex23 <wuwei23@gmail.com> - 2013-06-04 18:28 -0700
RE: Changing filenames from Greeklish => Greek (subprocess complain) Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-05 06:04 +0300
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 20:28 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-05 13:32 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) alex23 <wuwei23@gmail.com> - 2013-06-04 21:47 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 22:06 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-05 05:56 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:43 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-05 19:32 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:43 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 20:43 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 21:42 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-06 12:35 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 05:04 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-06 13:50 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 11:13 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-06 21:03 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 12:17 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-06 22:25 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:39 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:56 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:59 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-06 23:15 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-07 01:29 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-06 23:07 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-06 22:57 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-07 01:25 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) nagia.retsina@gmail.com - 2013-06-06 23:35 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-07 16:46 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 00:08 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-07 17:24 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Roel Schroeven <roel@roelschroeven.net> - 2013-06-08 11:19 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-07 09:09 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 00:32 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Michael Weylandt <michael.weylandt@gmail.com> - 2013-06-07 08:42 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 11:10 +0300
Re: Changing filenames from Greeklish => Greek (subprocess complain) "R. Michael Weylandt" <michael.weylandt@gmail.com> - 2013-06-07 09:52 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-08 07:57 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) rusi <rustompmody@gmail.com> - 2013-06-06 20:13 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) MRAB <python@mrabarnett.plus.com> - 2013-06-06 20:42 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:05 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:21 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Cameron Simpson <cs@zip.com.au> - 2013-06-07 09:08 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Cameron Simpson <cs@zip.com.au> - 2013-06-06 20:24 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 04:16 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) jmfauth <wxjmfauth@gmail.com> - 2013-06-05 22:54 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-06 16:11 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 23:38 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-06 09:53 +0100
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-04 20:18 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 11:33 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Lele Gaifax <lele@metapensiero.it> - 2013-06-04 21:31 +0200
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 20:40 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-04 08:47 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 02:00 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-06 12:44 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 11:46 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Cameron Simpson <cs@zip.com.au> - 2013-06-07 11:01 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-07 02:13 +0000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 09:56 +0300
Re: Changing filenames from Greeklish => Greek (subprocess complain) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-05 06:06 +0000
RE: Changing filenames from Greeklish => Greek (subprocess complain) Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-02 22:44 +0300
Re: Changing filenames from Greeklish => Greek (subprocess complain) nagia.retsina@gmail.com - 2013-06-02 12:51 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Chris Angelico <rosuav@gmail.com> - 2013-06-03 06:46 +1000
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 21:59 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-02 08:02 -0700
Re: Changing filenames from Greeklish => Greek (subprocess complain) Nobody <nobody@nowhere.com> - 2013-06-02 11:22 +0100
Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8 Next page →
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-07 00:32 -0700 |
| Message-ID | <9204ec80-a272-4733-aabe-1e319a0c7add@googlegroups.com> |
| In reply to | #47312 |
Τη Παρασκευή, 7 Ιουνίου 2013 10:09:29 π.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> As already explained, often a SyntaxError is introduced by *preceeding*
> "text", so you must look at your code with a "wider eye".
That what i ahte aabout error reporting. You have some syntax error someplace and error reports you another line, so you have to check the whole code again.
Well i just did, i see no syntactical errors.
> Yes: and that usually imply that the *function* accepts (at least) *two*
> arguments, specifically the source and the target names, right? How many
> arguments are you actually giving to the os.rename() function above?
i'm giving it two.
os.rename( filepath_bytes filepath.encode('utf-8') )
1st = filepath_bytes
2nd = filepath.encode('utf-8')
Source and Target respectively.
[toc] | [prev] | [next] | [standalone]
| From | Michael Weylandt <michael.weylandt@gmail.com> |
|---|---|
| Date | 2013-06-07 08:42 +0100 |
| Message-ID | <mailman.2843.1370590974.3114.python-list@python.org> |
| In reply to | #47315 |
On Jun 7, 2013, at 8:32, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> Τη Παρασκευή, 7 Ιουνίου 2013 10:09:29 π.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
>
>> As already explained, often a SyntaxError is introduced by *preceeding*
>> "text", so you must look at your code with a "wider eye".
>
> That what i ahte aabout error reporting. You have some syntax error someplace and error reports you another line, so you have to check the whole code again.
> Well i just did, i see no syntactical errors.
>
>> Yes: and that usually imply that the *function* accepts (at least) *two*
>> arguments, specifically the source and the target names, right? How many
>> arguments are you actually giving to the os.rename() function above?
>
> i'm giving it two.
> os.rename( filepath_bytes filepath.encode('utf-8')
Missing comma, which is, after all, just a matter of syntax so it can't matter, right?
>
> 1st = filepath_bytes
> 2nd = filepath.encode('utf-8')
>
> Source and Target respectively.
> --
> http://mail.python.org/mailman/listinfo/python-list
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-07 11:10 +0300 |
| Message-ID | <mailman.2844.1370592660.3114.python-list@python.org> |
| In reply to | #47315 |
[Multipart message — attachments visible in raw view] — view raw
On 7/6/2013 10:42 πμ, Michael Weylandt wrote:
>
> os.rename( filepath_bytes filepath.encode('utf-8')
> Missing comma, which is, after all, just a matter of syntax so it can't matter, right?
>
I doubted that os.rename arguments must be comma seperated.
But ater reading the docs.
s.rename(/src/,/dst/)<http://docs.python.org/2/library/os.html#os.rename>
Rename the file or directory/src/to/dst/. If/dst/is a
directory,OSError
<http://docs.python.org/2/library/exceptions.html#exceptions.OSError>will
be raised. On Unix, if/dst/exists and is a file, it will be replaced
silently if the user has permission. The operation may fail on some
Unix flavors if/src/and/dst/are on different filesystems. If
successful, the renaming will be an atomic operation (this is a
POSIX requirement). On Windows, if/dst/already exists,OSError
<http://docs.python.org/2/library/exceptions.html#exceptions.OSError>will
be raised even if it is a file; there may be no way to implement an
atomic rename when/dst/names an existing file.
Availability: Unix, Windows.
Indeed it has to be:
os.rename( filepath_bytes, filepath.encode('utf-8')
'mv source target' didn't require commas so i though it was safe to assume that os.rename did not either.
I'am happy to announce that after correcting many idiotic error like commas, missing colons and declaring of variables, this surrogate erro si the last i get.
I still dont understand what surrogate means. In english means replacement.
Here is the code:
#========================================================
# Collect filenames of the path dir as bytes
filename_bytes = os.listdir( b'/home/nikos/public_html/data/apps/' )
# Iterate over all filenames in the path dir
for filename in filename_bytes:
# Compute 'path/to/filename' in bytes
filepath_bytes = b'/home/nikos/public_html/data/apps/' + b'filename'
try:
filepath = filepath_bytes.decode('utf-8')
except UnicodeDecodeError:
try:
filepath = filepath_bytes.decode('iso-8859-7')
# Rename current filename from greek bytes => utf-8 bytes
os.rename( filepath_bytes, filepath.encode('utf-8') )
except UnicodeDecodeError:
print( '''I give up! This filename is unreadable! ''')
#========================================================
# Get filenames of the apps directory as unicode
filenames = os.listdir( '/home/nikos/public_html/data/apps/' )
# Load'em
for filename in filenames:
try:
# Check the presence of a file against the database and insert if it doesn't exist
cur.execute('''SELECT url FROM files WHERE url = %s''', (filename,) )
data = cur.fetchone() #filename is unique, so should only be one
if not data:
# First time for file; primary key is automatic, hit is defaulted
cur.execute('''INSERT INTO files (url, host, lastvisit) VALUES (%s, %s, %s)''', (filename, host, lastvisit) )
except pymysql.ProgrammingError as e:
print( repr(e) )
#========================================================
filenames = os.listdir( '/home/nikos/public_html/data/apps/' )
filenames = ()
# Build a set of 'path/to/filename' based on the objects of path dir
for filename in filenames:
filenames.add( filename )
# Delete spurious
cur.execute('''SELECT url FROM files''')
data = cur.fetchall()
# Check database's filenames against path's filenames
for filename in data:
if filename not in filenames:
cur.execute('''DELETE FROM files WHERE url = %s''', (filename,) )
=================================
[Fri Jun 07 11:08:17 2013] [error] [client 79.103.41.173] File "/home/nikos/public_html/cgi-bin/files.py", line 88, in <module>
[Fri Jun 07 11:08:17 2013] [error] [client 79.103.41.173] cur.execute('''SELECT url FROM files WHERE url = %s''', filename )
[Fri Jun 07 11:08:17 2013] [error] [client 79.103.41.173] File "/usr/local/lib/python3.3/site-packages/PyMySQL3-0.5-py3.3.egg/pymysql/cursors.py", line 108, in execute
[Fri Jun 07 11:08:17 2013] [error] [client 79.103.41.173] query = query.encode(charset)
[Fri Jun 07 11:08:17 2013] [error] [client 79.103.41.173] UnicodeEncodeError: 'utf-8' codec can't encode character '\\udcce' in position 35: surrogates not allowed
--
Webhost <http://superhost.gr>&& Weblog <http://psariastonafro.wordpress.com>
[toc] | [prev] | [next] | [standalone]
| From | "R. Michael Weylandt" <michael.weylandt@gmail.com> |
|---|---|
| Date | 2013-06-07 09:52 +0100 |
| Message-ID | <mailman.2845.1370595194.3114.python-list@python.org> |
| In reply to | #47315 |
On Fri, Jun 7, 2013 at 9:10 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> On 7/6/2013 10:42 πμ, Michael Weylandt wrote:
>
>>> os.rename( filepath_bytes filepath.encode('utf-8')
>
>> Missing comma, which is, after all, just a matter of syntax so it can't
>> matter, right?
>
> I doubted that os.rename arguments must be comma seperated.
All function calls in Python require commas if you are putting in more
than one argument. [0]
> But ater reading the docs.
>
> s.rename(src, dst)
>
> Rename the file or directory src to dst. If dst is a directory, OSError will
> be raised. On Unix, if dst exists and is a file, it will be replaced
> silently if the user has permission. The operation may fail on some Unix
> flavors if src and dst are on different filesystems. If successful, the
> renaming will be an atomic operation (this is a POSIX requirement). On
> Windows, if dst already exists, OSError will be raised even if it is a file;
> there may be no way to implement an atomic rename when dst names an existing
> file.
>
> Availability: Unix, Windows.
>
> Indeed it has to be:
>
> os.rename( filepath_bytes, filepath.encode('utf-8')
Parenthesis missing here as well.
>
> 'mv source target' didn't require commas so i though it was safe to assume
> that os.rename did not either.
>
That's for shell programming -- different language entirely.
The surrogate business is back to Unicode, which ain't my specialty so
I'll leave that to more able programmers.
MW
[0] You could pass multiple arguments by way of a tuple or dictionary
using */** but if you want arguments that aren't in the container
being passed, you're back to needing commas.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-06-08 07:57 +0000 |
| Message-ID | <51b2e3d0$0$29966$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #47308 |
On Thu, 06 Jun 2013 23:35:33 -0700, nagia.retsina wrote:
>> Working with bytes is only for when the file names are turned to
>> garbage. Your file names (some of them) are turned to garbage. Fix
>> them, and then use file names as strings.
>
> Can't '~/data/apps/' is filled every day with more and more files which
> are uploaded via FileZilla client, which i think it behaves pretty much
> like putty, uploading filenames as greek-iso bytes.
Well, that is certainly a nuisance. Try something like this:
# Untested.
dir = b'/home/nikos/public_html/data/apps/' # This must be bytes.
files = os.listdir(dir)
for name in files:
pathname_as_bytes = dir + name
for encoding in ('utf-8', 'iso-8859-7', 'latin-1'):
try:
pathname = pathname_as_bytes.decode(encoding)
except UnicodeDecodeError:
continue
# Rename to something valid in UTF-8.
if encoding != 'utf-8':
os.rename(pathname_as_bytes, pathname.encode('utf-8'))
assert os.path.exists(pathname)
break
else:
# This only runs if we never reached the break.
raise ValueError('unable to clean filename %r'%pathname_as_bytes)
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-06-06 20:13 -0700 |
| Message-ID | <2d975e67-fe9b-44e0-86d1-c7790fba1af7@s2g2000pbz.googlegroups.com> |
| In reply to | #47258 |
On Jun 7, 12:03 am, Lele Gaifax <l...@metapensiero.it> wrote: <snipped> > You should *read* and *understand* the error message! When you *shout* at the deaf, the non-deaf get deaf <wink>.
[toc] | [prev] | [next] | [standalone]
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2013-06-06 20:42 +0100 |
| Message-ID | <mailman.2824.1370547736.3114.python-list@python.org> |
| In reply to | #47253 |
<html>
<head>
<meta content="text/html; charset=ISO-8859-7"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/06/2013 19:13, Νικόλαος Κούρας
wrote:<br>
</div>
<blockquote
cite="mid:332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com"
type="cite">
<pre wrap="">Τη Πέμπτη, 6 Ιουνίου 2013 3:50:52 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> If you're happy for that change to happen, then go ahead.
I have made some modifications to the code you provided me but i think something that doesnt accur to me needs fixing.
for example i switched:
# Give the path as a bytestring so that we'll get the filenames as bytestrings
path = b"/home/nikos/public_html/data/apps/"
# Walk through the files.
for root, dirs, files in os.walk( path ):
for filename in files:
to:
# Give the path as a bytestring so that we'll get the filenames as bytestrings
path = os.listdir( b'/home/nikos/public_html/data/apps/' )
</pre>
</blockquote>
os.listdir returns a list of the names of the objects in the given
directory.<br>
<br>
<blockquote
cite="mid:332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com"
type="cite">
<pre wrap=""># iterate over all filenames in the apps directory
</pre>
</blockquote>
Exactly, all the <u>names</u>.<br>
<br>
<blockquote
cite="mid:332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com"
type="cite">
<pre wrap="">for fullpath in path
# Grabbing just the filename from path
</pre>
</blockquote>
The name is a <u>bytestring</u>. Note, <u>name</u>, NOT full path.<br>
<br>
The following line will fail because the name is a <u>bytestring</u>,
and you can't mix bytestrings with Unicode strings:<br>
<blockquote
cite="mid:332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com"
type="cite">
<pre wrap=""> filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )</pre>
</blockquote>
^ bytestring
^ Unicode string
^ Unicode string<br>
<blockquote
cite="mid:332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com"
type="cite">
<pre wrap="">I dont know if it has the same effect:
Here is the the whole snippet:
=============================================
# Give the path as a bytestring so that we'll get the filenames as bytestrings
path = os.listdir( b'/home/nikos/public_html/data/apps/' )
# iterate over all filenames in the apps directory
for fullpath in path
# Grabbing just the filename from path
filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
try:
# Is this name encoded in utf-8?
filename.decode('utf-8')
except UnicodeDecodeError:
# Decoding from UTF-8 failed, which means that the name is not valid utf-8
# It appears that this filename is encoded in greek-iso, so decode from that and re-encode to utf-8
new_filename = filename.decode('iso-8859-7').encode('utf-8')
# rename filename form greek bytestream-> utf-8 bytestream
old_path = os.path.join(root, filename)
new_path = os.path.join(root, new_filename)
os.rename( old_path, new_path )
#============================================================
# Compute a set of current fullpaths
path = os.listdir( '/home/nikos/public_html/data/apps/' )
# Load'em
for fullpath in path:
try:
# Check the presence of a file against the database and insert if it doesn't exist
cur.execute('''SELECT url FROM files WHERE url = %s''', (fullpath,) )
data = cur.fetchone() #URL is unique, so should only be one
if not data:
# First time for file; primary key is automatic, hit is defaulted
cur.execute('''INSERT INTO files (url, host, lastvisit) VALUES (%s, %s, %s)''', (fullpath, host, lastvisit) )
except pymysql.ProgrammingError as e:
print( repr(e) )
==================================================================
The error is:
[Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] File "files.py", line 64
[Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] for fullpath in path
[Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] ^
[Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] SyntaxError: invalid syntax
Doesn't os.listdir( ...) returns a list with all filenames?
But then again when replacing take place to shert the fullpath to just the filane i think it doesn't not work because the os.listdir was opened as bytestring and not as a string....
What am i doing wrong?
</pre>
</blockquote>
You're changing things without checking what they do!<br>
<br>
</body>
</html>
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-06 13:05 -0700 |
| Message-ID | <99bfe749-a9fc-4b89-add9-70400b0c1e9a@googlegroups.com> |
| In reply to | #47266 |
Τη Πέμπτη, 6 Ιουνίου 2013 10:42:25 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> On 06/06/2013 19:13, οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½
> wrote:
>
>
>
> οΏ½οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½, 6 οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ 2013 3:50:52 οΏ½.οΏ½. UTC+3, οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ MRAB οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½:
>
> > If you're happy for that change to happen, then go ahead.
>
> I have made some modifications to the code you provided me but i think something that doesnt accur to me needs fixing.
>
>
> for example i switched:
>
> # Give the path as a bytestring so that we'll get the filenames as bytestrings
> path = b"/home/nikos/public_html/data/apps/"
>
> # Walk through the files.
> for root, dirs, files in os.walk( path ):
> for filename in files:
>
> to:
>
> # Give the path as a bytestring so that we'll get the filenames as bytestrings
> path = os.listdir( b'/home/nikos/public_html/data/apps/' )
>
>
> os.listdir returns a list of the names of the objects in the given
> directory.
>
>
>
>
> # iterate over all filenames in the apps directory
>
>
> Exactly, all the names.
>
>
>
>
> for fullpath in path
> # Grabbing just the filename from path
>
>
> The name is a bytestring. Note, name, NOT full path.
>
>
>
> The following line will fail because the name is a bytestring,
> and you can't mix bytestrings with Unicode strings:
>
>
> filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
>
> οΏ½ οΏ½ οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ ^ bytestringοΏ½οΏ½οΏ½
> οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ ^ Unicode stringοΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ οΏ½
> οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ ^ Unicode string
>
>
> I dont know if it has the same effect:
> Here is the the whole snippet:
>
>
> =============================================
> # Give the path as a bytestring so that we'll get the filenames as bytestrings
> path = os.listdir( b'/home/nikos/public_html/data/apps/' )
>
> # iterate over all filenames in the apps directory
> for fullpath in path
> # Grabbing just the filename from path
> filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
> try:
> # Is this name encoded in utf-8?
> filename.decode('utf-8')
> except UnicodeDecodeError:
> # Decoding from UTF-8 failed, which means that the name is not valid utf-8
>
> # It appears that this filename is encoded in greek-iso, so decode from that and re-encode to utf-8
> new_filename = filename.decode('iso-8859-7').encode('utf-8')
>
> # rename filename form greek bytestream-> utf-8 bytestream
> old_path = os.path.join(root, filename)
> new_path = os.path.join(root, new_filename)
> os.rename( old_path, new_path )
>
>
> #============================================================
> # Compute a set of current fullpaths
> path = os.listdir( '/home/nikos/public_html/data/apps/' )
>
> # Load'em
> for fullpath in path:
> try:
> # Check the presence of a file against the database and insert if it doesn't exist
> cur.execute('''SELECT url FROM files WHERE url = %s''', (fullpath,) )
> data = cur.fetchone() #URL is unique, so should only be one
>
> if not data:
> # First time for file; primary key is automatic, hit is defaulted
> cur.execute('''INSERT INTO files (url, host, lastvisit) VALUES (%s, %s, %s)''', (fullpath, host, lastvisit) )
> except pymysql.ProgrammingError as e:
> print( repr(e) )
> ==================================================================
>
> The error is:
> [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] File "files.py", line 64
> [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] for fullpath in path
> [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] ^
> [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] SyntaxError: invalid syntax
>
>
> Doesn't os.listdir( ...) returns a list with all filenames?
>
> But then again when replacing take place to shert the fullpath to just the filane i think it doesn't not work because the os.listdir was opened as bytestring and not as a string....
>
> What am i doing wrong?
>
>
> You're changing things without checking what they do!
Ah yes, it retruens filenames, not path/to/filenames
#========================================================
# Give the path as a bytestring so that we'll get the filenames as bytestrings
path = os.listdir( b'/home/nikos/public_html/data/apps/' )
# iterate over all filenames in the apps directory
for filename in path:
# Grabbing just the filename from path
try:
# Is this name encoded in utf-8?
filename.decode('utf-8')
except UnicodeDecodeError:
# Decoding from UTF-8 failed, which means that the name is not valid utf-8
# It appears that this filename is encoded in greek-iso, so decode from that and re-encode to utf-8
new_filename = filename.decode('iso-8859-7').encode('utf-8')
# rename filename form greek bytestream-> utf-8 bytestream
old_path = os.path.join(root, filename)
new_path = os.path.join(root, new_filename)
os.rename( old_path, new_path )
#========================================================
# Compute a set of current fullpaths
path = os.listdir( '/home/nikos/public_html/data/apps/' )
# Load'em
for filename in path:
try:
# Check the presence of a file against the database and insert if it doesn't exist
cur.execute('''SELECT url FROM files WHERE url = %s''', (filename,) )
data = cur.fetchone() #URL is unique, so should only be one
if not data:
# First time for file; primary key is automatic, hit is defaulted
cur.execute('''INSERT INTO files (url, host, lastvisit) VALUES (%s, %s, %s)''', (filename, host, lastvisit) )
except pymysql.ProgrammingError as e:
print( repr(e) )
# Delete spurious
cur.execute('''SELECT url FROM files''')
data = cur.fetchall()
for fullpath in data:
if fullpath not in "What should be written here in place of ditched set"
cur.execute('''DELETE FROM files WHERE url = %s''', (fullpath,) )
=============================
a) Is it correct that the first time i open os.listdir() as binary to grab the fileenames as bytestring and the 2nd normally to grab the filanems as unicode strings?
b) My spurious procedure is messed up now that i ditch the set fullpaths()
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-06 13:21 -0700 |
| Message-ID | <181b4472-c233-45b5-b93f-cf805862128f@googlegroups.com> |
| In reply to | #47267 |
Actually about the Spurious procedure iam happy with myelf that came up with this:
# Delete spurious
cur.execute('''SELECT url FROM files''')
data = cur.fetchall()
for filename in path
url = '/home/nikos/public_html/data/apps/' + filename
urls.add( url )
for url in data:
if url not in urls
cur.execute('''DELETE FROM files WHERE url = %s''', (url,) )
Ddint try it yet though, need to anwer previous post's
a) Is it correct that the first time i open os.listdir() as binary to grab the fileenames as bytestring and the 2nd normally to grab the filanems as unicode strings?
[toc] | [prev] | [next] | [standalone]
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2013-06-07 09:08 +1000 |
| Message-ID | <mailman.2830.1370561885.3114.python-list@python.org> |
| In reply to | #47220 |
On 06Jun2013 05:04, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= <nikos.gr33k@gmail.com> wrote: | We are in test mode so i dont know if when renaming actually take place what the encodings will be. | Shall i switch off test mode and try it for real? I would make a copy. Since you're renaming stuff, hard links would do: cp -rpl original-dir test-dir Then test stuff in test-dir. -- Cameron Simpson <cs@zip.com.au> Too much of a good thing is never enough. - Luba
[toc] | [prev] | [next] | [standalone]
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2013-06-06 20:24 +1000 |
| Message-ID | <mailman.2793.1370514270.3114.python-list@python.org> |
| In reply to | #47131 |
On 05Jun2013 11:43, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= <nikos.gr33k@gmail.com> wrote:
| Τη Τετάρτη, 5 Ιουνίου 2013 9:32:15 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
| > Using Python, I think you could get the filenames using os.listdir,
| > passing the directory name as a bytestring so that it'll return the
| > names as bytestrings.
|
| > Then, for each name, you could decode from its current encoding and
| > encode to UTF-8 and rename the file, passing the old and new paths to
| > os.rename as bytestrings.
|
| Iam not sure i follow:
|
| Change this:
|
| # Compute a set of current fullpaths
| fullpaths = set()
| path = "/home/nikos/public_html/data/apps/"
|
| for root, dirs, files in os.walk(path):
[...]
Have a read of this:
http://docs.python.org/3/library/os.html#os.listdir
The UNIX API accepts bytes for filenames and paths.
Python 3 strs are sequences of Unicode code points. If you try to
open a file or directory on a UNIX system using a Python str, that
string must be converted to a sequence of bytes before being handed
to the OS.
This is done implicitly using your locale settings if you just use a str.
However, if you pass a bytes to open or listdir, this conversion
does not take place. You put bytes in and in the case of listdir
you get bytes out.
You can work on pathnames in bytes and never concern yourself with
encode/decode at all.
In this way you can write code that does not care about the translation
between Unicode and some arbitrary byte encoding.
Of course, the issue will still arise when accepting user input;
your shell has done exactly this kind of thing when you renamed
your MP3 file. But it is possible to write pure utility code that
doesn't care about filenames as Unicode or str if you work purely
in bytes.
Regarding user filenames, the common policy these days is to use
utf-8 throughout. Of course you need to get everything into that
regime to start with.
--
Cameron Simpson <cs@zip.com.au>
...but C++ gloggles the cheesewad, thus causing a type conflict.
- David Jevans, jevans@apple.com
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-06 04:16 -0700 |
| Message-ID | <36673128-ddbc-472c-8377-0c279afdc4eb@googlegroups.com> |
| In reply to | #47204 |
Τη Πέμπτη, 6 Ιουνίου 2013 1:24:16 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 05Jun2013 11:43, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= <nikos.gr33k@gmail.com> wrote:
>
> | Τη Τετάρτη, 5 Ιουνίου 2013 9:32:15 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>
> | > Using Python, I think you could get the filenames using os.listdir,
>
> | > passing the directory name as a bytestring so that it'll return the
>
> | > names as bytestrings.
>
> |
>
> | > Then, for each name, you could decode from its current encoding and
>
> | > encode to UTF-8 and rename the file, passing the old and new paths to
>
> | > os.rename as bytestrings.
>
> |
>
> | Iam not sure i follow:
>
> |
>
> | Change this:
>
> |
>
> | # Compute a set of current fullpaths
>
> | fullpaths = set()
>
> | path = "/home/nikos/public_html/data/apps/"
>
> |
>
> | for root, dirs, files in os.walk(path):
>
> [...]
>
>
>
> Have a read of this:
>
>
>
> http://docs.python.org/3/library/os.html#os.listdir
>
>
>
> The UNIX API accepts bytes for filenames and paths.
>
>
>
> Python 3 strs are sequences of Unicode code points. If you try to
>
> open a file or directory on a UNIX system using a Python str, that
>
> string must be converted to a sequence of bytes before being handed
>
> to the OS.
>
>
>
> This is done implicitly using your locale settings if you just use a str.
>
>
>
> However, if you pass a bytes to open or listdir, this conversion
>
> does not take place. You put bytes in and in the case of listdir
>
> you get bytes out.
>
>
>
> You can work on pathnames in bytes and never concern yourself with
>
> encode/decode at all.
>
>
>
> In this way you can write code that does not care about the translation
>
> between Unicode and some arbitrary byte encoding.
>
>
>
> Of course, the issue will still arise when accepting user input;
>
> your shell has done exactly this kind of thing when you renamed
>
> your MP3 file. But it is possible to write pure utility code that
>
> doesn't care about filenames as Unicode or str if you work purely
>
> in bytes.
>
> Regarding user filenames, the common policy these days is to use
>
> utf-8 throughout. Of course you need to get everything into that
>
> regime to start with
Τη Πέμπτη, 6 Ιουνίου 2013 1:24:16 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 05Jun2013 11:43, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= <nikos.gr33k@gmail.com> wrote:
>
> | Τη Τετάρτη, 5 Ιουνίου 2013 9:32:15 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>
> | > Using Python, I think you could get the filenames using os.listdir,
>
> | > passing the directory name as a bytestring so that it'll return the
>
> | > names as bytestrings.
>
> |
>
> | > Then, for each name, you could decode from its current encoding and
>
> | > encode to UTF-8 and rename the file, passing the old and new paths to
>
> | > os.rename as bytestrings.
>
> |
>
> | Iam not sure i follow:
>
> |
>
> | Change this:
>
> |
>
> | # Compute a set of current fullpaths
>
> | fullpaths = set()
>
> | path = "/home/nikos/public_html/data/apps/"
>
> |
>
> | for root, dirs, files in os.walk(path):
>
> [...]
>
>
>
> Have a read of this:
>
>
>
> http://docs.python.org/3/library/os.html#os.listdir
>
>
>
> The UNIX API accepts bytes for filenames and paths.
>
>
>
> Python 3 strs are sequences of Unicode code points. If you try to
>
> open a file or directory on a UNIX system using a Python str, that
>
> string must be converted to a sequence of bytes before being handed
>
> to the OS.
>
>
>
> This is done implicitly using your locale settings if you just use a str.
>
>
>
> However, if you pass a bytes to open or listdir, this conversion
>
> does not take place. You put bytes in and in the case of listdir
>
> you get bytes out.
>
>
>
> You can work on pathnames in bytes and never concern yourself with
>
> encode/decode at all.
>
>
>
> In this way you can write code that does not care about the translation
>
> between Unicode and some arbitrary byte encoding.
>
>
>
> Of course, the issue will still arise when accepting user input;
>
> your shell has done exactly this kind of thing when you renamed
>
> your MP3 file. But it is possible to write pure utility code that
>
> doesn't care about filenames as Unicode or str if you work purely
>
> in bytes.
>
>
>
> Regarding user filenames, the common policy these days is to use
>
> utf-8 throughout. Of course you need to get everything into that
>
> regime to start with.
So i i nee to use os.listdir() to grab those filenames into bytes. okey.
So by changing this to:
fullpaths = set()
path = "/home/nikos/public_html/data/apps/"
for root, dirs, files in os.walk(path):
for fullpath in files:
fullpaths.add( os.path.join(root, fullpath) )
# Compute a set of current fullpaths
fullpaths = os.listdir( '/home/nikos/public_html/data/apps/' )
# Load'em
for fullpath in fullpaths:
try:
# Check the presence of a file against the database and insert if it doesn't exist
cur.execute('''SELECT url FROM files WHERE url = %s''', (fullpath,) )
data = cur.fetchone() #URL is unique, so should only be one
-----------------------------
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] Original exception was:
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] Traceback (most recent call last):
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] File "files.py", line 67, in <module>
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] cur.execute('''SELECT url FROM files WHERE url = %s''', (fullpath,) )
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] File "/usr/local/lib/python3.3/site-packages/PyMySQL3-0.5-py3.3.egg/pymysql/cursors.py", line 108, in execute
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] query = query.encode(charset)
[Thu Jun 06 14:15:38 2013] [error] [client 79.103.41.173] UnicodeEncodeError: 'utf-8' codec can't encode character '\\udcc5' in position 35: surrogates not allowed
[toc] | [prev] | [next] | [standalone]
| From | jmfauth <wxjmfauth@gmail.com> |
|---|---|
| Date | 2013-06-05 22:54 -0700 |
| Message-ID | <8e16c3b0-5d71-4857-971d-2e15dc575e43@j7g2000vbj.googlegroups.com> |
| In reply to | #47120 |
On 5 juin, 19:43, Νικόλαος Κούρας <nikos.gr...@gmail.com> wrote:
> Ôç ÔåôÜñôç, 5 Éïõíßïõ 2013 8:56:36 ð.ì. UTC+3, ï ÷ñÞóôçò Steven D'Aprano Ýãñáøå:
>
> Somehow, I don't know how because I didn't see it happen, you have one or
> more files in that directory where the file name as bytes is invalid when
> decoded as UTF-8, but your system is set to use UTF-8. So to fix this you
> need to rename the file using some tool that doesn't care quite so much
> about encodings. Use the bash command line to rename each file in turn
> until the problem goes away.
>
> But renaming ia hsell access like 'mv 'Euxi tou Ihsou.mp3' 'Åõ÷Þ ôïõ Éçóïõ.mp3' leade to that unknown encoding of this bytestream '\305\365\367\336\ \364\357\365\ \311\347\363\357\375.mp3'
>
> But please tell me Steven what linux tool you think it can encode the weird filename to proper 'Åõ÷Þ ôïõ Éçóïõ.mp3' utf-8?
>
> or we cna write a script as i suggested to decode back the bytestream using all sorts of available decode charsets boiling down to the original greek letters.
---------------
see
http://bugs.python.org/issue13643, msg msg149949 - (view) Author:
Antoine Pitrou (pitrou)
Quote:
So, you're complaining about something which works, kind of:
$ touch héhé
$ LANG=C python3 -c "import os; print(os.listdir())"
['h\udcc3\udca9h\udcc3\udca9']
> This makes robustly working with non-ascii filenames on different
> platforms needlessly annoying, given no modern nix should have problems
> just using UTF-8 in these cases.
So why don't these supposedly "modern" systems at least set the
appropriate environment variables for Python to infer the proper
character encoding?
(since these "modern" systems don't have a well-defined encoding...)
Answer: because they are not modern at all, they are antiquated,
inadapted and obsolete pieces of software designed and written by
clueless Anglo-American people. Please report bugs against these
systems. The culprit is not Python, it's the Unix crap and the utterly
clueless attitude of its maintainers ("filesystems are just bytes",
yeah, whatever...).
jmf
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-06-06 16:11 +1000 |
| Message-ID | <mailman.2786.1370499094.3114.python-list@python.org> |
| In reply to | #47190 |
On Thu, Jun 6, 2013 at 3:54 PM, jmfauth <wxjmfauth@gmail.com> wrote:
> ("filesystems are just bytes",
> yeah, whatever...).
Sure. You tell me what a proper Unicode rendition of an animated GIF is.
ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-05 23:38 -0700 |
| Message-ID | <35d6c1ae-13dd-4da9-9fbb-248d6afff0f0@googlegroups.com> |
| In reply to | #47190 |
Yes this is a linxu issue although locale is se to utf-8
root@nikos [~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
root@nikos [~]#
Since 'locale' is set to 'utf-8' why when i:
'mv 'Euxi tou Ihsou.mp3' 'Ευχή του Ιησού.mp3'
lead to that unknown encoded bytestream '\305\365\367\336\\364\357\365\311\347\363\357\375.mp3'
which isn't by default an utf-8 bytestream as locale indicated and python expected?
how 'files.py' is supposed to read this file now using:
# Compute a set of current fullpaths
fullpaths = set()
path = "/home/nikos/public_html/data/apps/"
for root, dirs, files in os.walk(path):
for fullpath in files:
fullpaths.add( os.path.join(root, fullpath) )
????
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-06-06 09:53 +0100 |
| Message-ID | <mailman.2789.1370508798.3114.python-list@python.org> |
| In reply to | #47190 |
On 06/06/2013 07:11, Chris Angelico wrote:
> On Thu, Jun 6, 2013 at 3:54 PM, jmfauth <wxjmfauth@gmail.com> wrote:
>> ("filesystems are just bytes",
>> yeah, whatever...).
>
> Sure. You tell me what a proper Unicode rendition of an animated GIF is.
>
> ChrisA
>
It's obviously one that doesn't use the flawed Python Flexible String
Representation :)
--
"Steve is going for the pink ball - and for those of you who are
watching in black and white, the pink is next to the green." Snooker
commentator 'Whispering' Ted Lowe.
Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Lele Gaifax <lele@metapensiero.it> |
|---|---|
| Date | 2013-06-04 20:18 +0200 |
| Message-ID | <mailman.2673.1370369909.3114.python-list@python.org> |
| In reply to | #46939 |
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
> root@nikos [~]# [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] File "files.py", line 72
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] data = cur.fetchone() #URL is unique, so should only be one
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] ^
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] SyntaxError: invalid syntax
Some kind soul already said you the reason. What follows is the longest
way I could think to spot your error:
>>> from collections import Counter
>>> stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )"
>>> chars_count = Counter(stmt)
>>> print("Number of '(': %d" % chars_count['('])
>>> print("Number of ')': %d" % chars_count[')'])
Number of '(': 2
Number of ')': 1
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it | -- Fortunato Depero, 1929.
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-04 11:33 -0700 |
| Message-ID | <ead72c9a-6886-48a7-b99e-f09137af8d51@googlegroups.com> |
| In reply to | #46951 |
Τη Τρίτη, 4 Ιουνίου 2013 9:18:29 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
> >>> from collections import Counter
> >>> stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )"
> >>> chars_count = Counter(stmt)
> >>> print("Number of '(': %d" % chars_count['('])
> >>> print("Number of ')': %d" % chars_count[')'])
> Number of '(': 2
> Number of ')': 1
Hello Lele, you have proven helpfull many times lets hope once more:
# Compute a set of current fullpaths
fullpaths = set()
path = "/home/nikos/www/data/apps/"
for root, dirs, files in os.walk(path):
for fullpath in files:
fullpaths.add( os.path.join(root, fullpath) )
stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )"
chars_count = Counter(stmt)
print("Number of '(': %d" % chars_count['('])
print("Number of ')': %d" % chars_count[')'])
sys.exit(0)
outputs this:
http://superhost.gr/cgi-bin/files.py
I dont even understand what that means though.
[toc] | [prev] | [next] | [standalone]
| From | Lele Gaifax <lele@metapensiero.it> |
|---|---|
| Date | 2013-06-04 21:31 +0200 |
| Message-ID | <mailman.2676.1370374281.3114.python-list@python.org> |
| In reply to | #46954 |
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
> Τη Τρίτη, 4 Ιουνίου 2013 9:18:29 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
>> Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
>
>> >>> from collections import Counter
>> >>> stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )"
>> >>> chars_count = Counter(stmt)
>> >>> print("Number of '(': %d" % chars_count['('])
>> >>> print("Number of ')': %d" % chars_count[')'])
>> Number of '(': 2
>> Number of ')': 1
>
>
> Hello Lele, you have proven helpfull many times lets hope once more:
With due respect, you need to *improve* your ability to *understand*
what people answer to your questions, otherwise it is a double (at a
minimum) waste of time.
The code above was my (failed) attempt to focus your attention on why
one of your scripts raised a SyntaxError: translating that code in plain
english, that line (the "stmt" variable above) contains *two* open
brackets, and *one* close bracket.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it | -- Fortunato Depero, 1929.
[toc] | [prev] | [next] | [standalone]
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-06-04 20:40 -0700 |
| Message-ID | <9deeabde-bc00-400d-b11a-9cedfcba961d@googlegroups.com> |
| In reply to | #46964 |
Τη Τρίτη, 4 Ιουνίου 2013 10:31:20 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> The code above was my (failed) attempt to focus your attention on why
> one of your scripts raised a SyntaxError: translating that code in plain
> english, that line (the "stmt" variable above) contains *two* open
> brackets, and *one* close bracket.
Lele, iam sorry fot that these days i do nothing, all day long but try to solve 2 issues, one of it being fils.py which this encoding issues. i missed the parentheses because i was tired. Just added it.
I believe that in order to be able to solve this i have to
a) Find out the actual encoding of my greek filenames are into, after the rename took place from english to greek chars at the CentOS. How can i check that
b) Findind out (a) will help tell python to decode 'fullpath' from the weird unknown yet to be discovered encoded bytestream to 'utf-8' like:
cur.execute('''SELECT url FROM files WHERE url = %s''', (fullpath.decode('weird_bytestream') ) )
Is this the right aproach? I went to sleep yesterday and my mind was still bothered with this encoding problem i'm dealing with.
[toc] | [prev] | [next] | [standalone]
Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8 Next page →
Back to top | Article view | comp.lang.python
csiph-web