Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46667 > unrolled thread

Changing filenames from Greeklish => Greek (subprocess complain)

Started byΝικόλαος Κούρας <nikos.gr33k@gmail.com>
First post2013-06-01 08:44 -0700
Last post2013-06-02 11:22 +0100
Articles 20 on this page of 154 — 24 participants

Back to article view | Back to comp.lang.python


Contents

  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 6 of 8 — ← Prev page 1 2 3 4 5 [6] 7 8  Next page →


#47220

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 05:04 -0700
Message-ID<808b7897-8ed4-4e0e-8976-4a22ae7f24cd@googlegroups.com>
In reply to#47218
First of all thank you for helping me MRAB.
After make some alternation to your code ia have this:

----------------------------------------
# Give the path as a bytestring so that we'll get the filenames as bytestrings
path = b"/home/nikos/public_html/data/apps/" 

# Setting TESTING to True will make it print out what renamings it will do, but not actually do them
TESTING = True 

# Walk through the files. 
for root, dirs, files in os.walk( path ): 
	for filename in files: 
		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 the filenames are encoded in ISO-8859-7, so decode from that and re-encode to UTF-8
			new_filename = filename.decode('iso-8859-7').encode('utf-8') 

			old_path = os.path.join(root, filename) 
			new_path = os.path.join(root, new_filename)
			if TESTING:
				print( '''<br>Will rename {!r} ---> {!r}<br><br>'''.format( old_path, new_path ) )
			else: 
				print( '''<br>Renaming {!r} ---> {!r}<br><br>'''.format( old_path, new_path ) )
				os.rename( old_path, new_path )
sys.exit(0)
-------------------------

and the output can be seen here: http://superhost.gr/cgi-bin/files.py

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?

[toc] | [prev] | [next] | [standalone]


#47226

FromMRAB <python@mrabarnett.plus.com>
Date2013-06-06 13:50 +0100
Message-ID<mailman.2804.1370523054.3114.python-list@python.org>
In reply to#47220
On 06/06/2013 13:04, Νικόλαος Κούρας wrote:
> First of all thank you for helping me MRAB.
> After make some alternation to your code ia have this:
>
> ----------------------------------------
> # Give the path as a bytestring so that we'll get the filenames as bytestrings
> path = b"/home/nikos/public_html/data/apps/"
>
> # Setting TESTING to True will make it print out what renamings it will do, but not actually do them
> TESTING = True
>
> # Walk through the files.
> for root, dirs, files in os.walk( path ):
> 	for filename in files:
> 		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 the filenames are encoded in ISO-8859-7, so decode from that and re-encode to UTF-8
> 			new_filename = filename.decode('iso-8859-7').encode('utf-8')
>
> 			old_path = os.path.join(root, filename)
> 			new_path = os.path.join(root, new_filename)
> 			if TESTING:
> 				print( '''<br>Will rename {!r} ---> {!r}<br><br>'''.format( old_path, new_path ) )
> 			else:
> 				print( '''<br>Renaming {!r} ---> {!r}<br><br>'''.format( old_path, new_path ) )
> 				os.rename( old_path, new_path )
> sys.exit(0)
> -------------------------
>
> and the output can be seen here: http://superhost.gr/cgi-bin/files.py
>
> 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?
>
The first one is '/home/nikos/public_html/data/apps/Ευχή του Ιησού.mp3'.

The second one is '/home/nikos/public_html/data/apps/Σκέψου έναν 
αριθμό.exe'.

These names are currently encoded in ISO-8859-7, but will be encoded in
UTF-8 if you turn off test mode.

If you're happy for that change to happen, then go ahead.

[toc] | [prev] | [next] | [standalone]


#47253

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 11:13 -0700
Message-ID<332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com>
In reply to#47226
Τη Πέμπτη, 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/' )

# 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/', '' )


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?

[toc] | [prev] | [next] | [standalone]


#47258

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-06 21:03 +0200
Message-ID<mailman.2819.1370545385.3114.python-list@python.org>
In reply to#47253
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:

> ...
> # Load'em
> for fullpath in path:
> 	try:
> ...
>
> 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?

You should *read* and *understand* the error message! 

This is the same kind of confusion you had when I pointed you at the
missing closing bracket some day ago, when you missed the meaning of the
error and assume it's source is related to something completely
different...

In the specific case, your line 64 is missing an ending colon (":").

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]


