Re: How to look up historical time zones by date and location

2014-08-18 Thread luofeiyu
My dear friends here, all i want is get ` LMT+8:06:00` from the output of tz1 `` Shall we get back to the main point? If you are interested in it ,please say yes or no ,and how to do that ? import pytz,datetime tz1 = pytz.timezone('Asia/Shanghai') tz1 >>> str(tz1) 'Asia/Shanghai' -- ht

Re: How to look up historical time zones by date and location

2014-08-18 Thread luofeiyu
My dear friends here, all i want is get ` |LMT+8:06:00` from the output of tz1 `||`| Shall we get back to the main point? If you are interested in it ,please say yes or no ,and how to do that ? -- https://mail.python.org/mailman/listinfo/python-list

Re: 'is not' or '!='

2014-08-18 Thread Rustom Mody
On Tuesday, August 19, 2014 2:05:01 AM UTC+5:30, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > Without any context, which one should be preferred? > IMHO, the latter is more readable. Here is Terry Reed

Re: Free Video Course + cool exercises

2014-08-18 Thread Everything You Need To Know
On Monday, 18 August 2014 23:13:59 UTC+9:30, Chris Angelico wrote: > On Mon, Aug 18, 2014 at 11:30 PM, Everything You Need To Know > > wrote: > > > You are correct in suggesting that the current course is Windows Specific, > > though as far as I currently understand it only effects conditional

Re: python scikits.audiolab Sndfile special chars in file name

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 1:34 AM, Furqan wasi wrote: > except: > print('Simple didnt work') > pass Drop all of these bare excepts. Let the exceptions get printed. Believe you me, they are a LOT more helpful than "didnt work". ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Ben Finney wrote: > Grant Edwards writes: > >> I agree with the comments that the appellation for "simply the next >> version after 3.9" should be 3.10 and not 4.0. Everybody I know >> considers SW versions numbers to be dot-separated tuples, not floating >> point numbers. > > This consensus is

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Tim Delaney
On 19 August 2014 00:51, Grant Edwards wrote: > On 2014-08-17, Mark Lawrence wrote: > > A blog from Nick Coghlan > > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that > > should help put a few minds to rest. > > I agree with the comments that the appellation for "simply the ne

Re: Adapt bash readline operate-and-get-next

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 10:17 AM, Steven D'Aprano wrote: > I would love to see support for this in Python. Unfortunately, I'm not > qualified to review your code. Can you create a feature request for it on > the bug tracker, mark me (steven.daprano) as interested, and upload your > diff? If the pa

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 10:05 AM, Steven D'Aprano wrote: > I consider versions to be *strings*. They include non-numeric components > such as "a", "b", "rc", so they aren't numbers. They're certainly not > floating point numbers, since they have a variable number of decimal > points. Although ther

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Grant Edwards wrote: > On 2014-08-18, Ethan Furman wrote: >> On 08/18/2014 07:51 AM, Grant Edwards wrote: >>> >>> To all of us out here in user-land a change in the first value in the >>> version tuple means breakage and incompatibilities. And when the >>> second value is "0", you avoid it until

Re: Adapt bash readline operate-and-get-next

2014-08-18 Thread Steven D'Aprano
Lele Gaifax wrote: > This is just a first attempt to adapt the Bash code to the Python > readline.c module: I'm very surprised that the half-an-hour I spent on > it, mostly to locate related code, actually full filled the goal :-) You're my hero!!! [...] > Even if I know this is not the right fo

Re: Matplotlib Contour Plots

