Re: Changing filenames from Greeklish => Greek (subprocess complain)

2017-09-06 Thread geojitmailus
On Saturday, June 1, 2013 at 9:14:36 PM UTC+5:30, Νικόλαος Κούρας wrote: > /home/nikos/public_html/cgi-bin/metrites.py in () > 217 template = htmldata + counter > 218 elif page.endswith('.py'): > => 219 htmldata = subprocess.check_output( > '/home/n

Re: Complain

2015-12-31 Thread tjohnson
On 12/31/2015 11:24 AM, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't st

Re: Complain

2015-12-31 Thread Peter Pearson
On Thu, 31 Dec 2015 08:24:15 -0800, ebuka ogbonnaya wrote: > my name is Ebuka Egbunine, from Nigeria.I studied Geology and > mining.Actually i downloaded python3.5(32-bit) successfully on my laptop > which operates on 32-bit memory, but the application is not opening, it > displays the message " t

Re: Complain

2015-12-31 Thread Mark Lawrence
On 31/12/2015 16:24, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't start

Re: Complain

2015-12-31 Thread tjohnson
On 12/31/2015 11:24 AM, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't st

Complain

2015-12-31 Thread ebuka ogbonnaya
my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't start because api-ms-crt runtime-l1-1-0.dll is miss

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-16 Thread Roy Smith
In article , John Nagle wrote: > Then upgrade to 3D. You can represent latitude and longitude > as a 3-element unit vector. (GPS systems do this; latitude and > longitude are only generated at the end, for output.) And annoyingly so. Somebody I know was building a tracking system based on a

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-15 Thread John Nagle
On 10/10/2013 6:27 PM, Steven D'Aprano wrote: > For what it's worth, there is no three-dimensional extension to complex > numbers, but there is a four-dimensional one, the quaternions or > hypercomplex numbers. They look like 1 + 2i + 3j + 4k, where i, j and k > are all distinct but i**2 == j**2

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Gene Heskett
On Friday 11 October 2013 12:49:40 Roy Smith did opine: > In article , > > Oscar Benjamin wrote: > > If someone tried to explain why their field couldn't use ً for the > > circumference of a unit circle I would suggest that they adjust the > > other parts of their notation not ً (there are othe

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Steven D'Aprano
On Fri, 11 Oct 2013 10:05:03 -0400, Roy Smith wrote: > In article , > Oscar Benjamin wrote: > >> If someone tried to explain why their field couldn't use ð for the >> circumference of a unit circle I would suggest that they adjust the >> other parts of their notation not ð (there are other uses

Re: I am never going to complain about Python again

2013-10-11 Thread Joshua Landau
On 11 October 2013 10:11, Steven D'Aprano wrote: > On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote: > >> On 11 October 2013 03:08, Steven D'Aprano >> wrote: >>> >>> Given: >>> >>> x ∈ ℝ, x = 2 (reals) >>> y ∈ ℕ, y = 2 (natural numbers) >>> >>> we have x = y, but since 1/y is undefined (

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Roy Smith
In article , Oscar Benjamin wrote: > If someone tried to explain why their field couldn't use ð for the > circumference of a unit circle I would suggest that they adjust the > other parts of their notation not ð (there are other uses of ð. Pi is wrong: http://www.youtube.com/watch?v=jG7vhMMX

Re: I am never going to complain about Python again

2013-10-11 Thread Neil Cerutti
On 2013-10-11, Steven D'Aprano wrote: > On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote: > >> >>> 5.0 == abs(3 + 4j) >> False > > Did you maybe accidentally rebind abs? If not, what version of > Python are you using? Honestly, I think I got my Python term and my Vim term mixed up. I Shall

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Jussi Piitulainen
Oscar Benjamin writes: > tried to explain why their field couldn't use π for the > circumference of a unit circle I would suggest that they adjust the > other parts of their notation not π (there are other uses of π. There's τ for the full circle; π is used for half the circumference. -- https

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Oscar Benjamin
On 11 October 2013 10:35, David wrote: > On 11 October 2013 12:27, Steven D'Aprano > wrote: >> On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote: >> >>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: BTW, one of the earliest things that turned me on to Python was when I disc

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread Nobody
On Thu, 10 Oct 2013 14:12:36 +, Grant Edwards wrote: > Nope. "i" is electical current (though it's more customary to use upper > case). "I" is steady-state current (either AC or DC), "i" is small-signal current. -- https://mail.python.org/mailman/listinfo/python-list

Re: I am never going to complain about Python again

2013-10-11 Thread Chris Angelico
On Fri, Oct 11, 2013 at 8:11 PM, Steven D'Aprano wrote: > If you implicitly decide to promote entities, then of course you can > promote y to a real then take the invoice. Either you're channelling Bugs Bunny or you're trying to sell me something... you mean "take the inverse", I assume, here :)

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-11 Thread David
On 11 October 2013 12:27, Steven D'Aprano wrote: > On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote: > >> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: >>> BTW, one of the earliest things that turned me on to Python was when I >>> discovered that it uses j as the imaginary unit, not

Re: I am never going to complain about Python again

2013-10-11 Thread Steven D'Aprano
On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote: > On 11 October 2013 03:08, Steven D'Aprano > wrote: >> Your mistake here seems to be that you're assuming that if two numbers >> are equal, they must be in the same domain, but that's not the case. >> (Perhaps you think that 0.0 == 0+0j sh

Re: I am never going to complain about Python again

2013-10-11 Thread Joshua Landau
On 11 October 2013 03:08, Steven D'Aprano wrote: > Your mistake here seems to be that you're assuming that if two numbers > are equal, they must be in the same domain, but that's not the case. > (Perhaps you think that 0.0 == 0+0j should return False?) It's certainly > not the case when it comes t

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Chris Angelico
On Fri, Oct 11, 2013 at 11:13 AM, Dennis Lee Bieber wrote: > On Fri, 11 Oct 2013 01:20:01 +1100, Chris Angelico > declaimed the following: > >> >>This belongs in the Izzet League, I think. >> > Was that an MtG reference? It most assuredly was. The Ravnican guild known as the Izzet League

Re: I am never going to complain about Python again

2013-10-10 Thread Steven D'Aprano
On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote: > >>> 5.0 == abs(3 + 4j) > False Did you maybe accidentally rebind abs? If not, what version of Python are you using? [steve@ando ~]$ for a in 2.4 2.5 2.6 2.7 3.2 3.3 ; do > python$a -c "print( 5.0 == abs(3 + 4j) )" ; > done True True Tr

Re: I am never going to complain about Python again

2013-10-10 Thread Steven D'Aprano
On Thu, 10 Oct 2013 09:09:42 -0400, Roy Smith wrote: > BTW, here's a Python equality oddity: > r = 0.0 c = 0 + 0j r == c > True Mathematically, this is only to be expected. int(r) == int(c) > Traceback (most recent call last): > File "", line 1, in > TypeError: can't con

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Steven D'Aprano
On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote: > On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: >> BTW, one of the earliest things that turned me on to Python was when I >> discovered that it uses j as the imaginary unit, not i. All >> right-thinking people will agree with me on t

Re: I am never going to complain about Python again

2013-10-10 Thread Roy Smith
In article , Neil Cerutti wrote: > >>> 5.0 == abs(3 + 4j) > False I'd like an argument, please. -- https://mail.python.org/mailman/listinfo/python-list

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread David
On 11 October 2013 06:29, Oscar Benjamin wrote: > > I learned to use i for sqrt(-1) while studying theoretical physics. > When I later found myself teaching maths to engineers I asked why j > was used and was given this explanation. I'm still unconvinced by it > though. Please don't be. We need d

Re: I am never going to complain about Python again

2013-10-10 Thread Cameron Simpson
On 10Oct2013 17:48, Neil Cerutti wrote: > On 2013-10-10, MRAB wrote: > > If r is real (float) and c is complex: > > r == c means r == c.real and c.imag == 0.0 > > Woah. I thought I was going by what the docs say: > > Python fully supports mixed arithmetic: when a binary > arithmetic op

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, Oscar Benjamin wrote: > On 10 October 2013 18:48, Neil Cerutti wrote: >> I guess the "if appropriate" part eluded my eye. When *is* it >> appropriate? Apparently not during an equal test. >> > 5.0 == abs(3 + 4j) >> False > > If the above is genuine output then it's most likely

Re: I am never going to complain about Python again

2013-10-10 Thread Oscar Benjamin
On 10 October 2013 18:48, Neil Cerutti wrote: > I guess the "if appropriate" part eluded my eye. When *is* it > appropriate? Apparently not during an equal test. > 5.0 == abs(3 + 4j) > False If the above is genuine output then it's most likely floating point error. I wouldn't expect any erro

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Oscar Benjamin
On 10 October 2013 15:34, David wrote: > On 11 October 2013 00:25, Chris Angelico wrote: >> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: >> >> I've never been well-up on complex numbers; can you elaborate on this, >> please? All I know is that I was taught that the square root of -1 is >>

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Christian Gollwitzer
Am 10.10.13 18:54, schrieb Grant Edwards: On 2013-10-10, Chris Angelico wrote: On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote: Nope. "i" is electical current (though it's more customary to use upper case). "j" is the square root of -1. and that hypercomplex numbers include i, j, k,

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, Ian Kelly wrote: > On Thu, Oct 10, 2013 at 11:48 AM, Neil Cerutti wrote: >> Woah. I thought I was going by what the docs say: >> >> Python fully supports mixed arithmetic: when a binary >> arithmetic operator has operands of different numeric types, >> the operand with the ?n

Re: I am never going to complain about Python again

2013-10-10 Thread Ian Kelly
On Thu, Oct 10, 2013 at 11:48 AM, Neil Cerutti wrote: > On 2013-10-10, MRAB wrote: >> On 10/10/2013 16:57, Rotwang wrote: >>> On 10/10/2013 16:51, Neil Cerutti wrote: [...] Mixed arithmetic always promotes to the wider type (except in the case of complex numbers (Ha!)). >

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Ethan Furman
On 10/10/2013 07:20 AM, Chris Angelico wrote: On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote: Nope. "i" is electical current (though it's more customary to use upper case). "j" is the square root of -1. and that hypercomplex numbers include i, j, k, and maybe even other terms, and I n

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, MRAB wrote: > On 10/10/2013 16:57, Rotwang wrote: >> On 10/10/2013 16:51, Neil Cerutti wrote: >>> [...] >>> >>> Mixed arithmetic always promotes to the wider type (except in >>> the case of complex numbers (Ha!)). >>> >>> r == c is equivalent to r == abs(c), which returns the magint

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Grant Edwards
On 2013-10-10, Chris Angelico wrote: > On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards > wrote: >> Nope. "i" is electical current (though it's more customary to use >> upper case). "j" is the square root of -1. >> >>> and that hypercomplex numbers include i, j, k, and maybe even other >>> terms

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread William Ray Wing
On Oct 10, 2013, at 10:12 AM, Grant Edwards wrote: > On 2013-10-10, Chris Angelico wrote: >> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: >>> BTW, one of the earliest things that turned me on to Python was when I >>> discovered that it uses j as the imaginary unit, not i. All >>> right-t

Re: I am never going to complain about Python again

2013-10-10 Thread MRAB
On 10/10/2013 16:57, Rotwang wrote: On 10/10/2013 16:51, Neil Cerutti wrote: [...] Mixed arithmetic always promotes to the wider type (except in the case of complex numbers (Ha!)). r == c is equivalent to r == abs(c), which returns the magintude of the complex number. What? >>> -1 == -1 +

Re: I am never going to complain about Python again

2013-10-10 Thread Rotwang
On 10/10/2013 16:51, Neil Cerutti wrote: [...] Mixed arithmetic always promotes to the wider type (except in the case of complex numbers (Ha!)). r == c is equivalent to r == abs(c), which returns the magintude of the complex number. What? >>> -1 == -1 + 0j True >>> -1 == abs(-1 + 0j) False >

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
;> => evaluates as true >> >> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array >> >> I swear, I am never going to complain about Python again. > > I've just finished reading JavaScript: The Good Parts, by Douglas > Crockford (now I'm

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread rusi
On Thursday, October 10, 2013 8:04:00 PM UTC+5:30, David wrote: > I have never heard the term "hypercomplex" numbers. I guess you > are referring to vectors with more dimensions than two. A three A generalization of quaternions : http://en.wikipedia.org/wiki/Hypercomplex_number http://en.wikipedia

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread David
On 11 October 2013 00:25, Chris Angelico wrote: > On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: > > I've never been well-up on complex numbers; can you elaborate on this, > please? All I know is that I was taught that the square root of -1 is > called i, and that hypercomplex numbers include

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Chris Angelico
On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote: > Nope. "i" is electical current (though it's more customary to use > upper case). "j" is the square root of -1. > >> and that hypercomplex numbers include i, j, k, and maybe even other >> terms, and I never understood where j comes from. Why

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Grant Edwards
On 2013-10-10, Chris Angelico wrote: > On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: >> BTW, one of the earliest things that turned me on to Python was when I >> discovered that it uses j as the imaginary unit, not i. All >> right-thinking people will agree with me on this. > > I've never b

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Robin Becker
On 10/10/2013 14:25, Chris Angelico wrote: On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: BTW, one of the earliest things that turned me on to Python was when I discovered that it uses j as the imaginary unit, not i. All right-thinking people will agree with me on this. I've never been w

Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Chris Angelico
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote: > BTW, one of the earliest things that turned me on to Python was when I > discovered that it uses j as the imaginary unit, not i. All > right-thinking people will agree with me on this. I've never been well-up on complex numbers; can you elabor

Re: I am never going to complain about Python again

2013-10-10 Thread Roy Smith
/11/all-your-commas-are-belong-to-Array > > I swear, I am never going to complain about Python again. I've just finished reading JavaScript: The Good Parts, by Douglas Crockford (now I'm working on the harder part of re-reading it slowly, to make sure I really understand it). Anyb

Re: I am never going to complain about Python again

2013-10-10 Thread Frank Millman
his little Javascript gem: >>> >>> ",,," == Array((null,'cool',false,NaN,4)); >>> >>> => evaluates as true >>> >>> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array >>> >>> I swear, I am

Re: I am never going to complain about Python again

2013-10-10 Thread Tim Chase
On 2013-10-10 12:10, MRAB wrote: > Re "==", this page: > > http://php.net/manual/en/language.operators.comparison.php > > states: > > """If you compare a number with a string or the *comparison involves > numerical strings*, then each string is converted to a number and > the comparison per

Re: I am never going to complain about Python again

2013-10-10 Thread MRAB
//wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. I am sure you know this, but for the record, Javascript has two equality operators, '==' and '==='. The double form attempts to coerce the left and ri

Re: I am never going to complain about Python again

2013-10-10 Thread Frank Millman
11/02/11/all-your-commas-are-belong-to-Array > > I swear, I am never going to complain about Python again. > I am sure you know this, but for the record, Javascript has two equality operators, '==' and '==='. The double form attempts to coerce the left and right side

Re: I am never going to complain about Python again

2013-10-09 Thread Christian Gollwitzer
Am 10.10.13 06:36, schrieb Steven D'Aprano: Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about

Re: I am never going to complain about Python again

2013-10-09 Thread Cameron Simpson
> > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array > > > > I swear, I am never going to complain about Python again. > > *blank look* > Wow. > > Now, is there a situation in which this problem can actually crop up > in production code? O

Re: I am never going to complain about Python again

2013-10-09 Thread Mark Lawrence
On 10/10/2013 05:36, Steven D'Aprano wrote: Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about

Re: I am never going to complain about Python again

2013-10-09 Thread Chris Rebert
On Wed, Oct 9, 2013 at 9:36 PM, Steven D'Aprano wrote: > Just came across this little Javascript gem: > > ",,," == Array((null,'cool',false,NaN,4)); > > => evaluates as true > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array >

Re: I am never going to complain about Python again

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano wrote: > Just came across this little Javascript gem: > > ",,," == Array((null,'cool',false,NaN,4)); > > => evaluates as true > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array >

I am never going to complain about Python again

2013-10-09 Thread Steven D'Aprano
Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. -- Steven -- https://mail.pyth

RE: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-12 Thread Carlos Nepomuceno
' Server: ApacheBooster/1.6' isn't a signature of httpd. I think you are really running something different. > From: nob...@nowhere.com > Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) > Date: Tue, 4 Jun 2013 14:01:48 +0100 > To: pyth

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-12 Thread Gene Heskett
On Sunday 02 June 2013 13:10:30 Chris Angelico did opine: > On Mon, Jun 3, 2013 at 2:21 AM, حéêüëلïٍ تï‎ٌلٍ wrote: > > Paying for someone to just remove a dash to get the script working is > > too much to ask for > > One dash: 1c > Knowing where to remove it: $99.99 > Total bill: $100.00 > > K

RE: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-12 Thread Carlos Nepomuceno
> To: python-list@python.org > From: breamore...@yahoo.co.uk > Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) > Date: Sun, 2 Jun 2013 15:51:31 +0100 [...] > "Steve is going for the pink ball - and f

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-11 Thread Larry Hudson
On 06/10/2013 01:11 AM, Νικόλαος Κούρας wrote: Τη Δευτέρα, 10 Ιουνίου 2013 10:51:34 π.μ. UTC+3, ο χρήστης Larry Hudson έγραψε: I mean utf-8 could use 1 byte for storing the 1st 256 characters. I meant up to 256, not above 256. 0 - 127, yes. 128 - 255 -> one byte of a multibyte code. you m

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Ned Batchelder
On Monday, June 10, 2013 3:48:08 PM UTC-4, jmfauth wrote: > - > > > > A coding scheme works with three sets. A *unique* set > of CHARACTERS, a *unique* set of CODE POINTS and a *unique* > set of ENCODED CODE POINTS, unicode or not. > > The relation between the set of characters and the set

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread jmfauth
- A coding scheme works with three sets. A *unique* set of CHARACTERS, a *unique* set of CODE POINTS and a *unique* set of ENCODED CODE POINTS, unicode or not. The relation between the set of characters and the set of the code points is a *human* table, created with a sheet of paper and a pe

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Νικόλαος Κούρας
Τη Δευτέρα, 10 Ιουνίου 2013 2:59:03 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > On Mon, 10 Jun 2013 00:10:38 -0700, nagia.retsina wrote: > > > > > Τη Κυριακή, 9 Ιουνίου 2013 3:31:44 μ.μ. UTC+3, ο χρήστης Steven D'Aprano > > > έγραψε: > > > > > >> py> c = 'α' > > >> py> ord(c) > > >> 9

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Steven D'Aprano
On Mon, 10 Jun 2013 00:10:38 -0700, nagia.retsina wrote: > Τη Κυριακή, 9 Ιουνίου 2013 3:31:44 μ.μ. UTC+3, ο χρήστης Steven D'Aprano > έγραψε: > >> py> c = 'α' >> py> ord(c) >> 945 > > The number 945 is the characters 'α' ordinal value in the unicode > charset correct? Correct. > The command i

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
On 10.06.2013 11:59, Νικόλαος Κούρας wrote: s = 'α' s.encode('utf-8') > b'\xce\xb1' 'b' stands for binary right? No, here it stands for bytes: http://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals b'\xce\xb1' = we are looking at a byte in a hexadecim

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Νικόλαος Κούρας
> s = 'α' > s.encode('utf-8') > > b'\xce\xb1' 'b' stands for binary right? b'\xce\xb1' = we are looking at a byte in a hexadecimal format? if yes how could we see it in binary and decimal represenation? > > I see that the encoding of this char takes 2 bytes. But why two exactly

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Νικόλαος Κούρας
Τη Δευτέρα, 10 Ιουνίου 2013 11:15:38 π.μ. UTC+3, ο χρήστης Andreas Perstinger έγραψε: What is the difference between len('nikos') and len(b'nikos') First beeing the length of string nikos in characters while the second being the length of an ??? > The python interpreter will represent all valu

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
On 10.06.2013 09:10, nagia.rets...@gmail.com wrote: Τη Κυριακή, 9 Ιουνίου 2013 3:31:44 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: py> c = 'α' py> ord(c) 945 The number 945 is the characters 'α' ordinal value in the unicode charset correct? Yes, the unicode character set is just a big li

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Νικόλαος Κούρας
Τη Δευτέρα, 10 Ιουνίου 2013 10:51:34 π.μ. UTC+3, ο χρήστης Larry Hudson έγραψε: > > I mean utf-8 could use 1 byte for storing the 1st 256 characters. I meant > > up to 256, not above 256. > 0 - 127, yes. > 128 - 255 -> one byte of a multibyte code. you mean that in utf-8 for 1 character to be s

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Larry Hudson
On 06/09/2013 03:37 AM, Νικόλαος Κούρας wrote: I mean utf-8 could use 1 byte for storing the 1st 256 characters. I meant up to 256, not above 256. NO!! 0 - 127, yes. 128 - 255 -> one byte of a multibyte code. That's why the decode fails, it sees it as incomplete data so it can't do anythi

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread nagia . retsina
Τη Κυριακή, 9 Ιουνίου 2013 3:31:44 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > py> c = 'α' > py> ord(c) > 945 The number 945 is the characters 'α' ordinal value in the unicode charset correct? The command in the python interactive session to show me how many bytes this character will take u

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 2:20 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 9 Ιουνίου 2013 12:12:36 μ.μ. UTC+3, ο χρήστης Cameron Simpson > έγραψε: >> On 09Jun2013 02:00, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= >> wrote: >> >> | Steven wrote: >> >> | >> Since 1 byte can hold up to 256 chars, why not

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Benjamin Kaplan
On Sun, Jun 9, 2013 at 2:38 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 9 Ιουνίου 2013 12:20:58 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: > >> > How about a string i wonder? >> > s = "νίκος" >> > what_are these_bytes = s.encode('iso-8869-7').encode(utf-8') > >> Ignoring the usual syntax error, this i

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread nagia . retsina
Τη Κυριακή, 9 Ιουνίου 2013 3:36:51 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > > printing a greek Unicode string in the error with ASCII > > as the output encoding (default when not a tty IIRC). > An interesting thought. How would we test that? Please elaborare this for me. I ditn undertood

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Steven D'Aprano
On Sun, 09 Jun 2013 02:38:13 -0700, Νικόλαος Κούρας wrote: > s = 'α' > s = s.encode('iso-8859-7').decode('utf-8') > > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 0: > unexpected end of data > > Why this error? because 'a' ordinal value > 127 ? Look at it this way... co

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Steven D'Aprano
On Sun, 09 Jun 2013 19:16:06 +1000, Cameron Simpson wrote: > If he's lucky the UnicodeEncodeError occurred while trying to print an > error message, That's not what happens at the interactive console: py> assert os.path.exists('Ж1') Traceback (most recent call last): File "", line 1, in Ass

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Steven D'Aprano
On Sun, 09 Jun 2013 02:00:46 -0700, Νικόλαος Κούρας wrote: > Steven wrote: >>> Since 1 byte can hold up to 256 chars, why not utf-8 use 1-byte for >>> values up to 256? > >>Because then how do you tell when you need one byte, and when you need >>two? If you read two bytes, and see 0x4C 0xFA, does

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Andreas Perstinger
On 09.06.2013 11:38, Νικόλαος Κούρας wrote: s = 'α' s = s.encode('iso-8859-7').decode('utf-8') print( s ) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 0: unexpected end of data Why this error? because 'a' ordinal value > 127 ? >>> s = 'α' >>> s.encode('iso-8859-7') b'

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Please and tell me that this actually can be solved. Iam willing to try anything for 'files.py' to load propelry. Every thign works as expected in my webiste, have manages to correct pelatologio.poy and koukos.py. This is the last thing the webiste needs, that is files.py to load so users can gr

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Steven D'Aprano
On Sun, 09 Jun 2013 10:55:43 +0200, Lele Gaifax wrote: > Steven D'Aprano writes: > >> On Sat, 08 Jun 2013 22:09:57 -0700, nagia.retsina wrote: >> >>> chr('A') would give me the mapping of this char, the number 65 while >>> ord(65) would output the char 'A' likewise. >> >> Correct. Python uses Un

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
I k nwo i have been a pain in the ass these days but this is the lats explanation i want from you, just to understand it completely. >> Since 1 byte can hold up to 256 chars, why not utf-8 use 1-byte for >> values up to 256? >Because then how do you tell when you need one byte, and when you ne

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 12:14:12 μ.μ. UTC+3, ο χρήστης Νικόλαος Κούρας έγραψε: > Τη Κυριακή, 9 Ιουνίου 2013 11:15:07 π.μ. UTC+3, ο χρήστης Steven D'Aprano > έγραψε: > > > > > Please try this: log into the Linux server, and then start up a Python > > > > > import os, sys > > > print(sy

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 12:20:58 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: > > How about a string i wonder? > > s = "νίκος" > > what_are these_bytes = s.encode('iso-8869-7').encode(utf-8') > Ignoring the usual syntax error, this is just a variant of the code I > posted: "s.encode('iso-8869-

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 12:12:36 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: > On 09Jun2013 02:00, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= > wrote: > > | Steven wrote: > > | >> Since 1 byte can hold up to 256 chars, why not utf-8 use 1-byte for > > | >> values up to 256? > > | > >

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Lele Gaifax
Νικόλαος Κούρας writes: > Τη Κυριακή, 9 Ιουνίου 2013 11:55:43 π.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: >> Uhm, no: "encode" transforms a Unicode string into an array of bytes, >> "decode" does the opposite transformation. You cannot do the former on >> an "arbitrary" array of bytes: >> >> >

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Cameron Simpson
On 09Jun2013 08:15, Steven D'Aprano wrote: | On Sun, 09 Jun 2013 00:00:53 -0700, nagia.retsina wrote: | > path = b'/home/nikos/public_html/data/apps/' | > files = os.listdir( path ) | > | > for filename in files: | > # Compute 'path/to/filename' | > filepath_bytes = path + filename | >

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 11:15:07 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > Please try this: log into the Linux server, and then start up a Python > import os, sys > print(sys.version) > s = ('\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}' > '\N{GREEK SMALL LETTER GAMMA

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Cameron Simpson
On 09Jun2013 02:00, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= wrote: | Steven wrote: | >> Since 1 byte can hold up to 256 chars, why not utf-8 use 1-byte for | >> values up to 256? | | >Because then how do you tell when you need one byte, and when you need | >two? If you read two bytes, and se

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 11:55:43 π.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: > Steven D'Aprano writes: > > > > > On Sat, 08 Jun 2013 22:09:57 -0700, nagia.retsina wrote: > > > > > >> chr('A') would give me the mapping of this char, the number 65 while > > >> ord(65) would output the char 'A

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 9 Ιουνίου 2013 11:02:48 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: > In this scenario, really it is the Terminal program (eg Putty) which > cares about text (what you type, and what gets displayed). It is > because of mismatches between your Terminal local settings and the > encodi

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
Steven wrote: >> Since 1 byte can hold up to 256 chars, why not utf-8 use 1-byte for >> values up to 256? >Because then how do you tell when you need one byte, and when you need >two? If you read two bytes, and see 0x4C 0xFA, does that mean two >characters, with ordinal values 0x4C and 0xFA, o

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Lele Gaifax
Steven D'Aprano writes: > On Sat, 08 Jun 2013 22:09:57 -0700, nagia.retsina wrote: > >> chr('A') would give me the mapping of this char, the number 65 while >> ord(65) would output the char 'A' likewise. > > Correct. Python uses Unicode, where code-point 65 ("ordinal value 65") > means letter "A

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Steven D'Aprano
On Sun, 09 Jun 2013 00:00:53 -0700, nagia.retsina wrote: > path = b'/home/nikos/public_html/data/apps/' > files = os.listdir( path ) > > for filename in files: > # Compute 'path/to/filename' > filepath_bytes = path + filename > for encoding in ('utf-8', 'iso-8859-7', 'latin-1'):

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Νικόλαος Κούρας
I'm sorry posted by mistake unnessary code: here is the correct one that prodiuced the above error: # # Collect directory and its filenames as bytes path = b'/home/nikos/public_html/data/apps/' files = os.listdir( path ) for filename in fi

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Cameron Simpson
On 09Jun2013 06:25, Steven D'Aprano wrote: | [... heaps of useful explaination ...] | > When locale to linux system is set to utf-8 that would mean that the | > linux applications, should try to encode string into hdd by using | > system's default encoding to utf-8 nad read them back from bytes

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread nagia . retsina
Thanks Stevn, i ll read them in a bit. When i read them can you perhaps tell me whats wrong and ima still getting decode issues? [CODE] # = # If user downloaded a file, thank the user

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-08 Thread Steven D'Aprano
On Sat, 08 Jun 2013 22:09:57 -0700, nagia.retsina wrote: > chr('A') would give me the mapping of this char, the number 65 while > ord(65) would output the char 'A' likewise. Correct. Python uses Unicode, where code-point 65 ("ordinal value 65") means letter "A". There are older encodings. For e

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-08 Thread Steven D'Aprano
On Sun, 09 Jun 2013 07:46:40 +0300, Νικόλαος Κούρας wrote: > Why does every character in a character set needs to be associated with > a numeric value? Because computers are digital, not analog, and because bytes are numbers. Here are a few of the 256 possible bytes, written in binary, decimal a

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-08 Thread nagia . retsina
Τη Σάββατο, 8 Ιουνίου 2013 9:47:53 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > Fortunately, Python lets us hide away pretty much all those details, > just as it lets us hide away the details of what makes up a list, a > dictionary, or an integer. You can safely assume that the string "foo" > i

  1   2   3   4   >