#47262

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 12:17 -0700
Message-ID<152c78f5-b777-44e2-a83d-a23ecf2f84a3@googlegroups.com>
In reply to#47258
Τη Πέμπτη, 6 Ιουνίου 2013 10:03:02 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
> 
> 
> 
> > ...
> 
> > # Load'em
> 
> > for fullpath in path:
> 
> > 	try:
> 
> > ...
> 
> >
> 
> > 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?
> 
> 
> 
> You should *read* and *understand* the error message! 
> 
> 
> 
> This is the same kind of confusion you had when I pointed you at the
> 
> missing closing bracket some day ago, when you missed the meaning of the
> 
> error and assume it's source is related to something completely
> 
> different...
> 
> 
> 
> In the specific case, your line 64 is missing an ending colon (":").
> 
> 
> 
> ciao, lele.

Oh my God, was that simple and i was smashing my head to see where did i made a synatx error. Missed the colon! Well the error shoudl ahve said "Hey man, you missed a colon!", that would help a lot.

Now the error afetr fixithg that transformed to:

[Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173]     filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
[Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173] TypeError: expected bytes, bytearray or buffer compatible object


but htats becaus eof these lines:

# 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/', '' )

i can remove the bianry openign from os.listdir but then this will not work.
MRAB has told me that i need to open those paths and filenames as bytestreams and not as unicode strings.

[toc] | [prev] | [next] | [standalone]


#47270

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-06 22:25 +0200
Message-ID<mailman.2825.1370550312.3114.python-list@python.org>
In reply to#47262
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:

> Now the error afetr fixithg that transformed to:
>
> [Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173]     filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
> [Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173] TypeError: expected bytes, bytearray or buffer compatible object
>
> MRAB has told me that i need to open those paths and filenames as bytestreams and not as unicode strings.

Yes, that way the function will return a list of bytes
instances. Knowing that, consider the following example, that should
ring a bell:

    $ python3
    Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 09:59:04) 
    [GCC 4.7.2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> path = b"some/path"
    >>> path.replace('some', '')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: expected bytes, bytearray or buffer compatible object
    >>> path.replace(b'some', b'')
    b'/path'
    >>> 

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]


#47272

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 13:39 -0700
Message-ID<bff00c52-1a3a-488f-986d-6f9cea3e405c@googlegroups.com>
In reply to#47270
Τη Πέμπτη, 6 Ιουνίου 2013 11:25:15 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
> 
> 
> 
> > Now the error afetr fixithg that transformed to:
> 
> >
> 
> > [Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173]     filename = fullpath.replace( '/home/nikos/public_html/data/apps/', '' )
> 
> > [Thu Jun 06 22:13:49 2013] [error] [client 79.103.41.173] TypeError: expected bytes, bytearray or buffer compatible object
> 
> >
> 
> > MRAB has told me that i need to open those paths and filenames as bytestreams and not as unicode strings.
> 
> 
> 
> Yes, that way the function will return a list of bytes
> 
> instances. Knowing that, consider the following example, that should
> 
> ring a bell:
> 
> 
> 
>     $ python3
> 
>     Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 09:59:04) 
> 
>     [GCC 4.7.2] on linux
> 
>     Type "help", "copyright", "credits" or "license" for more information.
> 
>     >>> path = b"some/path"
> 
>     >>> path.replace('some', '')
> 
>     Traceback (most recent call last):
> 
>       File "<stdin>", line 1, in <module>
> 
>     TypeError: expected bytes, bytearray or buffer compatible object
> 
>     >>> path.replace(b'some', b'')
> 
>     b'/path'

Ah yes, very logical, i should have though of that.
Tahnks here is what i have up until now with many corrections.


#========================================================
# Get filenames of the apps directory 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 bytestreams --> utf-8 bytestreams
		old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
		new_path = b'/home/nikos/public_html/data/apps/' + b'new_filename')
		os.rename( old_path, new_path )


#========================================================
# Get filenames of the apps directory as unicode
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) )


#========================================================
# Empty set that will be filled in with 'path/to/filename' of path dir
urls = ()

# Build a set of 'path/to/filename' based on the objects of path dir
for filename in path
	url = '/home/nikos/public_html/data/apps/' + filename
	urls.add( url )

# Delete spurious 
cur.execute('''SELECT url FROM files''')
data = cur.fetchall()

# Check database's urls against path's urls
for url in data:
	if url not in urls
		cur.execute('''DELETE FROM files WHERE url = %s''', (url,) )