2014-08-18 Thread Steven D'Aprano
Jamie Mitchell wrote: > I forgot to mention that when I try: > > a=np.array([[hs_con_sw],[te_con_sw]]) > > I get a 3D shape for some reason - (2,1,150) which is not what I'm after. No need to wrap the arrays hs_con_sw and te_con_sw in [] lists, since they're already arrays. a = np.array([hs_co

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Grant Edwards wrote: > On 2014-08-17, Mark Lawrence wrote: >> A blog from Nick Coghlan >> http://www.curiousefficiency.org/posts/2014/08/python-4000.html that >> should help put a few minds to rest. > > I agree with the comments that the appellation for "simply the next > version after 3.9" shou

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 3:00 AM, ElChino wrote: > Or lets make the version asymptotically grow towards 4. > Any sensible function for that? Easy! We just keep on adding parts. 3.7, 3.8, 3.9, 3.9.9, 3.9.9.9, 3.9.9.9.9, 3.9.9.9.9.9... ChrisA -- https://mail.python.org/mailman/listinfo/python-lis

Python 2.7 IDLE Win32 interactive, pasted characters i- wrong encoding

2014-08-18 Thread Chris Angelico
Python 3 works fine, at least for BMP characters: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> u"U+20AC is € is 0x80 in CP-1252" 'U+20AC is € is 0x80 in CP-1252' >>> ascii(_) "'U+

Re: Coding challenge: Optimise a custom string encoding

2014-08-18 Thread Peter Otten
Alex Willmer wrote: > On Monday, 18 August 2014 21:16:26 UTC+1, Terry Reedy wrote: >> On 8/18/2014 3:16 PM, Alex Willmer wrote: >> > A challenge, just for fun. Can you speed up this function? >> >> You should give a specification here, with examples. You should perhaps > > Sorry, the (informal)

Re: Coding challenge: Optimise a custom string encoding

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 5:16 AM, Alex Willmer wrote: > Back story: > Last week we needed a custom encoding to store unicode usernames in a config > file that only allowed mixed case ascii, digits, underscore, dash, at-sign > and plus sign. We also wanted to keeping the encoded usernames somewhat

Re: 'is not' or '!='

2014-08-18 Thread Chris Kaynor
On Mon, Aug 18, 2014 at 2:42 PM, Ethan Furman wrote: > If you are not dealing with singletons (which is most cases), such as > numbers, strings, lists, and most other arbitrary objects, you will need to > use "!=" or anytime the two objects you are comparing are not the exact > same object, you c

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ben Finney
Grant Edwards writes: > I agree with the comments that the appellation for "simply the next > version after 3.9" should be 3.10 and not 4.0. Everybody I know > considers SW versions numbers to be dot-separated tuples, not floating > point numbers. This consensus is sometimes termed “semantic ver

Re: 'is not' or '!='

2014-08-18 Thread Ethan Furman
On 08/18/2014 03:04 PM, Chris Kaynor wrote: On Mon, Aug 18, 2014 at 2:42 PM, Ethan Furman wrote: If you are not dealing with singletons (which is most cases), such as numbers, strings, lists, and most other arbitrary objects, you will need to use "!=" or anytime the two objects you are compar

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Emile van Sebille
On 8/18/2014 2:09 PM, Grant Edwards wrote: On 2014-08-18, Ethan Furman wrote: On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it u

Re: efficient partial sort in Python ?

2014-08-18 Thread Dan Stromberg
On Mon, Aug 18, 2014 at 10:18 AM, Chiu Hsiang Hsu wrote: > I know that Python use Timsort as default sorting algorithm and it is > efficient, > but I just wanna have a partial sorting (n-largest/smallest elements). Perhaps heapq with Pypy? Or with nuitka? Or with numba? -- https://mail.python

Re: 'is not' or '!='

2014-08-18 Thread Ethan Furman
On 08/18/2014 01:58 PM, ElChino wrote: "Marko Rauhamaa" wrote: In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want to know if x is the one and only None object. You don't want to be fooled by an imposter o

Re: Coding challenge: Optimise a custom string encoding

2014-08-18 Thread Alex Willmer
On Monday, 18 August 2014 21:16:26 UTC+1, Terry Reedy wrote: > On 8/18/2014 3:16 PM, Alex Willmer wrote: > > A challenge, just for fun. Can you speed up this function? > > You should give a specification here, with examples. You should perhaps Sorry, the (informal) spec was further down. > > a

Re: How to look up historical time zones by date and location

2014-08-18 Thread Grant Edwards
On 2014-08-18, Ian Kelly wrote: > By working with dates far enough in the past that the modern time zone > rules don't apply. Some experimentation determines that the timedelta > between Shanghai and Urumqi goes from 136 minutes to 120 minutes in > 1928, and then from 120 minutes to 0 minutes in

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Grant Edwards
On 2014-08-18, Ethan Furman wrote: > On 08/18/2014 07:51 AM, Grant Edwards wrote: >> >> To all of us out here in user-land a change in the first value in the >> version tuple means breakage and incompatibilities. And when the >> second value is "0", you avoid it until some other sucker has found >

Re: 'is not' or '!='

2014-08-18 Thread ElChino
"Marko Rauhamaa" wrote: In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want to know if x is the one and only None object. You don't want to be fooled by an imposter object that simply looks like the None ob

Re: 'is not' or '!='

2014-08-18 Thread Marko Rauhamaa
"ElChino" : > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in th

Re: 'is not' or '!='

2014-08-18 Thread MRAB
On 2014-08-18 21:35, ElChino wrote: A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. "x == y" tells you whether x and y refer to objects that

'is not' or '!='

2014-08-18 Thread ElChino
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to look up historical time zones by date and location

2014-08-18 Thread pecore
Joel Goldstick writes: > Local Mean Time is time based on the actually astronomical position > of the sun. It is defined as 12 noon when the sun is at its high > point, directly south in the sky. This is the time you get when you > read a sundial! a sundial measures the Apparent Time, where th

Re: Coding challenge: Optimise a custom string encoding

2014-08-18 Thread Terry Reedy
On 8/18/2014 3:16 PM, Alex Willmer wrote: A challenge, just for fun. Can you speed up this function? You should give a specification here, with examples. You should perhaps be using .maketrans and .translate. import string charset = set(string.ascii_letters + string.digits + '@_-') byteseq

Re: PyMatch Tool.

2014-08-18 Thread Rafael Francischini
Cristian you are right, never experienced visual regexp, is incredible. I created pyMatch to help me in the automation scripts and text formatting, so I decided to work from the command line. You're right, you can also do this with sed, but sed has a small defect "in my view", you will be able

Re: How to look up historical time zones by date and location

2014-08-18 Thread pecore
Ian Kelly writes: > Some experimentation determines that the timedelta between Shanghai > and Urumqi Urumqi is on the way for the level of popularity that Piraeus enjoyed in the good ol'days -- per crimini come l'umanita'. MMAX, in IPI+IHC --

Coding challenge: Optimise a custom string encoding

2014-08-18 Thread Alex Willmer
A challenge, just for fun. Can you speed up this function? import string charset = set(string.ascii_letters + string.digits + '@_-') byteseq = [chr(i) for i in xrange(256)] bytemap = {byte: byte if byte in charset else '+' + byte.encode('hex') for byte in byteseq} def plus_encode(s):

Re: Adapt bash readline operate-and-get-next

2014-08-18 Thread Skip Montanaro
On Mon, Aug 18, 2014 at 1:49 PM, Lele Gaifax wrote: > Even if I know this is not the right forum and I should (and I > eventually do, assuming a positive feedback) instead open a ticket and > attach the patch there, I'd like to hear opinions on whether this should > be enabled by default, and poss

Re: How to look up historical time zones by date and location

2014-08-18 Thread Chris “Kwpolska” Warrick
On 18 August 2014 20:03 "Ian Kelly" wrote: > I also don't know why pytz shows the LMT offset in the repr for those > timezones instead of the current UTC offset. If pytz objects do not have a datetime object attached, they default to the first ever entry, which is usually LMT. This can be problem

Adapt bash readline operate-and-get-next

2014-08-18 Thread Lele Gaifax
Steven D'Aprano writes: > On Mon, 21 Jul 2014 17:57:22 +0200, Lele Gaifax wrote: >> Granted, the readline library exposes a "operate-and-get-next" function, >> by default bound to \C-o... > > Have you actually got that working in Python with the readline module? > I've tried and tried and cannot

Re: efficient partial sort in Python ?

2014-08-18 Thread Ian Kelly
On Mon, Aug 18, 2014 at 11:18 AM, Chiu Hsiang Hsu wrote: > I know that Python use Timsort as default sorting algorithm and it is > efficient, > but I just wanna have a partial sorting (n-largest/smallest elements). > > In the current state, I can only find this kind of functions from heapq, > but

Re: How to look up historical time zones by date and location

2014-08-18 Thread Ian Kelly
On Mon, Aug 18, 2014 at 11:53 AM, Ian Kelly wrote: > On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote: >> >> I found that it is a concept LMT local mean time can express my meaning. >> >> import pytz,datetime >> tz1 = pytz.timezone('Asia/Shanghai') >> tz1 >> >> >>> str(tz1) >> 'Asia/Shanghai' >>

Re: How to look up historical time zones by date and location

2014-08-18 Thread Ian Kelly
On Mon, Aug 18, 2014 at 7:12 AM, luofeiyu wrote: > > I found that it is a concept LMT local mean time can express my meaning. > > import pytz,datetime > tz1 = pytz.timezone('Asia/Shanghai') > tz1 > > >>> str(tz1) > 'Asia/Shanghai' > > tz2 = pytz.timezone('Asia/Urumqi') > tz2 > > > the time diffe

Re: Matplotlib Contour Plots

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 18:51, schrieb Jamie Mitchell: On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote: So I have two 1D arrays: 1st array - ([8, 8.8,8.5,7.9,8.6 ...], dtype=float32) It has a shape (150,) 2nd array - ([2, 2.2, 2.5, 2.3, ...],dtype=float32) It has a shape (150,) What I

Re: PyMatch Tool.

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 14:21, schrieb Rafael Francischini: Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer escreveu: I expected something like visual regexp: http://laurent.riesterer.free.fr/regexp/ Since RegExp-Syntax is very similar across tools, yours is almost

Re: Set static attributes...maybe.

2014-08-18 Thread Beppe
Il giorno lunedì 18 agosto 2014 19:13:08 UTC+2, Chris Kaynor ha scritto: > On Mon, Aug 18, 2014 at 10:00 AM, Beppe wrote: > > > hi to everybody, > > in the following scrip I try to call the function read_parameters () but > returns me that wants two arguments!?!?! > > My intent is to have in

efficient partial sort in Python ?

2014-08-18 Thread Chiu Hsiang Hsu
I know that Python use Timsort as default sorting algorithm and it is efficient, but I just wanna have a partial sorting (n-largest/smallest elements). In the current state, I can only find this kind of functions from heapq, but it's too slow for this problem, the pure c sorted function can easily

Re: Matplotlib Contour Plots

2014-08-18 Thread Rustom Mody
On Monday, August 18, 2014 10:25:15 PM UTC+5:30, Jamie Mitchell wrote: > I forgot to mention that when I try: > a=np.array([[hs_con_sw],[te_con_sw]]) > I get a 3D shape for some reason - (2,1,150) which is not what I'm after. I guess you want a=np.array([hs_con_sw,te_con_sw]) ?? -- https://ma

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ethan Furman
On 08/18/2014 10:00 AM, ElChino wrote: "Grant Edwards" wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor

Re: python scikits.audiolab Sndfile special chars in file name

2014-08-18 Thread MRAB
On 2014-08-18 16:34, Furqan wasi wrote: Hi , Could you help me out on this , or guide me to some how can thanks I am trying to get a wav file information but Sndfile is unable to read file with special characters in path and file name(查找問題daw.wav) and i am unable to get information in any way ,

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ethan Furman
On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor releases have come

Re: Set static attributes...maybe.

2014-08-18 Thread Chris Kaynor
On Mon, Aug 18, 2014 at 10:00 AM, Beppe wrote: > hi to everybody, > in the following scrip I try to call the function read_parameters () but > returns me that wants two arguments!?!?! > My intent is to have in the class, Engine (), some static attributes that > can be used by other instances wit

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread ElChino
"Grant Edwards" wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor releases have come out. "Three shall

Set static attributes...maybe.

2014-08-18 Thread Beppe
hi to everybody, in the following scrip I try to call the function read_parameters () but returns me that wants two arguments!?!?! My intent is to have in the class, Engine (), some static attributes that can be used by other instances without to redefine this every time. These matters could be

Re: Matplotlib Contour Plots

2014-08-18 Thread Jamie Mitchell
I forgot to mention that when I try: a=np.array([[hs_con_sw],[te_con_sw]]) I get a 3D shape for some reason - (2,1,150) which is not what I'm after. Thanks, Jamie -- https://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib Contour Plots

2014-08-18 Thread Jamie Mitchell
On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote: > Jamie Mitchell wrote: > > > > > I created the 2D array which read as: > > > > That's not a 2D array. > > > > When the amount of data you have is too big to clearly see what it > > happening, replace it with something sm

Re: Module-level functions and the module type

2014-08-18 Thread Chris Kaynor
On Sun, Aug 17, 2014 at 8:15 AM, Chris Angelico wrote: > In a class definition, you have explicit state parameters on your > functions - 'self': > > class C: > def foo(self, arg): > # blah blah > > At module level, there's equivalent state - the function "knows" what > module it came

python scikits.audiolab Sndfile special chars in file name

2014-08-18 Thread Furqan wasi
Hi , Could you help me out on this , or guide me to some how can thanks I am trying to get a wav file information but Sndfile is unable to read file with special characters in path and file name(查找問題daw.wav) and i am unable to get information in any way , i tried passing file path to Sndfile wit

Re: How to look up historical time zones by date and location

2014-08-18 Thread Rustom Mody
On Monday, August 18, 2014 7:21:53 PM UTC+5:30, Joel Goldstick wrote: > On Mon, Aug 18, 2014 at 9:12 AM, luofeiyu wrote: > > I found that it is a concept LMT local mean time can express my meaning. > Local Mean Time is time based on the actually astronomical position of > the sun. It is defined

Re: GIL detector

2014-08-18 Thread Grant Edwards
On 2014-08-17, Stefan Behnel wrote: > Steven D'Aprano schrieb am 17.08.2014 um 16:21: >> I wonder whether Ruby programmers are as obsessive about >> Ruby's GIL? > > I actually wonder more whether Python programmers are really all that > obsessive about CPython's GIL. [...] > Personally, I like t

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 12:51 AM, Grant Edwards wrote: > I agree with the comments that the appellation for "simply the next > version after 3.9" should be 3.10 and not 4.0. Everybody I know > considers SW versions numbers to be dot-separated tuples, not > floating point numbers. > Agreed. Howev

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Grant Edwards
On 2014-08-17, Mark Lawrence wrote: > A blog from Nick Coghlan > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that > should help put a few minds to rest. I agree with the comments that the appellation for "simply the next version after 3.9" should be 3.10 and not 4.0. Everyb

Re: How to look up historical time zones by date and location

2014-08-18 Thread Denis McMahon
On Mon, 18 Aug 2014 12:55:59 +0800, luofeiyu wrote: > http://www.thefreedictionary.com/time+zone > > time zone Any of the 24 divisions of the Earth's surface used to > determine the local time for any given locality. > Each zone is roughly 15° of longitude in width, with local variations > for ec

Re: redirect stderr to syslog?

2014-08-18 Thread Grant Edwards
On 2014-08-16, Terry Reedy wrote: > On 8/15/2014 11:04 PM, Russell E. Owen wrote: >> We are using the syslog module for logging, and would like to redirect >> stderr to our log. Is there a practical way to do it? > > You can replace sys.stderr with any object with a .write(s) method. Just a remen

Re: How to look up historical time zones by date and location

2014-08-18 Thread Joel Goldstick
On Mon, Aug 18, 2014 at 9:12 AM, luofeiyu wrote: > I found that it is a concept LMT local mean time can express my meaning. Local Mean Time is time based on the actually astronomical position of the sun. It is defined as 12 noon when the sun is at its high point, directly south in the sky. This

Re: Free Video Course + cool exercises

2014-08-18 Thread Chris Angelico
On Mon, Aug 18, 2014 at 11:30 PM, Everything You Need To Know wrote: > You are correct in suggesting that the current course is Windows Specific, > though as far as I currently understand it only effects conditional imports > such as time.clock() into time.time(). Which is a great warning to add

Re: Free Video Course + cool exercises

2014-08-18 Thread Everything You Need To Know
On Monday, 18 August 2014 22:23:43 UTC+9:30, Chris Angelico wrote: > On Mon, Aug 18, 2014 at 10:44 PM, Everything You Need To Know > > wrote: > > >> [ > > >> I sincerely hope you're not teaching people to install Python 3.0! But > > >> > > >> what _is_ the minimum expected version for this c

Re: How to look up historical time zones by date and location

2014-08-18 Thread luofeiyu
|I found that it is a concept LMT local mean time can express my meaning. import pytz,datetime tz1 = pytz.timezone('Asia/Shanghai') tz1 str(tz1) 'Asia/Shanghai' | ||tz2 = pytz.timezone('Asia/Urumqi')| tz2 the time difference between shanghai and Urumqi is about 2 hours in the form of LMT.

Re: Free Video Course + cool exercises

2014-08-18 Thread Chris Angelico
On Mon, Aug 18, 2014 at 10:44 PM, Everything You Need To Know wrote: >> [ >> I sincerely hope you're not teaching people to install Python 3.0! But >> >> what _is_ the minimum expected version for this course? And what >> >> platforms do you support? > > Sorry, I have tried to refer to version of

Re: Free Video Course + cool exercises

2014-08-18 Thread Everything You Need To Know
> [ > I sincerely hope you're not teaching people to install Python 3.0! But > > what _is_ the minimum expected version for this course? And what > > platforms do you support? Sorry, I have tried to refer to version of #3.0+ meaning most current version, though I wanted to make it clear we are

Re: PyMatch Tool.

2014-08-18 Thread Rafael Francischini
Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer escreveu: > Am 14.08.14 21:50, schrieb rafinha.u...@gmail.com: > > > Hello, I created this tool to help me develop on formatting text using > > regular expressions. > > > Any questions, I am available. > > > Thank yo

Re: error with files

2014-08-18 Thread Rock Neurotiko
You are trying to write the open file (file1) in the file type. I think that you wanted to write in file1, the data: file1.write(file_data) # instead of file.write(file1) 2014-08-18 11:41 GMT+02:00 ngangsia akumbo : > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter fil

Re: Matplotlib Contour Plots

2014-08-18 Thread Anssi Saari
Jamie Mitchell writes: > I created the 2D array which read as: Maybe you could try numpy.reshape() on your 1D array? -- https://mail.python.org/mailman/listinfo/python-list

Re: error with files

2014-08-18 Thread ngangsia akumbo
Thanks guys -- https://mail.python.org/mailman/listinfo/python-list

Re: error with files

2014-08-18 Thread Peter Otten
ngangsia akumbo wrote: > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter file name: g > write in data: g > Traceback (most recent call last): > File "testfile1", line 11, in > file.write(file1) > TypeError: function takes exactly 1 argument (0 given) > > > > impo

Re: error with files

2014-08-18 Thread Paul Wiseman
The line should be: file1.write(file_data) you could write file.write(file1, file_data) but that would be an odd way to do it :) On 18 August 2014 10:41, ngangsia akumbo wrote: > error > > yems ~ # nano testfile1 > yems ~ # python testfile1 > Enter file name: g > write in data: g > Tracebac

error with files

2014-08-18 Thread ngangsia akumbo
error yems ~ # nano testfile1 yems ~ # python testfile1 Enter file name: g write in data: g Traceback (most recent call last): File "testfile1", line 11, in file.write(file1) TypeError: function takes exactly 1 argument (0 given) import os.path save_here = '/home/yems/newfile/' file_n

Re: How can I get the timezone time of a location?

2014-08-18 Thread Chris “Kwpolska” Warrick
On 18 August 2014 04:28 "luofeiyu" wrote: > > The land area of China is 60-degree longitude from west to east. According to the demarcation of the world time zoning standard, > the land area of China lies between the eastern fifth to ninth time zones, there are 5 time zones in china in fact. > Cur

Re: Free Video Course + cool exercises

2014-08-18 Thread Chris Angelico
On Mon, Aug 18, 2014 at 5:31 PM, Everything You Need To Know wrote: > Python 0.0 - Downloading and installing > Running Time: 1:47 > > Eyn2k about downloading and installing Python 3.0 + to get started scripting > in Python. You may want to use another Python Text

Free Video Course + cool exercises

2014-08-18 Thread Everything You Need To Know
VIDEO PYTHON COURSE - 33 Videos and growing rapidly. Emphasis is on trying to make programming free and fun! Grow your own fun programs like the Mandelbrot set and John Conways Game of Life. See here for link to Channel: https://www.youtube.com/channel/UCad91ea17ynqc0cTokBG3bg This is a complete

Re: User class binary ops seem too slow (was re: GIL detector)

2014-08-18 Thread Steven D'Aprano
On Mon, 18 Aug 2014 00:43:58 -0400, Terry Reedy wrote: > >>> timeit.repeat('1+1') > [0.04067762117549266, 0.019206152658126363, 0.018796680446902643] I think you have been tripped up by the keyhole optimizer. I'm not entirely certain, but that's probably just measuring the overhead of evaluati