is pathlib Path.resolve working as intended?

2014-12-23 Thread Chris Cioffi
Ok, I'm guessing I'm doing something wrong, but I can't see what. I'm playing around with pathlib (Python 3.4.2) on Mac OSX, Yosemite. In the past I've used os.path.expanduser() to expand paths with ~. Based on the description, I would have expected .resolve to do that automatically, but it do

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-23 Thread Steven D'Aprano
Grant Edwards wrote: > On 2014-12-23, Steven D'Aprano > wrote: >> Chris Angelico wrote: >> >>> On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote: If I really didn't trust something, I'd go to AWS and spin up one of their free-tier micro instances and run it there :-) >>> >>> How do yo

Re: very weird pandas behavior

2014-12-23 Thread Steven D'Aprano
Rick Johnson wrote: > On Tuesday, December 23, 2014 3:35:20 AM UTC-6, wxjm...@gmail.com wrote: >> >> [...] >> >> Wait for ther 3.5 release. I will still show >> you how to make Idle, tkinter, Python crashing >> in 10 seconds. >> >> Discussing with (some) core devs is simply impossible, >> they do

Re: Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-23 Thread Steven D'Aprano
alister wrote: > for the same reason a pet hate of mine is a memo sent as an attached > document when it could simply have been the body of the text. And then the attached document (a Word doc, naturally) simply says "Please see ", which opens to a page which links to a PDF file which contains a

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-23 Thread Steven D'Aprano
Rustom Mody wrote: > On Tuesday, December 23, 2014 9:50:22 PM UTC+5:30, Grant Edwards wrote: >> >> And even _with_ all the technical jibber-jabber, none of it explained >> or justified the whole "writing a virus to infect the brain through >> the optic nerve" thing which might just have well been

Re: object has no attribute 'ecrire'

2014-12-23 Thread Chris Angelico
On Wed, Dec 24, 2014 at 11:42 AM, wrote: > I wrote this code (it was on a book) > > class TableauNoir: > def __init__(self): > self.surface="" > def ecrire(self, message_a_ecrire): > if self.surface != "": > self.surface += "

Re: object has no attribute 'ecrire'

2014-12-23 Thread MRAB
On 2014-12-24 00:42, fulga...@gmail.com wrote: Hello, I wrote this code (it was on a book) class TableauNoir: def __init__(self): self.surface="" def ecrire(self, message_a_ecrire): if self.surface != "": self.surface += "\n

object has no attribute 'ecrire'

2014-12-23 Thread fulgar36
Hello, I wrote this code (it was on a book) class TableauNoir: def __init__(self): self.surface="" def ecrire(self, message_a_ecrire): if self.surface != "": self.surface += "\n" self.surface+=message_a_ecrire

Re: learning to use iterators

2014-12-23 Thread Terry Reedy
On 12/23/2014 4:25 PM, Ben Finney wrote: Ian Kelly writes: On Tue, Dec 23, 2014 at 11:55 AM, Seb wrote: Particulary, what do the parentheses do there? The parentheses enclose a generator expression, which is similar to a list comprehension [1] but produce a generator, which is a type of it

Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?