==================================

I think its ready! But i want to hear from you, before i try it! :)

[toc] | [prev] | [next] | [standalone]


#47273

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 13:56 -0700
Message-ID<05418431-0881-4271-9683-367070b99ab5@googlegroups.com>
In reply to#47272
Has some errors:

#========================================================
# Get filenames of the apps directory 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 bytestreams --> utf-8 bytestreams
		old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
		new_path = b'/home/nikos/public_html/data/apps/' + b'new_filename')
		os.rename( old_path, new_path )


#========================================================
# Get filenames of the apps directory as unicode
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()        #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) )


#========================================================
path = 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 path
	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,) )
-------------------------------

The only problem now is the bytestrings:

nikos@superhost.gr [~/www/cgi-bin]# [Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]   File "files.py", line 78
[Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]     old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
[Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]                                                                   ^
[Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173] SyntaxError: invalid syntax


Dont know how to add a bytestremed path to a bytestream filename

[toc] | [prev] | [next] | [standalone]


#47274

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 13:59 -0700
Message-ID<fdc8bb0f-45de-48df-bd93-c2347bf52188@googlegroups.com>
In reply to#47273
I'm very sorry for continuous pastes.
Didnt include the whole thing before.
Here it is:


#========================================================
# Get filenames of the path dir 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 bytestreams --> utf-8 bytestreams
		old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
		new_path = b'/home/nikos/public_html/data/apps/' + b'new_filename')
		os.rename( old_path, new_path )


#========================================================
# Get filenames of the apps directory as unicode
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()        #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) )


#========================================================
path = 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 path
	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,) )
=====================================

Just the bytestream error and then i belive its ready this time.

[toc] | [prev] | [next] | [standalone]


#47276

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-06 23:15 +0200
Message-ID<mailman.2828.1370553315.3114.python-list@python.org>
In reply to#47273
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:

> The only problem now is the bytestrings:

*One*, not the *only*.

>
> nikos@superhost.gr [~/www/cgi-bin]# [Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]   File "files.py", line 78
> [Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]     old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
> [Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173]                                                                   ^
> [Thu Jun 06 23:50:42 2013] [error] [client 79.103.41.173] SyntaxError: invalid syntax
>
>
> Dont know how to add a bytestremed path to a bytestream filename

Come on Niklos, either you learn from what I (and others) try to teach
you, or I'm afraid you won't get more hints... this list cannot become
your remote editor tool!

*Read* the error message, *look* at the arrow (i.e. the caret character
 "^"), *understand* what that is trying to tell you...

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]


#47294

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-06-07 01:29 +0000
Message-ID<51b1376e$0$29966$c3e8da3$5496439d@news.astraweb.com>
In reply to#47273
On Thu, 06 Jun 2013 13:56:36 -0700, Νικόλαος Κούρας wrote:

> SyntaxError: invalid syntax
> 
> 
> Dont know how to add a bytestremed path to a bytestream filename


Nikos, READ THE ERROR MESSAGE!!!

The error doesn't say anything about *adding*. It is a SyntaxError.

Please stop flooding us with dozens and dozens of trivial posts asking 
the same questions over and over again. There are well over 120 posts in 
this thread, it is impossible for anyone to keep track of it.


* Do not send a new post every time you make a small change to the code.

* Do not send a new post every time you make a typo and get a SyntaxError.

* READ THE ERROR MESSAGES and try to understand them first.

* SyntaxError means YOU HAVE MADE A TYPING MISTAKE.

* SyntaxError means that your code is not executed at all. Not a
  single line of code is run. If no code is running, the problem
  cannot possibly be with "add" or some other operation.

  If your car will not start, the problem cannot be with the brakes.

  If your program will not start, the problem cannot be with adding
  two byte strings.

* You can fix syntax errors yourself. READ THE CODE that has the 
  syntax error and LOOK FOR WHAT IS WRONG. Then fix it.

* Don't tell us when you have fixed it. Nobody cares. Just fix it.

Here is the line of code again:

old_path = b'/home/nikos/public_html/data/apps/' + b'filename') 


There is a syntax error in this line of code. Hint: here are some simple 
examples of the same syntax error:

a = b + c)
x = y * z)
alist.sort())
assert 1+1 == 2)

Can you see the common factor? Each of those lines will give the same 
syntax error as your line.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#47275

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-06 23:07 +0200
Message-ID<mailman.2827.1370552854.3114.python-list@python.org>
In reply to#47272
Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:

