Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 5:57 PM, Ben Finney wrote: > Chris Angelico writes: > >> What exactly does datetime offer you that a timestamp doesn't? Can we >> get a quick run-down, please? > > Isn't this answered by you reading the standard library documentation > for the ‘datetime’ and ‘time’ modules?

Re: python finance

2014-01-08 Thread d ss
On Monday, January 6, 2014 6:58:30 PM UTC-5, Walter Hurry wrote: > On Mon, 06 Jan 2014 13:11:53 -0800, d ss wrote: > > > > i wrote just 2 words with a clear > > > indicative title: "Python, Finance" which summarizes the following "if > > > you are good in python and interested in applying you

Re: Time zones and why they change so damned often

2014-01-08 Thread Mark Lawrence
On 09/01/2014 04:14, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney wrote: I'm approaching it with the goal of knowing better what I'm talking about when I advocate scrapping the whole DST system :-) I would definitely support the scrapping of DST. I'm less sure that we need

Re: the Gravity of Python 2

2014-01-08 Thread Mark Lawrence
On 09/01/2014 03:42, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney wrote: [ a bunch of stuff that I totally agree with ] No response needed here :) So I was wrong on the specific example of .today(), but asking the question the other way is at least helpful. Maybe the best

Re: Constructive Criticism

2014-01-08 Thread Mark Lawrence
On 09/01/2014 06:16, jeremiah valerio wrote: On Thursday, January 9, 2014 12:09:17 AM UTC-6, Ben Finney wrote: jeremiahvalerio...@gmail.com writes: Hi, hows it going I've been self teaching myself python Welcome to Python, and to this discussion forum! and i typed up this small scrip

Re: the Gravity of Python 2

2014-01-08 Thread Ben Finney
Chris Angelico writes: > What exactly does datetime offer you that a timestamp doesn't? Can we > get a quick run-down, please? Isn't this answered by you reading the standard library documentation for the ‘datetime’ and ‘time’ modules? Are you asking for someone to read those for you? If not, ca

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 4:31 PM, Ethan Furman wrote: > On 01/08/2014 08:34 PM, Chris Angelico wrote: >> >> This is simple: >> > time.time() >> >> 1389242048.669482 > > > I agree, and I'm sure Roy also agrees, that that is simple. However, that > is *not* a timezone-aware datetime. The point o

Re: Constructive Criticism

2014-01-08 Thread jeremiah valerio
On Thursday, January 9, 2014 12:09:17 AM UTC-6, Ben Finney wrote: > jeremiahvalerio...@gmail.com writes: > > > > > Hi, hows it going I've been self teaching myself python > > > > Welcome to Python, and to this discussion forum! > > > > > and i typed up this small script now i know its not

Re: Constructive Criticism

2014-01-08 Thread Paul Pittlerson
I think the only winning move is not to play. -- https://mail.python.org/mailman/listinfo/python-list

Re: Constructive Criticism

2014-01-08 Thread Ben Finney
jeremiahvalerio...@gmail.com writes: > Hi, hows it going I've been self teaching myself python Welcome to Python, and to this discussion forum! > and i typed up this small script now i know its not the best the > coding is not the best but i would like to know of ways to make a > small script li

Constructive Criticism

2014-01-08 Thread jeremiahvalerio123
Hi, hows it going I've been self teaching myself python, and i typed up this small script now i know its not the best the coding is not the best but i would like to know of ways to make a small script like this better so all constructive critisim is Welcome. Here is the link to the code "

Re: the Gravity of Python 2

2014-01-08 Thread Ethan Furman
On 01/08/2014 08:34 PM, Chris Angelico wrote: On Thu, Jan 9, 2014 at 3:29 PM, Roy Smith wrote: So, I'd like to see your code which generates an aware UTC datetime object in Python. And then we can argue about whether it's simple or not :-) Like I said, I don't use the datetime module. But fu

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 3:29 PM, Roy Smith wrote: > So, I'd like to see your code which generates an aware UTC datetime > object in Python. And then we can argue about whether it's simple or > not :-) In fact, I'll go further. Why do you need a datetime object at all? What is it that you need? Ar

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 3:29 PM, Roy Smith wrote: > So, I'd like to see your code which generates an aware UTC datetime > object in Python. And then we can argue about whether it's simple or > not :-) Like I said, I don't use the datetime module. But fundamentally, an aware datetime represents an

