On 11/10/12 02:23, boB Stepp wrote:
bytes have string methods as a convenience, such as find, split, and
partition. They also have the method decode(), which uses a specified
encoding such as utf-8 to create a string from an encoded bytes
sequence.
What is the intended use of byte types?
On 03/10/2012 04:15, boB Stepp wrote:
After much diddling around I have finally settled on a text to study
(Programming in Python 3, 2nd edition, by Mark Summerfield) and have
defaulted to using IDLE, deferring worrying about editors/IDEs until I
feel comfortable in Python.
I've been using
On Wed, Oct 10, 2012 at 9:23 PM, boB Stepp robertvst...@gmail.com wrote:
aꘌꘌb = True
aꘌꘌb
True
Ⅰ, Ⅱ, Ⅲ, Ⅳ, Ⅴ = range(1, 6)
Ⅰ, Ⅱ, Ⅲ, Ⅳ, Ⅴ
(1, 2, 3, 4, 5)
Is doing this considered good programming practice?
The examples were meant to highlight the absurdity of
On 10/11/2012 04:40 AM, eryksun wrote:
On Wed, Oct 10, 2012 at 9:23 PM, boB Stepp robertvst...@gmail.com wrote:
.
What is the intended use of byte types?
bytes objects are important for low-level data processing, such as
file and socket I/O. The fundamental addressable value in a computer
On Thu, Oct 11, 2012 at 5:04 AM, Dave Angel d...@davea.name wrote:
Actually, the upper limit for a decoded utf-8 character is at least 6
bytes. I think it's 6, but it's no less than 6.
Yes, but what would be the point? Unicode only has 17 planes, up to
code 0x10. It's limited by UTF-16.
On 10/11/2012 05:21 AM, eryksun wrote:
On Thu, Oct 11, 2012 at 5:04 AM, Dave Angel d...@davea.name wrote:
Actually, the upper limit for a decoded utf-8 character is at least 6
bytes. I think it's 6, but it's no less than 6.
Yes, but what would be the point? Unicode only has 17 planes, up
Hi all,
Greetings to you...
it been so helpful for me to go through your all mails support i wish
it still continues.
I have two text files.
text1 contains
This is from Text1 --- 1st line
This is from Text1 --- 2nd line
This is from Text1 --- 3rd line
This is from Text1 --- 4th line
This is
On 10/11/2012 07:13 AM, Sunil Tech wrote:
Hi all,
Greetings to you...
it been so helpful for me to go through your all mails support i wish
it still continues.
I have two text files.
text1 contains
This is from Text1 --- 1st line
This is from Text1 --- 2nd line
This is from Text1
i used zip(), but it gives me result in list of tuples format.
But i don't get in a exact expect format (as mentioned)
no loopings are allowed.
On Thu, Oct 11, 2012 at 5:30 PM, Dave Angel d...@davea.name wrote:
On 10/11/2012 07:13 AM, Sunil Tech wrote:
Hi all,
Greetings to you...
it
On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech sunil.tech...@gmail.com wrote:
text1 contains
This is from Text1 --- 1st line
text2 contains
This is from Text2 --- 1st line
i want result in text3 like
This is from Text1 --- 1st line
This is from Text2 --- 1st line
but
On Thu, Oct 11, 2012 at 8:30 AM, eryksun eryk...@gmail.com wrote:
On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech sunil.tech...@gmail.com wrote:
text1 contains
This is from Text1 --- 1st line
text2 contains
This is from Text2 --- 1st line
i want result in text3 like
This is from
Thanks all for your immediate responses :)
On Thu, Oct 11, 2012 at 6:20 PM, Joel Goldstick joel.goldst...@gmail.comwrote:
On Thu, Oct 11, 2012 at 8:30 AM, eryksun eryk...@gmail.com wrote:
On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech sunil.tech...@gmail.com
wrote:
text1 contains
This is
On 11/10/12 08:56, Mark Lawrence wrote:
an awesome difference to my productivity. Quite why I was happy to slag
off Eclipse maybe six months ago I don't know. Does a good sized
portion of humble pie make amends?
Eclipse is a heavyweight tool designed for heavyweight problems. For the
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == __main__:
A_Class(*sys.argv[1:4]).A_Class_Method()
is sys able to call methods? if so why does it need indexing if it uses * .
Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == __main__:
A_Class(*sys.argv[1:4]).A_Class_Method()
is sys able to call methods? if so why does it need indexing if it uses * .
Sys is a
On 10/11/2012 03:24 PM, Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == __main__:
A_Class(*sys.argv[1:4]).A_Class_Method()
sys isn't being indexed. sys is a module (presumably you have an
On 11/10/2012 20:24, Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
sys isn't doing anything and the weird indexing is called slicing.
if __name__ == __main__:
A_Class(*sys.argv[1:4]).A_Class_Method()
Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == __main__:
A_Class(*sys.argv[1:4]).A_Class_Method()
sys is doing nothing -- argv in sys holds the command line arguments
passed into python.
Obviously a Monty Python fan as I see 3 methods :)
lol i dont know what i was looking at.. yes its 3 methods sorry:(
def __init__(self):
self.zipping_directory = unzipped-{}.format(filename)
Where did filename appear from above?
sorry i didnt write everything. the init method
On 10/11/2012 04:48 PM, Matthew Ngaha wrote:
Obviously a Monty Python fan as I see 3 methods :)
lol i dont know what i was looking at.. yes its 3 methods sorry:(
def __init__(self):
self.zipping_directory = unzipped-{}.format(filename)
Where did filename appear from above?
sorry
Matthew Ngaha wrote:
[snip]
@ DAVE.. you said
sys is a module (presumably you have an import
somewhere above this line). In the module, there's a list argv.
the import statements are:
import sys
import os
import shutil
import zipfile
so im guessing [sys, os, shutil, zipfile] these
Here is a example in Python v2.7.2 document:
import locale
loc = locale.getlocale() # get current locale
# use German locale; name might vary with platform
locale.setlocale(locale.LC_ALL, 'de_DE')
However, the result of executing on my computer is:
locale.setlocale(locale.LC_ALL, 'de_DE')
On Thu, Oct 11, 2012 at 11:12 PM, Dae James daeda...@126.com wrote:
import locale
loc = locale.getlocale() # get current locale
# use German locale; name might vary with platform
locale.setlocale(locale.LC_ALL, 'de_DE')
This depends on the C runtime. For Windows, see MSDN:
setlocale
On Fri, Oct 12, 2012 at 12:37 AM, eryksun eryk...@gmail.com wrote:
For example (untested):
locale.setlocale(locale.LC_ALL, 'German_Germany.1252')
I got around to testing the above, and it works. Also, the Python docs
say if [locale is] an iterable, it’s converted to a locale name using
24 matches
Mail list logo