> Tahnks here is what i have up until now with many corrections.

I'm afraid many more are needed :-)

> ...
> 		# rename filename form greek bytestreams --> utf-8 bytestreams
> 		old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
> 		new_path = b'/home/nikos/public_html/data/apps/' + b'new_filename')
> 		os.rename( old_path, new_path )

a) there are two syntax errors, you have spurious close brackets there
b) you are basically assigning *constant* expressions to both variables,
   most probably not what you meant

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]


#47285

FromMRAB <python@mrabarnett.plus.com>
Date2013-06-06 22:57 +0100
Message-ID<mailman.2829.1370555834.3114.python-list@python.org>
In reply to#47272
On 06/06/2013 22:07, Lele Gaifax wrote:
> Νικόλαος Κούρας <nikos.gr33k@gmail.com> writes:
>
>> Tahnks here is what i have up until now with many corrections.
>
> I'm afraid many more are needed :-)
>
>> ...
>> 		# rename filename form greek bytestreams --> utf-8 bytestreams
>> 		old_path = b'/home/nikos/public_html/data/apps/' + b'filename')
>> 		new_path = b'/home/nikos/public_html/data/apps/' + b'new_filename')
>> 		os.rename( old_path, new_path )
>
> a) there are two syntax errors, you have spurious close brackets there
> b) you are basically assigning *constant* expressions to both variables,
>     most probably not what you meant
>
Yet again, he's changed things unnecessarily, and the code was meant 
only as a one-time
fix to correct the encoding of some filenames. :-(

[toc] | [prev] | [next] | [standalone]


#47293

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-06-07 01:25 +0000
Message-ID<51b13693$0$29966$c3e8da3$5496439d@news.astraweb.com>
In reply to#47262
On Thu, 06 Jun 2013 12:17:16 -0700, Νικόλαος Κούρας wrote:

> i can remove the bianry openign from os.listdir but then this will not
> work. MRAB has told me that i need to open those paths and filenames as
> bytestreams and not as unicode strings.

Do you understand why?

If you do not understand *why* we tell you to do a thing, then you have 
no understanding and are doing Cargo Cult programming:

http://en.wikipedia.org/wiki/Cargo_cult_programming
http://en.wikipedia.org/wiki/Cargo_cult


MRAB tells you to work with the bytes, because the file names' bytes are 
invalid when used as UTF-8. If you fix the file names by renaming using a 
terminal set to UTF-8, then they will be valid and you can forget about 
working with bytes.

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.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#47308

Fromnagia.retsina@gmail.com
Date2013-06-06 23:35 -0700
Message-ID<3c1e7a3f-5e41-4ab8-bced-755a9ad6327d@googlegroups.com>
In reply to#47293
Τη Παρασκευή, 7 Ιουνίου 2013 4:25:40 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:

> MRAB tells you to work with the bytes, because the filenames' bytes are 
> invalid decoded as UTF-8. If you fix the file names by renaming using a 
> terminal set to UTF-8, then they will be valid and you can forget about  
> working with bytes.

Yes, but but 'putty' seems to always forget when i tell it to use utf8 for displaying and always picks up the Win8's default charset and it doesnt have a save options dialog. I cant always remember to switch to utf8 charset or renaming all the time from termnal so many greek filenames.

> 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.

So that garbage will happen every day due to 'Putty' & 'FileZilla' clients.

So files.py before doing their stuff must do the automatic conversions from greek bytes to utf-8 bytes.

Here is what i have up until now.

=================================================
 # 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 filenames_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 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!"
=========================================

This is the best i can come up with, but after:

nikos@superhost.gr [~/www/cgi-bin]# python files.py
  File "files.py", line 75
    os.rename( filepath_bytes filepath.encode('utf-8') )
                                     ^
SyntaxError: invalid syntax
nikos@superhost.gr [~/www/cgi-bin]#
============================================


I am seeign the caret pointing at filepath but i cant follow what it tries to tell me. No parenthesis missed or added this time due to speed and tireness.

This rename statement tries to convert the greek byted filepath to utf-8 byted filepath.

I can't see whay this is wrong though.

[toc] | [prev] | [next] | [standalone]


#47309

FromChris Angelico <rosuav@gmail.com>
Date2013-06-07 16:46 +1000
Message-ID<mailman.2839.1370588120.3114.python-list@python.org>
In reply to#47308
On Fri, Jun 7, 2013 at 4:35 PM,  <nagia.retsina@gmail.com> wrote:
> Yes, but but 'putty' seems to always forget when i tell it to use utf8 for displaying and always picks up the Win8's default charset and it doesnt have a save options dialog. I cant always remember to switch to utf8 charset or renaming all the time from termnal so many greek filenames.


I use PuTTY too (though that'll change when I next upgrade Traal, as
I'll no longer have any Windows clients), and it's set to UTF-8 in the
Winoow|Translation page. Far as I know, those settings are all saved
into the Saved Sessions settings, back on the Session page.

ChrisA

[toc] | [prev] | [next] | [standalone]


#47311

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-07 00:08 -0700
Message-ID<33b6b4e7-ee8a-4bf6-8d31-e58975b4e71b@googlegroups.com>
In reply to#47309
Τη Παρασκευή, 7 Ιουνίου 2013 9:46:53 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Fri, Jun 7, 2013 at 4:35 PM,  <nagia.retsina@gmail.com> wrote:
> 
> > Yes, but but 'putty' seems to always forget when i tell it to use utf8 for displaying and always picks up the Win8's default charset and it doesnt have a save options dialog. I cant always remember to switch to utf8 charset or renaming all the time from termnal so many greek filenames.
> 
> 
> 
> 
> 
> I use PuTTY too (though that'll change when I next upgrade Traal, as
> 
> I'll no longer have any Windows clients), and it's set to UTF-8 in the
> 
> Winoow|Translation page. Far as I know, those settings are all saved
> 
> into the Saved Sessions settings, back on the Session page.
> 
> 
> 
> ChrisA


Session settings afaik is for putty to remember hosts to connect to, not terminal options. I might be worng though. No matter how many times i change its options next time i run it always defaults back.

I'll google Traal right now.
You should also take o look on 'Secure Shell' extension for Chrome i just found out.

Seems a great plugin for Chrome. You'll definately like it, i did!

[toc] | [prev] | [next] | [standalone]


#47314

FromChris Angelico <rosuav@gmail.com>
Date2013-06-07 17:24 +1000
Message-ID<mailman.2842.1370589871.3114.python-list@python.org>
In reply to#47311
On Fri, Jun 7, 2013 at 5:08 PM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> I'll google Traal right now.

The one thing you're actually willing to go research, and it's
actually something that won't help you. Traal is the name of my
personal laptop. Spend your Googletrons on something else. :)

ChrisA

[toc] | [prev] | [next] | [standalone]


#47378

FromRoel Schroeven <roel@roelschroeven.net>
Date2013-06-08 11:19 +0200
Message-ID<mailman.2882.1370683216.3114.python-list@python.org>
In reply to#47311
Νικόλαος Κούρας schreef:
> Session settings afaik is for putty to remember hosts to connect to,
> not terminal options. I might be worng though. No matter how many times
> i change its options next time i run it always defaults back.

Putty can most definitely remember its settings:
- Start PuTTY; you should get the "PuTTY Configuration" window
- Select a session in the list of sessions
- Click Load
- Change any setting you want to change
- Go back to Session in the Category treeview
- Click Save

HTH

-- 
"People almost invariably arrive at their beliefs not on the basis of
proof but on the basis of what they find attractive."
         -- Pascal Blaise

roel@roelschroeven.net

[toc] | [prev] | [next] | [standalone]


#47312

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-07 09:09 +0200
Message-ID<mailman.2841.1370588966.3114.python-list@python.org>
In reply to#47308
nagia.retsina@gmail.com writes:

>   File "files.py", line 75
>     os.rename( filepath_bytes filepath.encode('utf-8') )
>                                      ^
> SyntaxError: invalid syntax
>
> I am seeign the caret pointing at filepath but i cant follow what it
> tries to tell me.

As already explained, often a SyntaxError is introduced by *preceeding*
"text", so you must look at your code with a "wider eye".

> This rename statement tries to convert the greek byted filepath to
> utf-8 byted filepath.

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 can't see whay this is wrong though.

Try stronger, I won't be give you further indications to your
SyntaxErrors, you *must* learn how to detect and fix those by yourself.

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]


Page 6 of 8 — ← Prev page 1 2 3 4 5 [6] 7 8  Next page →

Back to top | Article view | comp.lang.python


csiph-web