Re: the Gravity of Python 2

2014-01-08 Thread Roy Smith
In article , Chris Angelico wrote: > On Thu, Jan 9, 2014 at 2:35 PM, Roy Smith wrote: > >> Yes, it *is* simple. It *is* easy. I've been working with pure-UTC > >> times (either called time_t, or TIMESTAMP WITH TIME ZONE, or even just > >> float) for decades. Like with so many other things, the

Re: Learning python networking

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:49 PM, Dan Stromberg wrote: > The third quote, from Brian Kernighan, seems to underestimate the > complexity of asynchronous programming in the large - it's probably > not just twice as hard. Yeah, which is why I recommended a threaded approach to the OP. It won't scale t

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney wrote: > I'm approaching it with the goal of knowing better what I'm talking > about when I advocate scrapping the whole DST system :-) I would definitely support the scrapping of DST. I'm less sure that we need exactly 24 timezones around the world, tho

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:35 PM, Roy Smith wrote: >> Yes, it *is* simple. It *is* easy. I've been working with pure-UTC >> times (either called time_t, or TIMESTAMP WITH TIME ZONE, or even just >> float) for decades. Like with so many other things, the easiest >> solution is also the best, because

Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-08 Thread Ben Finney
Chris Angelico writes: > On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney wrote: > > With time zones, as with text encodings, there is a single > > technically elegant solution (for text: Unicode; for time zones: > > twelve simple, static zones that never change) > > Twelve or twenty-four? Twenty-fou

Re: Learning python networking

2014-01-08 Thread Dan Stromberg
On Wed, Jan 8, 2014 at 4:07 PM, Chris Angelico wrote: > Maybe it's not the best way to do things, but it can be extremely > simple in the code. For small projects, the added complexity doesn't bite you. At least, not much. For large projects, with thousands or millions of callbacks, it can be v

Re: the Gravity of Python 2

2014-01-08 Thread Roy Smith
In article , Ben Finney wrote: > Chris Angelico writes: > > > On Thu, Jan 9, 2014 at 1:25 PM, Roy Smith wrote: > > > Because it's easy to get a naive one. You call datetime.utcnow(). If > > > utcnow() returned an aware datetime, that's probably what we would > > > be using. Why didn't utcnow(

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney wrote: > [ a bunch of stuff that I totally agree with ] No response needed here :) So I was wrong on the specific example of .today(), but asking the question the other way is at least helpful. Maybe the best solution is exactly what Roy already posted,

Re: the Gravity of Python 2

2014-01-08 Thread Roy Smith
In article , Chris Angelico wrote: > On Thu, Jan 9, 2014 at 1:25 PM, Roy Smith wrote: > > Because it's easy to get a naive one. You call datetime.utcnow(). If > > utcnow() returned an aware datetime, that's probably what we would be > > using. Why didn't utcnow() just return an aware datetim

Re: the Gravity of Python 2

2014-01-08 Thread Ben Finney
Chris Angelico writes: > On Thu, Jan 9, 2014 at 1:25 PM, Roy Smith wrote: > > Because it's easy to get a naive one. You call datetime.utcnow(). If > > utcnow() returned an aware datetime, that's probably what we would > > be using. Why didn't utcnow() just return an aware datetime to begin > > w

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 1:25 PM, Roy Smith wrote: > Because it's easy to get a naive one. You call datetime.utcnow(). If > utcnow() returned an aware datetime, that's probably what we would be > using. Why didn't utcnow() just return an aware datetime to begin with? > > Conversely, it's a pain i

Re: the Gravity of Python 2

