Re: python script Non-ASCII character

2017-03-19 Thread MRAB
On 2017-03-20 02:50, eryk sun wrote: On Sun, Mar 19, 2017 at 11:06 PM, MRAB wrote: If you're using Unicode string literals, your choices are: 1. Raw string literals: var1 = ur"C:\Users\username\Desktop\η γλωσσα μου\mylanguage\myfile" Raw unicode literals are practically useless in Pyth

Re: python script Non-ASCII character

2017-03-19 Thread eryk sun
On Sun, Mar 19, 2017 at 11:06 PM, MRAB wrote: > > If you're using Unicode string literals, your choices are: > > 1. Raw string literals: > > var1 = ur"C:\Users\username\Desktop\η γλωσσα μου\mylanguage\myfile" Raw unicode literals are practically useless in Python 2. They're not actually raw b

Re: python script Non-ASCII character

2017-03-19 Thread Steve D'Aprano
On Mon, 20 Mar 2017 06:48 am, Xristos Xristoou wrote: > Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos > Xristoou έγραψε: > > how to define my script with encoding of ISO-8859-7 or UTF-8?and for the > blanks ? First you need to know whether your editor is saving the file

Re: python script Non-ASCII character

2017-03-19 Thread MRAB
On 2017-03-19 20:10, Xristos Xristoou wrote: Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: @Terry non-ascii in pathnames i need for ex :var1="C:\Users\username\Desktop\my language\mylanguage\myfile" and for the blank ? Your choices are: 1. Raw string li

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: @Terry non-ascii in pathnames i need for ex :var1="C:\Users\username\Desktop\my language\mylanguage\myfile" and for the blank ? -- https://mail.python.org/mailman/listinfo/python-list

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: yes that i know but i need python 2.7 for my task -- https://mail.python.org/mailman/listinfo/python-list

Re: python script Non-ASCII character

2017-03-19 Thread Terry Reedy
On 3/19/2017 1:38 PM, Xristos Xristoou wrote: hello i have create a python script when read some files using paths and do something with that files. if that paths for files is in english likes this "c:/my_path/english " then python script working but if that paths is in my main language Non-

Re: python script Non-ASCII character

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 6:48 AM, Xristos Xristoou wrote: > Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou > έγραψε: > > how to define my script with encoding of ISO-8859-7 or UTF-8?and for the > blanks ? First, try using Python 3. Most of the time, that will be t

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: how to define my script with encoding of ISO-8859-7 or UTF-8?and for the blanks ? -- https://mail.python.org/mailman/listinfo/python-list

Re: python script Non-ASCII character

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 4:38 AM, Xristos Xristoou wrote: > hello i have create a python script when read some files using paths and do > something with that files. > if that paths for files is in english likes this "c:/my_path/english " then > python script working but if that paths is in my ma

python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
hello i have create a python script when read some files using paths and do something with that files. if that paths for files is in english likes this "c:/my_path/english " then python script working but if that paths is in my main language or the path have some blank character then not workin