2014-12-23 Thread Rick Johnson
On Tuesday, August 26, 2014 7:01:22 PM UTC-5, Steven D'Aprano wrote: > I think it is a serious design flaw that the standard > library and user code co-exist in a single namespace. I'm not sure if your wording is just clumsily and you meant: """ I think it is a serious design flaw that the

Re: what is wrong with d.clear()?

2014-12-23 Thread Chris Angelico
On Wed, Dec 24, 2014 at 9:38 AM, alister wrote: > On Wed, 24 Dec 2014 09:31:12 +1100, Chris Angelico wrote: > >> On Wed, Dec 24, 2014 at 8:08 AM, alister >> wrote: >>> Sometime I have to switch to HTML @ work but even then only when I want >>> to send someone a screen shot >> >> Attachments don't

Re: what is wrong with d.clear()?

2014-12-23 Thread alister
On Wed, 24 Dec 2014 09:31:12 +1100, Chris Angelico wrote: > On Wed, Dec 24, 2014 at 8:08 AM, alister > wrote: >> Sometime I have to switch to HTML @ work but even then only when I want >> to send someone a screen shot > > Attachments don't work? > > ChrisA not with some of the people I have to

Re: very weird pandas behavior

2014-12-23 Thread Rick Johnson
On Tuesday, December 23, 2014 3:35:20 AM UTC-6, wxjm...@gmail.com wrote: > > [...] > > Wait for ther 3.5 release. I will still show > you how to make Idle, tkinter, Python crashing > in 10 seconds. > > Discussing with (some) core devs is simply impossible, > they do not whish to discuss! > > All

Re: what is wrong with d.clear()?

2014-12-23 Thread Chris Angelico
On Wed, Dec 24, 2014 at 8:08 AM, alister wrote: > Sometime I have to switch to HTML @ work but even then only when I want > to send someone a screen shot Attachments don't work? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-23 Thread alister
On Wed, 24 Dec 2014 08:31:44 +1100, Ben Finney wrote: > alister writes: > >> Sometime I have to switch to HTML @ work but even then only when I want >> to send someone a screen shot > > I've been able to attach images to plain text messages without any > trouble. Why would HTML be needed? MIME

Re: Why my ; continuator idea is better for debugging too.

2014-12-23 Thread Skybuck Flying
A:=B:=C:=D:=0; With the continuator idea this coding would look as follows: Good single line code: A:=B:=C:=D:=0 Bad multi line code: A:= B:= C:= D:= 0 ^This would not be allowed and lead to error messages. Good multi line code: A:=; B:=; C:=; D:=; 0 ^ This would lead to a good compile.

Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-23 Thread Ben Finney
alister writes: > Sometime I have to switch to HTML @ work but even then only when I want > to send someone a screen shot I've been able to attach images to plain text messages without any trouble. Why would HTML be needed? MIME attachments work just fine. -- \ “In the long run nothing

Re: learning to use iterators

2014-12-23 Thread Ben Finney
Ian Kelly writes: > On Tue, Dec 23, 2014 at 11:55 AM, Seb wrote: > > Particulary, what do the parentheses do there? > > The parentheses enclose a generator expression, which is similar to a > list comprehension [1] but produce a generator, which is a type of > iterator, rather than a list. To b

Re: what is wrong with d.clear()?

2014-12-23 Thread alister
On Tue, 23 Dec 2014 15:15:03 -0500, Dave Angel wrote: > On 12/23/2014 07:59 AM, shawool wrote: >> Thank you for answering my query. >> >> Fonts and colors are reset to defaults now. Sorry for the inconvenience >> caused. >> >> Regards, >> Shawool > > The following is a piece of your message: > >

Sending plain text messages (was: what is wrong with d.clear()?)

2014-12-23 Thread Ben Finney
shawool writes: > Fonts and colors are reset to defaults now. Sorry for the inconvenience > caused. Thank you for working to resolve this. The problem isn't the stting of your fonts or colours; those should be irrelevant to us and should affect only you (if you send plain text). Rather, you sh

Re: learning to use iterators

2014-12-23 Thread Terry Reedy
On 12/23/2014 1:55 PM, Seb wrote: def n_grams(a, n): ... z = (islice(a, i, None) for i in range(n)) ... return zip(*z) I'm impressed at how succinctly this islice helps to build a list of tuples with indices for all the required windows. However, I'm not quite following what goes on

Re: what is wrong with d.clear()?

2014-12-23 Thread Dave Angel
On 12/23/2014 07:59 AM, shawool wrote: Thank you for answering my query. Fonts and colors are reset to defaults now. Sorry for the inconvenience caused. Regards, Shawool The following is a piece of your message: Thank you for answering my query.Fonts and colors are reset to defaults now. Sor

Re: Old newbie needs help.

2014-12-23 Thread Ian Kelly
On Sat, Dec 20, 2014 at 9:34 AM, John Culleton wrote: > > This week I wrote my first Python program, a script callable from Scribus, a DTP program. It ran! Now I want to spread my wings a little. How do I call a C language executable subprogram from Python and pass information back and forth? Whe

Re: learning to use iterators

2014-12-23 Thread Seb
On Tue, 23 Dec 2014 12:23:45 -0700, Ian Kelly wrote: > The parentheses enclose a generator expression, which is similar to a > list comprehension [1] but produce a generator, which is a type of > iterator, rather than a list. > In much the same way that a list comprehension can be expanded out t

Re: [Distutils] Release: pip 6.0 and virtualenv 12.0

2014-12-23 Thread Terry Reedy
On 12/23/2014 12:27 PM, Mark Lawrence wrote: I chanced upon this https://mail.python.org/pipermail/distutils-sig/2014-December/025450.html via twitter and thought it would be of interest here. I'll assume that by the time I hit 'Send' it'll have arrived on the announcements mailing list :) Don

Re: learning to use iterators

2014-12-23 Thread Ian Kelly
On Tue, Dec 23, 2014 at 11:55 AM, Seb wrote: > > Hi, > > I'm fairly new to Python, and while trying to implement a custom sliding > window operation for a pandas Series, I came across a great piece of > code¹: > > >>> def n_grams(a, n): > ... z = (islice(a, i, None) for i in range(n)) > ...

Configuring code editors (was Re: IDLE ...)

2014-12-23 Thread Terry Reedy
On 12/23/2014 10:24 AM, pypythotho wrote: In Command Prompt, 'python -m idlelib' helped me to dicover the problem source. An explicit message told that an indentation was insconsistant in the file ntpath.py I modified previously with notepad++. I replaced a tab by 4 spaces and IDLE run again like

learning to use iterators

2014-12-23 Thread Seb
Hi, I'm fairly new to Python, and while trying to implement a custom sliding window operation for a pandas Series, I came across a great piece of code¹: >>> def n_grams(a, n): ... z = (islice(a, i, None) for i in range(n)) ... return zip(*z) ... I'm impressed at how succinctly this islic

[OT]ORM Is an Offensive Anti-Pattern

2014-12-23 Thread Mark Lawrence
http://java.dzone.com/articles/orm-offensive-anti-pattern Please don't shoot the messenger. More importantly please don't make him write Java :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org

[Distutils] Release: pip 6.0 and virtualenv 12.0

2014-12-23 Thread Mark Lawrence
I chanced upon this https://mail.python.org/pipermail/distutils-sig/2014-December/025450.html via twitter and thought it would be of interest here. I'll assume that by the time I hit 'Send' it'll have arrived on the announcements mailing list :) -- My fellow Pythonistas, ask not what our lan

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-23 Thread Rustom Mody
On Tuesday, December 23, 2014 9:50:22 PM UTC+5:30, Grant Edwards wrote: > > And even _with_ all the technical jibber-jabber, none of it explained > or justified the whole "writing a virus to infect the brain through > the optic nerve" thing which might just have well been magick and > witches. Yo

Re: OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-23 Thread Grant Edwards
On 2014-12-23, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote: >>> If I really didn't trust something, I'd go to AWS and spin up one of >>> their free-tier micro instances and run it there :-) >> >> How do you know it won't create console ou

Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?

2014-12-23 Thread pypythotho
'python -m idlelib' gave me information about a file, ntpath.py, that I've edited before with notepad++. This file has been rewritten with a tab instead of 4 paces. The command suggested by Terry displayed an explicit message about wrong indentation. This error fixed, IDLE run again like a charm

Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?

2014-12-23 Thread pypythotho
In Command Prompt, 'python -m idlelib' helped me to dicover the problem source. An explicit message told that an indentation was insconsistant in the file ntpath.py I modified previously with notepad++. I replaced a tab by 4 spaces and IDLE run again like a charm. -- https://mail.python.org/m

Re: Why my ; continuator idea is better for debugging too.

2014-12-23 Thread Maynard A. Philbrook Jr.
In article <85795$54978fe1$5419aafe$2...@news.ziggo.nl>, skybuck2000 @hotmail.com says... > > Hello, > > In the past I wrote about pascal's ; mistake. > > ; should be used as a continuator. > > I just made a programming mistake which solidifies/merits my idea: > > The programming mistake was t

Following Up

2014-12-23 Thread Sean Brady
Hi Marky, Hope all is well! Just wanted to check in and see if you were able to read my last email. I think you would be a fantastic fit for some of our roles. We have placed 90% of our candidates in the past 5 months closer to their homes with a higher salary, that's just how hot the mark

Re: what is wrong with d.clear()?

2014-12-23 Thread shawool
Thank you for answering my query. Fonts and colors are reset to defaults now. Sorry for the inconvenience caused. Regards, Shawool On Tue, Dec 23, 2014 at 3:55 PM, Steve Hayes wrote: > On Tue, 23 Dec 2014 13:33:53 +1100, Steven D'Aprano > wrote: > > >Dave Angel wrote: > > > >> Or even better:

Re: Select method of Range class failed

2014-12-23 Thread Dave Angel
On 12/23/2014 06:04 AM, Jaydeep Patil wrote: Hi all, I have developed python code which copy & paste data from one excel sheet to another excel sheet. I have compiled code both for 32 bit & 64 bit. It is working fine on 64 bit machine. But on 32 bit, it is giving below error. rng.Select() "Se

Select method of Range class failed

2014-12-23 Thread Jaydeep Patil
Hi all, I have developed python code which copy & paste data from one excel sheet to another excel sheet. I have compiled code both for 32 bit & 64 bit. It is working fine on 64 bit machine. But on 32 bit, it is giving below error. rng.Select() "Select method of Range class failed" Just to kno

Re: what is wrong with d.clear()?

2014-12-23 Thread Steve Hayes
On Tue, 23 Dec 2014 13:33:53 +1100, Steven D'Aprano wrote: >Dave Angel wrote: > >> Or even better:  Don't use html email for forum messages.  It frequently >> messes up the colors, the font, the formatting (like indentation), or >> even prevents some people from even seeing and/or replying to the

New github source

2014-12-23 Thread chris . hinsley
Hellow, just letting people know I've put up some github repo's of my Pthon projects: https://github.com/vygr/Python-PCB https://github.com/vygr/Python-Chess Regards Chris -- https://mail.python.org/mailman/listinfo/python-list