On Tue, Nov 3, 2015 at 7:15 AM, Steven D'Aprano wrote:
> On Tue, 3 Nov 2015 03:23 pm, ru...@yahoo.com wrote:
>
> > Regular expressions should be learned by every programmer or by anyone
> > who wants to use computers as a tool. They are a fundamental part of
> > computer science and are used in
On Mon, 02 Nov 2015 20:49:03 -0700, Michael Torrie wrote:
> On 10/25/2015 06:17 PM, Montana Burr wrote:
>> I'm looking for a library that will allow Python to listen for the
>> shriek of a smoke alarm. Once it detects this shriek, it is to notify
>> someone. Ideally, specificity can be adjusted fo
On Sun, 01 Nov 2015 08:24:22 -0800, rurpy wrote:
> On Sunday, November 1, 2015 at 8:52:55 AM UTC-7, Chris Angelico wrote:
>> On Mon, Nov 2, 2015 at 2:43 AM, rurpy--- via Python-list
>> wrote:
>> > Why, oh why, do the python.org front page and other pages that offer
>> > a Windows download not say
Michael Torrie wrote:
> On 11/02/2015 07:42 PM, Tim Chase wrote:
>> On 2015-11-02 20:09, Seymore4Head wrote:
>>> How do I make a regular expression that returns true if the end of
>>> the line is an asterisk
>>
>> Why use a regular expression?
>>
>> if line[-1] == '*':
>> yep(line)
>> el
> On 03 Nov 2015, at 05:46, Michael Torrie wrote:
> Sometimes on Windows you can double-click a python file and it will run.
The first thing I do on Windows after installing Python: edit the registry
so that the 'open' key is changed to 'run', and 'edit with IDLE' becomes 'open'.
I like to see
I'm using python3.5 (installed from binaries) on the latest OS X.
I have a curious issue with virtual environments on this machine (but
not on my other machine).
$ python3.5 -m venv testenv
$ source testenv/bin/activate
(testenv)$ python -m pip
/private/tmp/testenv/bin/python: No module named pi
Hello Everyone,
I am looking for Browser-based PNG file viewer written in
Python.(Flask framework preferably)
Following project(Flask-Based) provides many things(File manager as
well as file viewer) but it does not support PNG files.
https://github.com/vmi356/filemanager
Any idea if I have to
On 2015-11-03 10:25, Peter Otten wrote:
> >>> How do I make a regular expression that returns true if the end
> >>> of the line is an asterisk
> >>
> >> Why use a regular expression?
> >>
> >> if line[-1] == '*':
> >> yep(line)
> >> else:
> >> nope(line)
>
> Incidentally the code exa
On 03.11.2015 11:32, Nicholas Cole wrote:
I'm using python3.5 (installed from binaries) on the latest OS X.
I have a curious issue with virtual environments on this machine (but
not on my other machine).
$ python3.5 -m venv testenv
$ source testenv/bin/activate
(testenv)$ python -m pip
/privat
On Mon, 02 Nov 2015 22:17:49 -0500, Seymore4Head wrote:
> On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase
> wrote:
>
>>On 2015-11-02 20:09, Seymore4Head wrote:
>>> How do I make a regular expression that returns true if the end of the
>>> line is an asterisk
>>Why use a regular expression?
> Bec
my code:
from tkinter import *
window = Tk()
label = Label(window, text="miniproject A1")
label.pack()
window.mainloop()
given error:
C:\Users\Ruud\Python35\Scripts\python.exe
C:/Users/Ruud/PycharmProjects/School/project.py
Traceback (most recent call last):
File "C:/Users/Ruud/PycharmProj
On 11/3/2015 8:07 AM, Ruud van Rooijen wrote:
my code:
from tkinter import *
window = Tk()
label = Label(window, text="miniproject A1")
label.pack()
window.mainloop()
given error:
C:\Users\Ruud\Python35\Scripts\python.exe
Based on the below, python.exe should be in
C:\Users\Ruud\AppData\Lo
On Tue, Nov 3, 2015 at 12:27 PM, Wolfgang Maier
wrote:
> On 03.11.2015 11:32, Nicholas Cole wrote:
>>
>> I'm using python3.5 (installed from binaries) on the latest OS X.
>>
>> I have a curious issue with virtual environments on this machine (but
>> not on my other machine).
>>
>>
>> $ python3.5 -
On Tue, Nov 3, 2015 at 9:32 PM, Nicholas Cole wrote:
> Logging in as a different user and creating a venv works perfectly, so
> it's clearly a config issue somewhere, but I've tried removing
> ~/.bashrc and ~/.bash_profile and that doesn't help.
What happens if you create a brand new user, then c
Tim Chase wrote:
> On 2015-11-03 10:25, Peter Otten wrote:
>> >>> How do I make a regular expression that returns true if the end
>> >>> of the line is an asterisk
>> >>
>> >> Why use a regular expression?
>> >>
>> >> if line[-1] == '*':
>> >> yep(line)
>> >> else:
>> >> nope(line)
>
Nicholas Cole wrote:
> I'm using python3.5 (installed from binaries) on the latest OS X.
>
> I have a curious issue with virtual environments on this machine (but
> not on my other machine).
>
>
> $ python3.5 -m venv testenv
> $ source testenv/bin/activate
> (testenv)$ python -m pip
> /private/
On Tue, Nov 3, 2015 at 1:59 PM, Chris Angelico wrote:
> On Tue, Nov 3, 2015 at 9:32 PM, Nicholas Cole wrote:
>> Logging in as a different user and creating a venv works perfectly, so
>> it's clearly a config issue somewhere, but I've tried removing
>> ~/.bashrc and ~/.bash_profile and that doesn'
On 2015-11-02 22:17, Seymore4Head wrote:
> On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase
> wrote:
>
> >On 2015-11-02 20:09, Seymore4Head wrote:
> >> How do I make a regular expression that returns true if the end
> >> of the line is an asterisk
> >
> >Why use a regular expression?
> >
> Because th
On Tue, 03 Nov 2015 09:03:14 -0500, Dennis Lee Bieber wrote:
> On Tue, 3 Nov 2015 08:50:34 + (UTC), alister
> declaimed the following:
>
>>Personally I would forget trying to analyse sound & see if there is any
>>way to get an input signal direct from the alarm (even if that is as
>>crude as
On 2015-11-03, Tim Chase wrote:
> On 2015-11-02 20:09, Seymore4Head wrote:
>> How do I make a regular expression that returns true if the end of
>> the line is an asterisk
>
> Why use a regular expression?
>
> if line[-1] == '*':
Why use a negative index and then a compare?
if line.endswit
Dennis Lee Bieber writes:
> If a fire did occur, and the inspectors find traces of wiring
> going into what was supposed to be a stand-alone detector there is
> a risk that it will be concluded that the detector had been
> tampered with and may not have been functional... And that could
> lead to
Nobody writes:
> It's probably related to the fact that std{in,out,err} are Unicode
> streams.
There's no fundamental reason a Unicode stream should have to be line
buffered. If it's "related", it's only in that an oversight was made in
the course of making that change.
--
https://mail.python
Peter Otten writes:
> If a "line" is defined as a string that ends with a newline
>
> def ends_in_asterisk(line):
> return False
>
> would also satisfy the requirement. Lies, damned lies, and specs ;)
Even if a "line" is defined as a string that comes from reading
something like a file with d
On Mon, Nov 2, 2015 at 10:17 PM, Seymore4Head
wrote:
> On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase
> wrote:
>
> >On 2015-11-02 20:09, Seymore4Head wrote:
> >> How do I make a regular expression that returns true if the end of
> >> the line is an asterisk
> >
> >Why use a regular expression?
> >
Jussi Piitulainen wrote:
> Peter Otten writes:
>
>> If a "line" is defined as a string that ends with a newline
>>
>> def ends_in_asterisk(line):
>> return False
>>
>> would also satisfy the requirement. Lies, damned lies, and specs ;)
>
> Even if a "line" is defined as a string that comes f
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
> Nobody writes:
>
>> It's probably related to the fact that std{in,out,err} are Unicode
>> streams.
>
> There's no fundamental reason a Unicode stream should have to be line
> buffered. If it's "related", it's only in that an oversight was made in
> On Oct 25, 2015, at 8:17 PM, Montana Burr wrote:
>
> I'm looking for a library that will allow Python to listen for the shriek of
> a smoke alarm. Once it detects this shriek, it is to notify someone. Ideally,
> specificity can be adjusted for the user's environment. For example, I expect
>
On 1 November 2015 at 10:04, gers antifx wrote:
>
> I have to write a LU-decomposition. My Code worked so far but (I want to
> become better:) ) I want to ask you, if I could write this LU-decomposition
> in a better way?
>
> def LU(x):
> L = np.eye((x.shape[0]))
> n = x.shape[0]
> f
On 3 November 2015 at 12:54, Arshpreet Singh wrote:
> Hello Everyone,
>
> I am looking for Browser-based PNG file viewer written in
> Python.(Flask framework preferably)
>
> Following project(Flask-Based) provides many things(File manager as
> well as file viewer) but it does not support PNG file
On Tue, 3 Nov 2015 10:34:12 -0500, Joel Goldstick
wrote:
>On Mon, Nov 2, 2015 at 10:17 PM, Seymore4Head
>wrote:
>
>> On Mon, 2 Nov 2015 20:42:37 -0600, Tim Chase
>> wrote:
>>
>> >On 2015-11-02 20:09, Seymore4Head wrote:
>> >> How do I make a regular expression that returns true if the end of
>>
On Wed, Nov 4, 2015 at 3:10 AM, Seymore4Head
wrote:
> Yes I knew that -1 represents the end character. It is not a question
> of trying to accomplish anything. I was just practicing with regex
> and wasn't sure how to express a * since it was one of the
> instructions.
In that case, it's nothin
On Tue, Nov 3, 2015 at 7:45 AM, William Ray Wing wrote:
>
>> On Oct 25, 2015, at 8:17 PM, Montana Burr wrote:
>>
>> I'm looking for a library that will allow Python to listen for the shriek of
>> a smoke alarm. Once it detects this shriek, it is to notify someone.
>> Ideally, specificity can be
On Tuesday, November 3, 2015 at 12:55:09 PM UTC+1, Arshpreet Singh wrote:
> Hello Everyone,
>
> I am looking for Browser-based PNG file viewer written in
> Python.(Flask framework preferably)
>
> Following project(Flask-Based) provides many things(File manager as
> well as file viewer) but it do
Peter Otten writes:
> Jussi Piitulainen wrote:
>> Peter Otten writes:
>>
>>> If a "line" is defined as a string that ends with a newline
>>>
>>> def ends_in_asterisk(line):
>>> return False
>>>
>>> would also satisfy the requirement. Lies, damned lies, and specs ;)
>>
>> Even if a "line" is d
On Tue, Nov 3, 2015 at 11:23 AM, Ian Kelly wrote:
> On Tue, Nov 3, 2015 at 7:45 AM, William Ray Wing wrote:
> >
> >> On Oct 25, 2015, at 8:17 PM, Montana Burr
> wrote:
> >>
> >> I'm looking for a library that will allow Python to listen for the
> shriek of a smoke alarm. Once it detects this sh
On 2015-11-03 16:35, Peter Otten wrote:
> I wish there were a way to prohibit such files. Maybe a special
> value
>
> with open(..., newline="normalize") f:
> assert all(line.endswith("\n") for line in f)
>
> to ensure that all lines end with "\n"?
Or even more valuable to me:
with open(
I posted this to the CherryPy and ws4py mailing lists, but in the week since I
did that I've only gotten two or three views on each list, and no responses, so
as a last-ditch effort I thought I'd post here. Maybe someone with more general
python knowledge than me can figure out the traceback and
If I have a large project with multiple directories, then I may want to
assign different translation domains for different subpackages.
Suppose I have this directory structure:
main
|
|--- sub1
|
|--- sub2
|
| sub2.1
|
| sub2.2
Tim Chase wrote:
> On 2015-11-03 16:35, Peter Otten wrote:
>> I wish there were a way to prohibit such files. Maybe a special
>> value
>>
>> with open(..., newline="normalize") f:
>> assert all(line.endswith("\n") for line in f)
>>
>> to ensure that all lines end with "\n"?
>
> Or even more
On 11/03/2015 05:00 PM, python-list-requ...@python.org wrote:
On Mon, 02 Nov 2015 18:52:55 +1100, Steven D'Aprano wrote:
In Python 2, stderr is unbuffered.
In most other environments (the shell, C...) stderr is unbuffered.
It is usually considered a bad, bad thing for stderr to be buffered. W
Hi All—
I needed to install cvxopt on a 64 bit W7. I found out that cvxopt is
incompatible with a 64 bit. It only compatible with a 32 bit which can be
installed on a 64 bit computer and it works. I stumbled on this on another
discussion group posting. The suggestion was to install python 32 b
Forwarded Message
Subject:Re: Unbuffered stderr in Python 3
Date: Tue, 03 Nov 2015 18:03:51 +
From: George Trojan
To: python-list@python.org
On 11/03/2015 05:00 PM, python-list-requ...@python.org wrote:
On Mon, 02 Nov 2015 18:52:55 +1100, Steven D'Apra
On Tue, Nov 3, 2015 at 9:56 AM, Tim Chase wrote:
> On 2015-11-03 16:35, Peter Otten wrote:
>> I wish there were a way to prohibit such files. Maybe a special
>> value
>>
>> with open(..., newline="normalize") f:
>> assert all(line.endswith("\n") for line in f)
>>
>> to ensure that all lines en
On Tue, Nov 3, 2015 at 11:33 AM, Ian Kelly wrote:
> On Tue, Nov 3, 2015 at 9:56 AM, Tim Chase
> wrote:
>> Or even more valuable to me:
>>
>> with open(..., newline="strip") as f:
>> assert all(not line.endswith(("\n", "\r")) for line in f)
>>
>> because I have countless loops that look som
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Does anyone know of a module that allows the wiring of Outlook PST files using
Python? I'm working on a project that will require me to migrate 60gb of
maildir mail (multiple accounts) to Outlook.
Thanks
Anthony
- --
Sent from my Android device wi
George Trojan writes:
> This does set line buffering, but does not change the behaviour:
The opposite of line buffering is not no buffering, but full
(i.e. block) buffering, that doesn't get flushed until it runs
out of space. TextIOWrapper has its own internal buffer, and its
design apparently d
Chris Angelico writes:
> Aside from string exceptions and the "except Type, e:" syntax, I would
> agree with you. Actually, I can't think of any "obsolete
> exception-handling practices" in any language.
I'd say that context managers are a big recent improvement in Python
over dealing with a lot
On 2015-11-03 11:39, Ian Kelly wrote:
> >> because I have countless loops that look something like
> >>
> >> with open(...) as f:
> >> for line in f:
> >> line = line.rstrip('\r\n')
> >> process(line)
> >
> > What would happen if you read a file opened like this without
> > iter
On Wed, Nov 4, 2015 at 6:09 AM, Anthony Papillion
wrote:
> Does anyone know of a module that allows the wiring of Outlook PST files
> using Python? I'm working on a project that will require me to migrate 60gb
> of maildir mail (multiple accounts) to Outlook.
>
*wince*
I don't, but if there is
On 2015-11-03, Tim Chase wrote:
[re. iterating over lines in a file]
> I can't think of more than 1-2 times in my last 10+ years of
> Pythoning that I've actually had potential use for the newlines,
If you can think of 1-2 times when you've been interating over the
lines in a file and wanted to
On 11/3/2015 10:42 AM, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
Nobody writes:
It's probably related to the fact that std{in,out,err} are Unicode
streams.
There's no fundamental reason a Unicode stream should have to be line
buffered. If it's "related", it's o
Am 03.11.2015 um 05:23 schrieb ru...@yahoo.com:
Of course there are people who misuse regexes.
/^1?$|^(11+?)\1+$/
There are? 0:-)
--
Robin Koch
--
https://mail.python.org/mailman/listinfo/python-list
On 04Nov2015 09:12, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 6:09 AM, Anthony Papillion
wrote:
Does anyone know of a module that allows the wiring of Outlook PST files using
Python? I'm working on a project that will require me to migrate 60gb of
maildir mail (multiple accounts) to Outlo
On 11/03/2015 12:15 AM, Steven D'Aprano wrote:
> On Tue, 3 Nov 2015 03:23 pm, rurpy wrote:
>
>> Regular expressions should be learned by every programmer or by anyone
>> who wants to use computers as a tool. They are a fundamental part of
>> computer science and are used in all sorts of matching
On Monday, November 2, 2015 at 9:38:24 PM UTC-7, Michael Torrie wrote:
> On 11/02/2015 09:23 PM, rurpy--- via Python-list wrote:
> >> My completely unsolicited advice is that regular expressions shouldn't be
> >> very high on the list of things to learn. They are very useful, and very
> >> tricky
On 11/03/2015 12:09 PM, Anthony Papillion wrote:
> Does anyone know of a module that allows the wiring of Outlook PST
> files using Python? I'm working on a project that will require me to
> migrate 60gb of maildir mail (multiple accounts) to Outlook.
I used libpst (http://www.five-ten-sg.com/libp
I should have checked the web site before posting, it
appears that both libpst and libpff only read pst files,
no write. Sorry for the noise.
--
https://mail.python.org/mailman/listinfo/python-list
On 11/03/2015 05:33 PM, rurpy--- via Python-list wrote:
> I consider regexs more fundemental. One need not even be a programmer
> to use them: consider grep, sed, a zillion editors, database query
> languages, etc.
Grep can use regular expressions (and I do so with it regularly), but
it's defaul
On Tue, 03 Nov 2015 19:04:23 -0700, Michael Torrie wrote:
> On 11/03/2015 05:33 PM, rurpy--- via Python-list wrote:
>> I consider regexs more fundemental. One need not even be a programmer
>> to use them: consider grep, sed, a zillion editors, database query
>> languages, etc.
>
> Grep can use
On 2015-11-03 19:04, Michael Torrie wrote:
> Grep can use regular expressions (and I do so with it regularly),
> but it's default mode is certainly not regular expressions, and it
> is still very powerful.
I suspect you're thinking of `fgrep` (AKA "grep -F") which uses fixed
strings rather than re
On Wednesday 04 November 2015 09:25, Terry Reedy wrote:
> On 11/3/2015 10:42 AM, Chris Angelico wrote:
>> On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
>>> Nobody writes:
>>>
It's probably related to the fact that std{in,out,err} are Unicode
streams.
>>>
>>> There's no fundamental r
On Wed, Nov 4, 2015 at 2:12 PM, Tim Chase wrote:
> It's not as helpful as one might hope because you're stuck using a
> fixed regexp rather than an arbitrary regexp, but if you have a
> particular regexp you search for frequently, you can index it.
> Otherwise, you'd be doing full table-scans (or
On Wednesday 04 November 2015 13:55, Dan Sommers wrote:
> On Tue, 03 Nov 2015 19:04:23 -0700, Michael Torrie wrote:
>
>> On 11/03/2015 05:33 PM, rurpy--- via Python-list wrote:
>>> I consider regexs more fundemental. One need not even be a programmer
>>> to use them: consider grep, sed, a zillio
On Wednesday 04 November 2015 03:20, Chris Angelico wrote:
> On Wed, Nov 4, 2015 at 3:10 AM, Seymore4Head
> wrote:
>> Yes I knew that -1 represents the end character. It is not a question
>> of trying to accomplish anything. I was just practicing with regex
>> and wasn't sure how to express a *
On Wednesday 04 November 2015 03:56, Tim Chase wrote:
> Or even more valuable to me:
>
> with open(..., newline="strip") as f:
> assert all(not line.endswith(("\n", "\r")) for line in f)
# Works only on Windows text files.
def chomp(lines):
for line in lines:
yield line.rstrip(
On 11/03/2015 08:23 PM, Steven D'Aprano wrote:
>>> Grep can use regular expressions (and I do so with it regularly), but
>>> it's default mode is certainly not regular expressions ...
>>
>> Its very name indicates that its default mode most certainly is regular
>> expressions.
>
> I don't even kno
On Wednesday 04 November 2015 11:33, ru...@yahoo.com wrote:
>> Not quite. Core language concepts like ifs, loops, functions,
>> variables, slicing, etc are the socket wrenches of the programmer's
>> toolbox. Regexs are like an electric impact socket wrench. You can do
>> the same work without i
On Wed, 04 Nov 2015 14:23:04 +1100, Steven D'Aprano wrote:
>> Its very name indicates that its default mode most certainly is regular
>> expressions.
>
> I don't even know what grep stands for.
>From the ed command "g /re/p" (where "re" is a placeholder for an
arbitrary regular expression). Test
On Tuesday, 3 November 2015 21:32:03 UTC+5:30, Chris Warrick wrote:
> On 3 November 2015 at 12:54, Arshpreet Singh wrote:
> > Hello Everyone,
> >
> > I am looking for Browser-based PNG file viewer written in
> > Python.(Flask framework preferably)
> >
> > Following project(Flask-Based) provides m
Arshpreet Singh writes:
> On Tuesday, 3 November 2015 21:32:03 UTC+5:30, Chris Warrick wrote:
> > Your problem is lack of basic understanding of the Internet.
>
> Yes That's true at some level.
More specifically, your problem is not “how do I do this with Python?”
but rather “what is a web pag
Am 04.11.15 um 04:48 schrieb Steven D'Aprano:
On Wednesday 04 November 2015 11:33, ru...@yahoo.com wrote:
Not quite. Core language concepts like ifs, loops, functions,
variables, slicing, etc are the socket wrenches of the programmer's
toolbox. Regexs are like an electric impact socket wrench
71 matches
Mail list logo