2014-01-08 Thread Roy Smith
In article , Chris Angelico wrote: > Why not simply use a UTC datetime instead of a naive one? [Pet peeve of mine: uses of "simple" or "just" to imply that something is easy, when it's not. "Why not just get the Arabs and the Jews to be friends?" "Why not simply find a safe way to store nuc

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 12:52 PM, Ethan Furman wrote: > as soon as you try to mix different timezone datetimes that are naive, you > have a mess (temporal-bake, anyone?). Doctor Who gets into cookies? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-08 Thread Ethan Furman
On 01/08/2014 05:27 PM, Roy Smith wrote: In article , Kevin Walzer wrote: I haven't updated my Python apps to 3.x because there's nothing in 3.x that offers benefits to my users. I almost found a reason to move to Python 3 today. Then I got smacked. [snip] Naive datetimes are what eve

Re: Editor for Python

2014-01-08 Thread Terry Reedy
On 1/8/2014 7:19 PM, Emile van Sebille wrote: On 1/8/2014 3:46 PM, Terry Reedy wrote: On 1/8/2014 3:56 PM, Emile van Sebille wrote: On 1/8/2014 12:47 PM, Terry Reedy wrote: For a Python editor, as opposed to a general code editor, the Idle editor works pretty well and has some advantages with

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 12:27 PM, Roy Smith wrote: > Anyway, I discovered that Python 3.3's datetime has a .timestamp() > method. Yeah. Finally. Exactly what the world had needed for years. > Then I kept reading and found: > > Note: There is no method to obtain the POSIX timestamp directly from

deja vu anybody

2014-01-08 Thread Mark Lawrence
I've been browsing for the fun on it and came across "[Python-Dev] SF:1463370 add .format() method to str and unicode" here https://mail.python.org/pipermail/python-dev/2006-April/063329.html I've vague recollections of seeing something along these lines fairly recently, a PEP I think, can som

Re: the Gravity of Python 2

2014-01-08 Thread Roy Smith
In article , Kevin Walzer wrote: > I haven't updated my Python apps to 3.x because there's nothing in 3.x > that offers benefits to my users. I almost found a reason to move to Python 3 today. Then I got smacked. I had a datetime. I needed a unix timestamp. People need to go back and fort

Re: Learning python networking

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 10:53 AM, Dan Stromberg wrote: >> Using Python 3.4 (which isn't yet >> stable, but you can download betas) also gives you an asyncio module, >> but I'd leave that aside for the moment; first figure out threading, >> it's likely to be easier. > > Personally, I don't like asyn

Re: Editor for Python

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 11:19 AM, Emile van Sebille wrote: > As I recall it had something to do with both idle and the application > running in the same namespace? So the leakage was from within idle > affecting the running of the script under development? > > Admittedly, it was a while back. But

Re: Dictionary

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 11:13 AM, Dennis Lee Bieber wrote: > #generate search re expression representing > # .* any character/multiple -- leading > # [l|e|t|t|e|r] match any of the letters supplied > # .* any character/mu

Re: Understanding decorator and class methods

2014-01-08 Thread Terry Reedy
On 1/8/2014 2:56 PM, axis.of.wea...@gmail.com wrote: can someone please explain why the following works, in contrast to the second example? Because function attributes of classes become instance methods, with special behavior, when accessed via an instance of the class. def decorator(func)

Re: Editor for Python

2014-01-08 Thread Emile van Sebille
On 1/8/2014 3:46 PM, Terry Reedy wrote: On 1/8/2014 3:56 PM, Emile van Sebille wrote: On 1/8/2014 12:47 PM, Terry Reedy wrote: For a Python editor, as opposed to a general code editor, the Idle editor works pretty well and has some advantages with respect to integration with the interpreter.

Re: Recover handle to shadowed builtin?

2014-01-08 Thread Dave Angel
On Wed, 8 Jan 2014 14:52:10 -0500, Roy Smith wrote: I'm working with ipython's pylab mode, which replaces the builtin sum() with the one from numpy: In [105]: sum Out[105]: Is there any way to recover a reference to the builtin sum()? goodsum=__builtins__.sum -- DaveA -- https://ma

Re: python copy selected lines from one file to another using argparse or getopt

2014-01-08 Thread Dave Angel
On Wed, 8 Jan 2014 13:51:40 -0800 (PST), sagarnild...@gmail.com wrote: I am trying to write a program in python which searches for user specified words in a txt file and copies the selected lines containing that word into another file. John Gordon has given you a good start on argument parsing

Re: "More About Unicode in Python 2 and 3"

2014-01-08 Thread Mark Lawrence
On 08/01/2014 23:34, rdst...@mac.com wrote: I'm so sorry for the mess in my post above, I apologize to all, I accidentally hit return ... I just meant to say that internet programming using ASCII urls is so common and important that it hurts that Python 3 makes it so much harder. It sure would

Re: Learning python networking

2014-01-08 Thread Dan Stromberg
Nice response Chris. Seriously. On Wed, Jan 8, 2014 at 3:29 PM, Chris Angelico wrote: > One extremely critical point about your protocol. TCP is a stream - > you don't have message boundaries. You can't depend on one send() > becoming one recv() at the other end. It might happen to work when you

Re: "More About Unicode in Python 2 and 3"

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 10:34 AM, wrote: > I just meant to say that internet programming using ASCII urls is so common > and important that it hurts that Python 3 makes it so much harder. It sure > would be great if Python 3 could be improved to allow such programming to be > done using ASCII u

Re: Editor for Python

2014-01-08 Thread Terry Reedy
On 1/8/2014 3:56 PM, Emile van Sebille wrote: On 1/8/2014 12:47 PM, Terry Reedy wrote: For a Python editor, as opposed to a general code editor, the Idle editor works pretty well and has some advantages with respect to integration with the interpreter. While true, ISTM in the past there have

Re: the Gravity of Python 2

2014-01-08 Thread Kevin Walzer
On 1/8/14, 9:30 AM, Mark Lawrence wrote: But to be serious why not stick with 2.x if there's no compelling reason to move? Whatever happened to "if it ain't broke, don't fix it"? And before anyone says anything please don't start on about the bytes versus string debate, I'm fairly certain that

Re: "More About Unicode in Python 2 and 3"

2014-01-08 Thread rdsteph
I'm so sorry for the mess in my post above, I apologize to all, I accidentally hit return ... I just meant to say that internet programming using ASCII urls is so common and important that it hurts that Python 3 makes it so much harder. It sure would be great if Python 3 could be improved to al

Re: Learning python networking

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 9:27 AM, Paul Pittlerson wrote: > I'm trying to learn about socket, how to create and handle connections in > python. Awesome! I *love* socket networking. (Really. It's awesome. I've written a couple of MUD servers and quite a few MUD clients.) > This is the best I could

Re: "More About Unicode in Python 2 and 3"

2014-01-08 Thread rdsteph
Chris A wrote: I'm not sure that there is an "easy way". See, here's the deal. If all your data is ASCII, you can shut your eyes to the difference between bytes and text and Python 2 will work perfectly for you. Then some day you'll get a non-ASCII character come up (or maybe you'll get all of

Re: argparse action on default values

2014-01-08 Thread Terry Reedy
On 1/8/2014 1:20 PM, Florian Lindner wrote: I use argparse from Python 3.3.3 with a custom action that normalizes path arguments: This works fine when there is actually a --config=path supplied. But it's not being applied on default arguments. This behavior is how I interpret the doc. http:

Re: Understanding decorator and class methods

2014-01-08 Thread Rotwang
On 08/01/2014 19:56, axis.of.wea...@gmail.com wrote: can someone please explain why the following works, in contrast to the second example? def decorator(func): def on_call(*args): print args return func(args) return on_call class Foo: @decorator def bar(s

Re: Editor for Python

2014-01-08 Thread 88888 Dihedral
On Friday, November 23, 2001 6:43:40 AM UTC+8, MANUEL FERNANDEZ PEREZ wrote: > Hello, > I'm looking for an editor for Python.I' m interested it works on Windows.Can > anybody help me? > > Thank you > > Manuel OK, try the notepad++ at notepad-plus-plus.org/ or use IDLE with the pycrust. -- ht

Re: python copy selected lines from one file to another using argparse or getopt

2014-01-08 Thread Mark Lawrence
On 08/01/2014 21:51, sagarnild...@gmail.com wrote: I am trying to write a program in python which searches for user specified words in a txt file and copies the selected lines containing that word into another file. Also the user will have an option to exclude any word. (e.g Suppose the user

Re: python copy selected lines from one file to another using argparse or getopt

2014-01-08 Thread John Gordon
In sagarnild...@gmail.com writes: > But I don't know how to: > Include multiple search word and exclude words > How to denote them by -e and -s. I have seen the argparse and the getopt > tutorial. But there's no tutorial on this specific topic. This should help you get started: import arg

Learning python networking

2014-01-08 Thread Paul Pittlerson
I'm trying to learn about socket, how to create and handle connections in python. This is the best I could come up with on my own, please take a look and give me critique: Server script: http://pastebin.com/KtapYfM0 Client script: http://pastebin.com/t4dYygmX How to run it: I open 3 terminals,

Re: Recover handle to shadowed builtin?

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 7:15 AM, Roy Smith wrote: > BUT, not only does pylab overwrite sum(), it overwrites __builtins__ > as well! Instead of a module, it's now a dict. You can still get at > the builtin sum, but you need to do __builtins__["sum"] That probably means that it _only_ overrides th

Re: the Gravity of Python 2

2014-01-08 Thread Steven D'Aprano
Martijn Faassen wrote: > Hey, > > I'm pointing out possible improvements that Python 2.8 could offer that > would help incremental porting efforts of applications. I'm pointing > about that helping application developers move forward incrementally may > be a worthwhile consideration. Like, there'

python copy selected lines from one file to another using argparse or getopt

2014-01-08 Thread sagarnildass
I am trying to write a program in python which searches for user specified words in a txt file and copies the selected lines containing that word into another file. Also the user will have an option to exclude any word. (e.g Suppose the user searches for the word "exception" and want to exclude

Re: Editor for Python

2014-01-08 Thread Ricardo Aráoz
I use Spyder both in Windows as in Linux. Pretty good programing environment, lots of features, simple enough, works on both platforms and it's free. El 08/01/14 08:27, ayushpokha...@gmail.com escribió: On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ wrote: Hello, I'm

Re: Editor for Python

2014-01-08 Thread Mark Lawrence
On 08/01/2014 20:47, Terry Reedy wrote: On 1/8/2014 6:27 AM, ayushpokha...@gmail.com wrote: On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ wrote: I do not seem to have the original You mean to say you don't keep 12 year old emails? :) -- My fellow Pythonistas, ask no

Re: Editor for Python

2014-01-08 Thread Emile van Sebille
On 1/8/2014 12:47 PM, Terry Reedy wrote: For a Python editor, as opposed to a general code editor, the Idle editor works pretty well and has some advantages with respect to integration with the interpreter. While true, ISTM in the past there have been 'leakage' related issues with idle -- are

Re: Editor for Python

2014-01-08 Thread Terry Reedy
On 1/8/2014 6:27 AM, ayushpokha...@gmail.com wrote: On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ wrote: I do not seem to have the original I'm looking for an editor for Python. I' m interested it works on Windows. For a Python editor, as opposed to a general code e

Re: the Gravity of Python 2

2014-01-08 Thread Terry Reedy
On 1/8/2014 9:15 AM, Roy Smith wrote: As somebody who is still firmly in the 2.x world, I'm worried about the idea of a 2.x fork. While I have my doubts that 3.x was a good idea, the fact is, it's here. Having the community fractured between the two camps is not good. Let's say I'm somebody wh

Re: Recover handle to shadowed builtin?

2014-01-08 Thread Peter Otten
Roy Smith wrote: > I'm working with ipython's pylab mode, which replaces the builtin sum() > with the one from numpy: > > In [105]: > sum > > Out[105]: > > > Is there any way to recover a reference to the builtin sum()? >>> from numpy import * >>> sum >>> del sum >>> sum Doing it more than

Re: Editor for Python

2014-01-08 Thread Mark Lawrence
On 08/01/2014 19:50, David Robinow wrote: On Jan 8, 2014, at 10:53 AM, Jean-Michel Pichavant wrote: -- IMPORTANT NOTICE: too late you have sent this to a public forum No pb with that, the python list is the intended recipient :) I tried to negotiate this with my IT guys, but it looks l

Re: Recover handle to shadowed builtin?

2014-01-08 Thread Roy Smith
In article , Roy Smith wrote: >I'm working with ipython's pylab mode, which replaces the builtin sum() = >with the one from numpy: >[...] >Is there any way to recover a reference to the builtin sum()? Sigh. I figured this out myself. What you want is __builtins__.sum ... BUT, not only does py

Re: Recover handle to shadowed builtin?

2014-01-08 Thread Mark Lawrence
On 08/01/2014 19:52, Roy Smith wrote: I'm working with ipython's pylab mode, which replaces the builtin sum() with the one from numpy: In [105]: sum Out[105]: Is there any way to recover a reference to the builtin sum()? --- Roy Smith r...@panix.com Grab it from here I suppose. >>> hel

Re: Blog "about python 3"

2014-01-08 Thread Mark Lawrence
On 07/01/2014 13:34, wxjmfa...@gmail.com wrote: Le dimanche 5 janvier 2014 23:14:07 UTC+1, Terry Reedy a écrit : Ned : this has already been explained and illustrated. jmf This has never been explained and illustrated. Roughly 30 minutes ago Terry Reedy once again completely shot your argu

Understanding decorator and class methods

2014-01-08 Thread axis . of . weasel
can someone please explain why the following works, in contrast to the second example? def decorator(func): def on_call(*args): print args return func(args) return on_call class Foo: @decorator def bar(self, param1): print 'inside bar' f=Foo() f.bar(4)

Recover handle to shadowed builtin?

2014-01-08 Thread Roy Smith
I'm working with ipython's pylab mode, which replaces the builtin sum() with the one from numpy: In [105]: sum Out[105]: Is there any way to recover a reference to the builtin sum()? --- Roy Smith r...@panix.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Editor for Python

2014-01-08 Thread David Robinow
On Jan 8, 2014, at 10:53 AM, Jean-Michel Pichavant wrote: >>> -- IMPORTANT NOTICE: >>> >> >> too late you have sent this to a public forum > > No pb with that, the python list is the intended recipient :) > > I tried to negotiate this with my IT guys, but it looks like it's now > mandatory

Re: Blog "about python 3"

2014-01-08 Thread Terry Reedy
On 1/8/2014 4:59 AM, wxjmfa...@gmail.com wrote: [responding to me] The FSR acts more as an coding scheme selector That is what PEP 393 describes and what I and many others have said. The FSR saves memory by selecting from three choices the most compact coding scheme for each string. I ask a

Re: Dictionary

2014-01-08 Thread Bischoop
Walter Hurry wrote: > On Mon, 30 Dec 2013 18:38:20 +, Bischoop wrote: > >> I have a txt file with some words, and need simply program that will >> print me words containing provided letters. >> >> For example: >> Type the letters: >> (I type: g,m,o) >> open the dictionary.txt >> check words

Re: Dictionary

2014-01-08 Thread Bischoop
Dennis Lee Bieber wrote: > On Mon, 30 Dec 2013 18:38:20 +, Bischoop > declaimed the following: > >>I have a txt file with some words, and need simply program that will >>print me words containing provided letters. >> >>For example: >>Type the letters: >> (I type: g,m,o) >>open the dictionary

Re: argparse action on default values

2014-01-08 Thread Peter Otten
Florian Lindner wrote: > I use argparse from Python 3.3.3 with a custom action that normalizes path arguments: > > http://docs.python.org/3/library/argparse.html#action > > def norm_path(*parts): > """ Returns the normalized, absolute, expanded and joined path, assembled of all parts. """

Re: Looking for tips for moving dev environment from Windows to Mac

2014-01-08 Thread William Ray Wing
On Jan 8, 2014, at 12:26 PM, Bob Hartwig wrote: > "4. Best visual diff utility for Mac?" > > opendiff. I think it's part of xcode. > > Regarding Python IDEs, I really like PyCharm. It's written in Java, and > sometimes you can tell that by its performance, but it's very featureful and > has

Looking for Django/Python programmer in Jakarta

2014-01-08 Thread carlos
For working in a startup environment. Immediate incorporation. Please send your CV to tal...@zocko.com -- https://mail.python.org/mailman/listinfo/python-list

argparse action on default values

2014-01-08 Thread Florian Lindner
Hello, I use argparse from Python 3.3.3 with a custom action that normalizes path arguments: http://docs.python.org/3/library/argparse.html#action def norm_path(*parts): """ Returns the normalized, absolute, expanded and joined path, assembled of all parts. """ parts = [ str(p) for p i

Re: Trouble with UnicodeEncodeError and email

2014-01-08 Thread Florian Lindner
Am Donnerstag, 9. Januar 2014, 00:26:15 schrieb Chris Angelico: > On Thu, Jan 9, 2014 at 12:14 AM, Florian Lindner wrote: > > I've written some tiny script using Python 3 and it used to work perfectly. > > Then I realized it needs to run on my Debian Stable server too, which > > offers only Pyth

Re: Looking for tips for moving dev environment from Windows to Mac

2014-01-08 Thread Bob Hartwig
"4. Best visual diff utility for Mac?" opendiff. I think it's part of xcode. Regarding Python IDEs, I really like PyCharm. It's written in Java, and sometimes you can tell that by its performance, but it's very featureful and has a great debugger, and your 16 GB box should support it nicely.

Re: Bytes indexing returns an int

2014-01-08 Thread Michael Torrie
On 01/08/2014 09:08 AM, wxjmfa...@gmail.com wrote: > Byte strings (encoded code points) or native unicode is one > thing. Byte strings are not necessarily "encoded code points." Most byte streams I work with are definitely not unicode! They are in fact things such as BER-encoded ASN.1 data struct

Re: Bytes indexing returns an int

2014-01-08 Thread Ned Batchelder
On 1/8/14 11:08 AM, wxjmfa...@gmail.com wrote: Byte strings (encoded code points) or native unicode is one thing. But on the other side, the problem is elsewhere. These very talented ascii narrow minded, unicode illiterate devs only succeded to produce this (I, really, do not wish to be rude).

Re: Looking for tips for moving dev environment from Windows to Mac

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:45 AM, William Ray Wing wrote: > Two external disks. One dedicated to TimeMachine for continuous backups of > code as you write it, and one dedicated to either CarbonCopy Cloner or > SuperDuper. Whichever you choose, set it up to do once-a-week clones at say > 2:00 AM

Re: Editor for Python

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 3:40 AM, Joel Goldstick wrote: > What is wrong with this world that some over paid lawyer requires a useless, > silly statement to justify his employment. The money that person is being > paid should be given to someone else. Good luck. Guess who would be suing you for wro

Re: Editor for Python

2014-01-08 Thread Chris “Kwpolska” Warrick
On Wed, Jan 8, 2014 at 4:53 PM, Jean-Michel Pichavant wrote: > I tried to negotiate this with my IT guys, but it looks like it's now > mandatory, something related to being in the USA stock market. > I have no way to remove it, it's added by the email server. I apologise for > the noise. But yo

Re: Looking for tips for moving dev environment from Windows to Mac

2014-01-08 Thread William Ray Wing
On Jan 8, 2014, at 9:11 AM, pyt...@bdurham.com wrote: > Long time Windows developer making the move to Apple platform. My new > development environment is a 15" MacBook Pro with 16 Gb RAM and a 512 Gb SSD. > I'm totally new to the world of Apple hardware and software and am looking > for advice

Re: Suggest an open-source log analyser?

2014-01-08 Thread Alec Taylor
So yeah, if you know of a good one; please share. Thanks On Sun, Jan 5, 2014 at 2:50 PM, Alec Taylor wrote: > Because I'm thinking that something with a much less expressive query > interface would serve me better in the long run... e.g.: Redis or > maybe Hadoop > > On Sat, Jan 4, 2014 at 5:35 P

Re: Editor for Python

2014-01-08 Thread Jean-Michel Pichavant
> > -- IMPORTANT NOTICE: > > > > The contents of this email and any attachments are confidential and > > may > > also be privileged. If you are not the intended recipient, please > > notify > > the sender immediately and do not disclose the contents to any > > other > > person, use it for any purp

Re: Editor for Python

2014-01-08 Thread Joel Goldstick
On Wed, Jan 8, 2014 at 10:53 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > > > -- IMPORTANT NOTICE: > > > > > > The contents of this email and any attachments are confidential and > > > may > > > also be privileged. If you are not the intended recipient, please > > > notify > > > th

Re: Bytes indexing returns an int

2014-01-08 Thread wxjmfauth
Le mercredi 8 janvier 2014 12:05:49 UTC+1, Robin Becker a écrit : > On 07/01/2014 19:48, Serhiy Storchaka wrote: > > > > > data[0] == b'\xE1'[0] works as expected in both Python 2.7 and 3.x. > > > > > > > > I have been porting a lot of python 2 only code to a python2.7 + 3.3 version

Re: the Gravity of Python 2

2014-01-08 Thread Mark Lawrence
On 08/01/2014 15:39, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:22 AM, Martijn Faassen wrote: I'm pointing out possible improvements that Python 2.8 could offer that would help incremental porting efforts of applications. I'm pointing about that helping application developers move forward i

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:22 AM, Martijn Faassen wrote: > I'm pointing out possible improvements that Python 2.8 could offer that > would help incremental porting efforts of applications. I'm pointing about > that helping application developers move forward incrementally may be a > worthwhile consi

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 2:06 AM, Grant Edwards wrote: > On 2014-01-08, Chris Angelico wrote: > >> Two reasons for moving: >> >> 1) Support for newer hardware > > How does Python 3.x support newer hardware than Python 2.7? At the moment, I would say there's no difference between those two versions

Re: the Gravity of Python 2

2014-01-08 Thread Martijn Faassen
Hey, On 01/08/2014 03:30 PM, Mark Lawrence wrote: But to be serious why not stick with 2.x if there's no compelling reason to move? Whatever happened to "if it ain't broke, don't fix it"? That's fine for static applications that don't have to change. Successful applications tend to grow new

Re: the Gravity of Python 2

2014-01-08 Thread Martijn Faassen
Hey, I'm pointing out possible improvements that Python 2.8 could offer that would help incremental porting efforts of applications. I'm pointing about that helping application developers move forward incrementally may be a worthwhile consideration. Like, there's money there. You can point o

Re: Editor for Python

2014-01-08 Thread Alister
On Wed, 08 Jan 2014 16:13:09 +0100, Jean-Michel Pichavant wrote: > - Original Message - > >> I've been pleased with Komodo, and certainly prefer it over Notepad++. > >> Komodo: >> http://www.activestate.com/komodo-ide?gclid=COHE4eLj7rsCFQISMwodOUQAiw > > Komodo is an IDE and costs 385$.

Re: Editor for Python

2014-01-08 Thread Jean-Michel Pichavant
- Original Message - > I've been pleased with Komodo, and certainly prefer it over > Notepad++. > Komodo: > http://www.activestate.com/komodo-ide?gclid=COHE4eLj7rsCFQISMwodOUQAiw Komodo is an IDE and costs 385$. I certainly expect it to better than notepad++. JM -- IMPORTANT NOTICE:

Re: the Gravity of Python 2

2014-01-08 Thread Grant Edwards
On 2014-01-08, Chris Angelico wrote: > Two reasons for moving: > > 1) Support for newer hardware How does Python 3.x support newer hardware than Python 2.7? -- Grant Edwards grant.b.edwardsYow! Psychoanalysis?? at I thought

Re: the Gravity of Python 2

2014-01-08 Thread Martijn Faassen
On 01/08/2014 01:46 PM, Chris Angelico wrote: On Wed, Jan 8, 2014 at 11:36 PM, Martijn Faassen wrote: Well, in the original article I argue that it may be risky for the Python community to leave the large 2.7 projects behind because they tend to be the ones that pay us in the end. I also argue

Re: the Gravity of Python 2

2014-01-08 Thread Chris Angelico
On Thu, Jan 9, 2014 at 1:30 AM, Mark Lawrence wrote: > But to be serious why not stick with 2.x if there's no compelling reason to > move? Whatever happened to "if it ain't broke, don't fix it"? And before > anyone says anything please don't start on about the bytes versus string > debate, I'm f

Re: the Gravity of Python 2

2014-01-08 Thread Pedro Larroy
I think for new projects one should go with 3.x this is the right thing to do. If you require a module that's 2.x only it's easy enough to port it unless it depends on some monster like protobuf which doesn't have python3.x support Pedro. On Wed, Jan 8, 2014 at 3:30 PM, Mark Lawrence wrote: >

Re: Editor for Python

2014-01-08 Thread Douglas Duhaime
I've been pleased with Komodo, and certainly prefer it over Notepad++. Komodo: http://www.activestate.com/komodo-ide?gclid=COHE4eLj7rsCFQISMwodOUQAiw On Wed, Jan 8, 2014 at 7:23 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > - Original Message - > > On Friday, 23 November

  1   2   >