I saw something on Python-List that I think is worth getting on this
list as Mark gave a very good reference...
>Mark Lawrence wrote on Python-List:
>>On 25/04/2015 01:51, Terry Reedy wrote:
>>Based on my experience reading newbie posts on python list and
>>Stackoverflow, learning to write real f
On Fri, Apr 24, 2015 at 6:43 PM, Jim Mooney wrote:
> It looks like sig works for any dash, underline combination, and is ignored
> if there is no BOM:
See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation.
https://docs.python.org/3/library/codecs.html
On Fri, Apr 24, 2015 at 3:00 PM, Laura Creighton wrote:
> In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes:
> You need the testing-in-python mailing list. Come on over ...
> http://lists.idyll.org/listinfo/testing-in-python
> You will find lots of familiar faces (email addresses
On 25/04/2015 00:03, Jim Mooney wrote:
You can save yourself some time and use a raw string:
print(r""" """)
Timo
Good point. I'll go to site-packages and change that. I import Bob to
cheer myself up as I look at Unicode, which is like forcing a kid to go to
Sunday school on a bright Su
On Fri, Apr 24, 2015 at 04:34:19PM -0700, Jim Mooney wrote:
> I was looking things up and although there are aliases for utf_8 (utf8 and
> utf-8) I see no aliases for utf_8_sig, so I'm surprised the utf-8-sig I
> tried using, worked at all. Actually, I was trying to find the file where
> the alias
On 04/24/2015 07:34 PM, Jim Mooney wrote:
Apparently so. It looks like utf_8-sig just ignores the sig if it is
present, and uses UTF-8 whether the signature is present or not.
That surprises me.
--
Steve
I was looking things up and although there are aliases for utf_8 (utf8 and
Actually,. I found the aliases in Lib/encodings/aliases.py and added an
alias:
>>> deco = bytes("I sure hate apples.", encoding='ubom')
>>> deco
b'\xef\xbb\xbfI sure hate apples.'
>>>
Tricky, though - if you don't put a comma at the end of your alias, it
breaks Python (or my Pyscripter editor, an
It looks like sig works for any dash, underline combination, and is ignored
if there is no BOM:
>>> farf = bytes('many moons ago I sat on a rock', encoding='utf8')
>>> farf
b'many moons ago I sat on a rock'
>>> str(farf, encoding="utf_8_sig")
'many moons ago I sat on a rock'
>>> str(farf, encoding
>
> Apparently so. It looks like utf_8-sig just ignores the sig if it is
> present, and uses UTF-8 whether the signature is present or not.
>
> That surprises me.
>
> --
> Steve
>
>
I was looking things up and although there are aliases for utf_8 (utf8 and
utf-8) I see no aliases for
On 24/04/15 23:52, boB Stepp wrote:
There is just lil ol' me. I will have to research SCCS.
SCCS is great for a single, small team. It's marginally more complex
than more modern tools and it only works sensibly with text files
(binaries are just uuencoded which is pretty pointless!).
Basic
You can save yourself some time and use a raw string:
> print(r""" """)
>
> Timo
>
> Good point. I'll go to site-packages and change that. I import Bob to
cheer myself up as I look at Unicode, which is like forcing a kid to go to
Sunday school on a bright Summer day, instead of playing with P
So many questions... let's hope I don't miss any... :-)
On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote:
> First question: What testing modules/frameworks should I start out
> with? Doing a quick scan of the books I have, mention is made of
> doctest and unittest modules in the Python s
On Fri, Apr 24, 2015 at 5:03 PM, Alan Gauld wrote:
> On 24/04/15 20:09, boB Stepp wrote:
>>
>> allowed to install anything else, strange as this may sound! Since the
>> only functional editors in these bare-bones Solaris 10 environments
>> are some simplistic default editor that I do not know the
In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes:
>First question: What testing modules/frameworks should I start out
>with? Doing a quick scan of the books I have, mention is made of
>doctest and unittest modules in the Python standard libraries. But
>mention is also made of two
On 24/04/15 20:09, boB Stepp wrote:
I have just started reading "Test-Driven Development by Example" by
Kent Beck during my lunch breaks at work.
The TDD bit is another whole topic that I'll probably jump into later.
For now...
allowed to install anything else, strange as this may sound! Sinc
I have just started reading "Test-Driven Development by Example" by
Kent Beck during my lunch breaks at work. This book was a suggestion
by Danny Yoo in another thread. So far it has been good reading. My
current programming work flow is to add a little bit of code, run a
*manual* test(s), inspect
In a message of Fri, 24 Apr 2015 12:46:20 +1000, "Steven D'Aprano" writes:
>The Japanese, Chinese and Korean
>governments, as well as linguists, are all in agreement that despite a
>few minor differences, the three languages share a common character set.
I don't think that is quite the way to sa
On Fri, Apr 24, 2015 at 8:41 AM, Steven D'Aprano wrote:
> On Sun, Apr 19, 2015 at 10:34:43PM -0500, boB Stepp wrote:
>
>> Scenario B:
>> 1) I start out inside the CSA.
>> 2) I initiate a script in the CSA's scripting language.
>> 3) This script calls an external Python script in a new thread.
>>
Coming in late to this conversation...
On Sun, Apr 19, 2015 at 10:34:43PM -0500, boB Stepp wrote:
> Scenario B:
> 1) I start out inside the CSA.
> 2) I initiate a script in the CSA's scripting language.
> 3) This script calls an external Python script in a new thread.
> 4) This Python script ge
On 24/04/15 09:54, Alan Gauld wrote:
numbers or other symbols so there were two sets of meanings to
each pattern and a shift pattern to switch between them (which is
why we have SHIFT keys on modern keyboards).
Sorry, I'm conflating two sets of issues here.
The SHIFT key pre-dated teleprinters
Op 24-04-15 om 04:37 schreef Jim Mooney:
I was depressed at the thought of learning unicode, then discovered Python
was fun again since I can easily print any ascii art from
http://www.chris.com/ascii/ with a multiline print, so long as I replace
any backslash with two of them.
You can save you
The quoting seems to be all mangled here, so please excuse me if I
misattribute quotes to the wrong person:
On Thu, Apr 23, 2015 at 04:15:39PM -0700, Jim Mooney wrote:
> So is there any way to sniff the encoding, including the BOM (which appears
> to be used or not used randomly for utf-8), so y
On 24/04/15 03:46, Steven D'Aprano wrote:
Early text encodings all worked in a single byte
which is limited to 256 patterns.
Oh it's much more complicated than that!
Note I said *in* a single byte, ie they were all 8 bits or less.
*seven bits*, not even a full byte. It was seven bits so th
I was depressed at the thought of learning unicode, then discovered Python
was fun again since I can easily print any ascii art from
http://www.chris.com/ascii/ with a multiline print, so long as I replace
any backslash with two of them. Spongebob Squarepants was, of course, the
obvious first choi
So is there any way to sniff the encoding, including the BOM (which appears
to be used or not used randomly for utf-8), so you can then use the proper
encoding, or do you wander in the wilderness?
Pretty much guesswork.
>
Alan Gauld
--
This all sounds suspiciously like the old browser wars I suf
25 matches
Mail list logo