Jason Friedman wrote:
>Would this not work?
>import re
>if re.search(r"\d{1,2}:\d{2}:\d{2}(.\d{1,3})?", "12:55:55.705"):
># It's a time
No, because this regexp also matches stuff like "99:99:99.999".
Checking for the number of digits is not enough, because not all
combinations of two digits a
On Tue, 24 Dec 2013 00:32:31 +, Mark Lawrence wrote:
> Maybe of interest to some of you
> http://www.bbc.co.uk/news/technology-25495315
While I'm happy for Alan Turing, may he rest in peace, I think the
thousands of other homosexuals who have been prosecuted for something
which shouldn't be
In article <52b90263$0$30003$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Roy Smith wrote:
>
> > So, here's the deeper question. Â Is your issue strictly that -O elides
> > assert statements? That's a purely mechanical issue that could be
> > solved by using the rather more ve
On Tue, Dec 24, 2013 at 2:33 PM, wrote:
> Thanks Chris.I have put bind call but it did not work.
> Even telnet hangs if i tried to connect to the same IP and port manually. Is
> there a workaround to fix this issue?
>
> If the socket gets closed at the other end. How can we get around with the
Roy Smith wrote:
> So, here's the deeper question. Is your issue strictly that -O elides
> assert statements? That's a purely mechanical issue that could be
> solved by using the rather more verbose:
>
> if not condition:
> raise AssertionError("")
>
> Would you feel differently then?
On Monday, December 23, 2013 8:49:30 AM UTC+5:30, Chris Angelico wrote:
> On Mon, Dec 23, 2013 at 2:05 PM, wrote:
>
> > I wrote a small program which creates the socket, bind to the socket,
> > connect to socket and send() close(). I see that there is no reply coming
> > from server and the TC
> In this file I have 3 different kind of fields: one consist of the
> sole date, one - sole time and one - datetime. The time includes
> milliseconds, i.e. "12:55:55.705"
> All fields of the file including those 3 I am reading as the string.
> All those strings after validating will go into mySQL
* Mark Lawrence [131223 15:39]:
> Maybe of interest to some of you
> http://www.bbc.co.uk/news/technology-25495315
I note the following
"""
"Dr Alan Turing was an exceptional man with a brilliant mind," said
Mr Grayling.
He said the research Turing carried out during the war at
Blet
On 24/12/2013 00:30, Igor Korot wrote:
Hi, ALL,
I'm working on the python script which reads the data from the csv file.
In this file I have 3 different kind of fields: one consist of the
sole date, one - sole time and one - datetime. The time includes
milliseconds, i.e. "12:55:55.705"
All fields
On Tue, Dec 24, 2013 at 11:30 AM, Igor Korot wrote:
> So, my question is: since there is a simple way of inserting
> preformatted string into the datetime field of mySQL, how do I
> validate the date string?
Well, the easiest way would be to simply attempt the SQL query. If it
comes back with an
Maybe of interest to some of you
http://www.bbc.co.uk/news/technology-25495315
--
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/mailman/listinfo/python-list
Hi, ALL,
I'm working on the python script which reads the data from the csv file.
In this file I have 3 different kind of fields: one consist of the
sole date, one - sole time and one - datetime. The time includes
milliseconds, i.e. "12:55:55.705"
All fields of the file including those 3 I am readi
On 23/12/2013 20:53, Terry Reedy wrote:
On 12/23/2013 2:05 PM, wxjmfa...@gmail.com wrote:
Le lundi 23 décembre 2013 18:59:41 UTC+1, Wolfgang Keller a écrit :
[me]
I'll note that Python core developers do care about memory leaks.
And that's a really good thing.
Memory? Let me laugh!
[snip
Kevin Peterson writes:
> I want to daemonify my python script on Android device. That is, it
> should be automatically invoked on boot up.
Those aren't the same thing. To daemonise a program is independent of
whether the program starts automatically; it can start automatically
without detaching
On 12/23/2013 2:05 PM, wxjmfa...@gmail.com wrote:
Le lundi 23 décembre 2013 18:59:41 UTC+1, Wolfgang Keller a écrit :
[me]
I'll note that Python core developers do care about memory leaks.
And that's a really good thing.
Memory? Let me laugh!
[snip repeated (for about the 5th time) posting
On 12/23/2013 11:47 AM, Chris Angelico wrote:
On Mon, Dec 23, 2013 at 10:50 PM, Tobias M. wrote:
I am currently writing an event-driven client library for a network protocol
[1] and chose to use the new asyncio module. I have no experience with
asynchronous IO and don't understand all the conce
> assert assertions_working() # refuse to run in -O mode
>
> Can't imagine why that wouldn't work..
Why overthink this?
assert not sys.flags.optimize
is clearly the one, and only one, obvious way to do it.
Of course, it works about as well as the rest of these solutions. Which is to
sa
On Sat, Dec 14, 2013 at 4:25 AM, Chris Angelico wrote:
> On Sat, Dec 14, 2013 at 11:12 PM, Jai wrote:
>> GUI:-want to learn GUI programming in python , how should i proceed.
>>
>> There are lots of book here so I am confuse which book i should refer so
>> that i don't waste time . please answ
On 23/12/2013 19:14, Chris Angelico wrote:
On Tue, Dec 24, 2013 at 6:05 AM, wrote:
Memory? Let me laugh!
Is it a crime to hijack an already-hijacked thread?
ChrisA
Yes, especially when written with our favourite bug ridden pile of garbage.
Perhaps we should write up something for the P
On Tue, Dec 24, 2013 at 6:05 AM, wrote:
> Memory? Let me laugh!
>
Is it a crime to hijack an already-hijacked thread?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 24, 2013 at 6:03 AM, Roy Smith wrote:
> [2] In which case, we would just add some middleware which did:
>
> assert "-O" not in sys.argv
Aside from the fact that this wouldn't work, it won't work :) By the
time you see argv, the -O option has been eaten. But why stop at that?
def asse
Le lundi 23 décembre 2013 18:59:41 UTC+1, Wolfgang Keller a écrit :
> > > On an actual operating system, the attitude of the developers (do
>
> > > they actually care or just don't give a darn) is *the* critical
>
> > > issue for end-user productivity. If a developer makes a statement
>
> > > su
On Monday, December 23, 2013 12:05:22 PM UTC-5, Steven D'Aprano wrote:
> Roy Smith wrote:
> > And, yes, I know that assertions get turned off with -O (frankly, I
> > think that's a design flaw). We don't run with -O.
>
>
> Until such time as somebody decides they can speed up your code by 5% by
> > On an actual operating system, the attitude of the developers (do
> > they actually care or just don't give a darn) is *the* critical
> > issue for end-user productivity. If a developer makes a statement
> > such as of "just get a faster computer" or "just get more RAM",
> > then (s)he probably
Ethan Furman wrote:
>> Sigh. Sometimes I'm not sure which is worse. The anti-assertion
>> zealotry on this list, or the anti-regex zealotry.
>
> I am not a zealot (I'm not! Really!! ;) . I just find it alarming to
> have major pieces of software rely on a feature that can be so easily
> tuned
Dennis Lee Bieber wrote:
> On Mon, 23 Dec 2013 13:33:08 +1100, Steven D'Aprano
> declaimed the following:
>
>>Roy Smith wrote:
>>
>>
>>> else:
>>> assert 0, "can't create picker (classes = %s)" % classes
>>
>>¡Ay, caramba! I was with you until the very last line. The above co
On 12/23/2013 07:10 AM, Roy Smith wrote:
In article ,
Ethan Furman wrote:
On 12/22/2013 08:57 PM, Roy Smith wrote:
In article <52b7a0e4$0$29994$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
Anyway, I may be completely misinterpreting what I'm reading. Perhaps the
asserti
Roy Smith wrote:
> Sigh. Sometimes I'm not sure which is worse. The anti-assertion
> zealotry on this list, or the anti-regex zealotry.
I'm not anti-assertions. I love assertions. I wouldn't be surprised if I use
assert more than you do. What I dislike is people misusing assertions.
> And, yes
Op maandag 23 december 2013 16:29:09 UTC+1 schreef Michael Torrie:
> On 12/23/2013 07:06 AM, Jean Dubois wrote:
> > I thought this would be something python-people are familiar with, after
> > all idle is a Python IDE and running it as a root sometimes is necessary.
>
> On most desktop distros like
On Mon, Dec 23, 2013 at 10:50 PM, Tobias M. wrote:
> I am currently writing an event-driven client library for a network protocol
> [1] and chose to use the new asyncio module. I have no experience with
> asynchronous IO and don't understand all the concepts in asyncio yet. So I'm
> not sure if as
On Tue, Dec 24, 2013 at 12:47 AM, Jeff James wrote:
> I have some simple code I would like to share with someone that can assist
> me in integrating authentication script into. I'm sure it's an easy answer
> for any of you. I am still researching, but on this particular project,
> time is of the
On Mon, Dec 23, 2013 at 10:48 PM, Ned Batchelder wrote:
> I suggest the following:
>
> 1) Don't fault newcomers for using Google Groups. Politely suggest
> alternatives, but only if you are also helping them, or if they have already
> gotten help.
>
> 2) Be careful how you rail against Google Gro
On Mon, Dec 23, 2013 at 5:09 PM, wrote:
> On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
>> Actually, formatting errors ARE often caused by Google Groups. Maybe
>> it wasn't in this instance, but I have seen several cases of GG
>> mangling code formatting, so this was a per
On 12/23/2013 07:06 AM, Jean Dubois wrote:
> I thought this would be something python-people are familiar with, after
> all idle is a Python IDE and running it as a root sometimes is necessary.
On most desktop distros like Fedora, sudo idle would indeed work.
The fact that it's not working on you
On 23/12/2013 15:12, Dennis Lee Bieber wrote:
On Mon, 23 Dec 2013 13:33:08 +1100, Steven D'Aprano
declaimed the following:
Roy Smith wrote:
else:
assert 0, "can't create picker (classes = %s)" % classes
¡Ay, caramba! I was with you until the very last line. The above
In article ,
Ethan Furman wrote:
> On 12/22/2013 08:57 PM, Roy Smith wrote:
> > In article <52b7a0e4$0$29994$c3e8da3$54964...@news.astraweb.com>,
> > Steven D'Aprano wrote:
> >
> >> Anyway, I may be completely misinterpreting what I'm reading. Perhaps the
> >> assertion is checking a function
On Sun, Dec 22, 2013 at 10:22 PM, Kevin Peterson wrote:
> Hi,
>
> I want to daemonify my python script on Android device. That is, it should be
> automatically invoked on boot up.
>
> Appreciate your help.
I don't know anything about Android programming, but for Linux i
followed the advice on t
I have some simple code I would like to share with someone that can assist
me in integrating authentication script into. I'm sure it's an easy answer
for any of you. I am still researching, but on this particular project,
time is of the essence and this is the only missing piece of the puzzle for
Op zondag 22 december 2013 18:06:39 UTC+1 schreef Michael Torrie:
> On 12/22/2013 06:27 AM, Jean Dubois wrote:
> > I was wrong writing idle_as_root worked this way. As a matter of fact,
> > this method also does not work as expected, as can be seen from this
> > message:
> >
> > X11 connection rej
On 12/23/13 7:45 AM, Kevin Peterson wrote:
Hi Ned,
I havenot named it as android.py and there are no .pyc files in my
directory.
Here is the snapshot
$ python
Python 2.7.2 (default, Jul 20 2013, 22:54:57)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more informatio
On 12/22/2013 06:33 PM, Steven D'Aprano wrote:
Roy Smith wrote:
else:
assert 0, "can't create picker (classes = %s)" % classes
¡Ay, caramba! I was with you until the very last line. The above code is
possibly buggy and inappropriately designed. [...]
First, the bug: the
smilesonisa...@gmail.com writes:
> Hi,
>I am trying to write a TCP socket program in python. I am using python 2.6
> in linux.
>
> I referred following link:
> http://www.ibm.com/developerworks/linux/tutorials/l-pysocks/section4.html
> I am actually writing the client-side stream socket.
> I
On 23/12/2013 12:45, Ethan Furman wrote:
Considering how easy it is to disable assertions, a circle in the sand
is an amazingly appropriate metaphor. :)
--
~Ethan~
It might be easy, but surely it's far more fun providing an itertools
solution :)
--
My fellow Pythonistas, ask not what our
On 12/22/2013 08:57 PM, Roy Smith wrote:
In article <52b7a0e4$0$29994$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
Anyway, I may be completely misinterpreting what I'm reading. Perhaps the
assertion is checking a function invariant ("one of the strategies will
always succeed")
Hi Ned,
I havenot named it as android.py and there are no .pyc files in my
directory.
Here is the snapshot
$ python
Python 2.7.2 (default, Jul 20 2013, 22:54:57)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import android
>>> droid = android.And
On 22/12/2013 23:57, Rick Johnson wrote:
On Sunday, December 22, 2013 5:02:51 PM UTC-6, Mark Lawrence wrote:
On 22/12/2013 22:51, Chris Angelico wrote:
if a() == 0:
if b() == 0:
c()
I can only see one way that you can possibly intepret it.
[snip molehill turned into Him
On 12/22/13 6:57 PM, Rick Johnson wrote:
Even IF you are presented with a small snippet of code that
include the identifier for the return value, you still
cannot be certain that extrapolating meaning from an
identifier*alone* will give you the insight to remove all
ambiguity.
For example, let'
- Original Message -
> Am 18.12.13 21:17, schrieb Jean Dubois:
> > I have a python-program which I want to perform its task first,
> > then
> > switch to
> > the python console to experiment with further commands, using what
> > was
> > already
> > defined in the python-program.
>
> Excell
On Sunday, December 22, 2013 5:02:51 PM UTC-6, Mark Lawrence wrote:
> On 22/12/2013 22:51, Chris Angelico wrote:
> if a() == 0:
>
> if b() == 0:
>
> c()
>
> I can only see one way that you can possibly intepret it.
Hmm, I guess i should not assume color vision to be ubiquitous.
> [
Hello,
I am currently writing an event-driven client library for a network
protocol [1] and chose to use the new asyncio module. I have no
experience with asynchronous IO and don't understand all the concepts in
asyncio yet. So I'm not sure if asyncio is actually the right choice .
My goal:
On 12/22/13 11:52 PM, ru...@yahoo.com wrote:
Come on Chris, it is just as easy to make typo or copy-and-
paste errors in any other software as GG, there is no evidence
that it was GG's fault.
Can we agree that it's not great to respond to a new poster with *just*
"please don't use GG, it's bad
On 23/12/2013 06:09, ru...@yahoo.com wrote:
On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
Actually, formatting errors ARE often caused by Google Groups. Maybe
it wasn't in this instance, but I have seen several cases of GG
mangling code formatting, so this was a perfectly
On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
> Actually, formatting errors ARE often caused by Google Groups. Maybe
> it wasn't in this instance, but I have seen several cases of GG
> mangling code formatting, so this was a perfectly reasonable theory.
What sort of formatt
On 12/22/2013 02:54 PM, dec...@msn.com wrote:
basically what I wanna do is this :
x = 4
y = 7
def switch (z,w):
***this will switch z to w and vice verca***
c= z
z=w
w=c
print 'Now x =', w, 'and y = ' , z
return w
x = switch(x,y)
How am I supposed to do so I can
daniel.t.he...@gmail.com writes:
- -
> Problem: The file only contains P2. It always overwrites the first
> line. I can send 20 strings and the file will always contain the
> last string received.
- -
> while True:
> rawcode=ser.readline()
> codelog=open('/home/pi/avdms/codes.log','
On Sunday, December 22, 2013 4:54:46 PM UTC-6, dec...@msn.com wrote:
> basically what I wanna do is this :
> x = 4
>
> y = 7
> def switch (z,w):
> ***this will switch z to w and vice verca***
> c= z
> z=w
> w=c
> print 'Now x =', w, 'and y = ' , z
> return w
> x = switch(x
Hi,
I want to daemonify my python script on Android device. That is, it should be
automatically invoked on boot up.
Appreciate your help.
Thanks,
Kevin Peterson
--
https://mail.python.org/mailman/listinfo/python-list
> basically what I wanna do is this :
>
> x = 4
> y = 7
> def switch (z,w):
> ***this will switch z to w and vice verca***
> c= z
> z=w
> w=c
> print 'Now x =', w, 'and y = ' , z
> return w
> x = switch(x,y)
>
> How am I supposed to do so I can return also a value to th
On 23/12/2013 08:46, Chris Angelico wrote:
On Mon, Dec 23, 2013 at 5:59 PM, wrote:
On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
Actually, formatting errors ARE often caused by Google Groups. Maybe
it wasn't in this instance, but I have seen several cases of GG
manglin
basically what I wanna do is this :
x = 4
y = 7
def switch (z,w):
***this will switch z to w and vice verca***
c= z
z=w
w=c
print 'Now x =', w, 'and y = ' , z
return w
x = switch(x,y)
How am I supposed to do so I can return also a value to the variable y
WITHOUT printi
Overview: I'm attempting to read strings from a serial port. Each string ends
with a carriage return and line feed. I want to write those strings to a file,
like a log file. So, if I send P1 and the P2 on a new line, I would expect to
open this file and find (line 1) P1 (line 2) P2.
Problem: T
On Mon, Dec 23, 2013 at 5:59 PM, wrote:
> On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
>> Actually, formatting errors ARE often caused by Google Groups. Maybe
>> it wasn't in this instance, but I have seen several cases of GG
>> mangling code formatting, so this was a per
On 12/22/2013 04:55 PM, Dan Healy wrote:
Overview: I'm attempting to read strings from a serial port. Each string ends
with a carriage return and line feed. I want to write those strings to a file,
like a log file. So, if I send P1 and the P2 on a new line, I would expect to
open this file and
On Sunday, December 22, 2013 10:37:35 PM UTC-7, Chris Angelico wrote:
> Actually, formatting errors ARE often caused by Google Groups. Maybe
> it wasn't in this instance, but I have seen several cases of GG
> mangling code formatting, so this was a perfectly reasonable theory.
And you have determi
Gregory Ewing wrote:
> rusi wrote:
>> Good idea. Only you were beaten to it by about 2 decades.
>
> More than 2, I think.
>
> Algol: x := y
Wher := is pronounced 'becomes'.
--
Duncan Booth http://kupuguy.blogspot.com
--
https://mail.python.org/mailman/listinfo/python-list
Overview: I'm attempting to read strings from a serial port. Each string ends
with a carriage return and line feed. I want to write those strings to a file,
like a log file. So, if I send P1 and the P2 on a new line, I would expect to
open this file and find (line 1) P1 (line 2) P2.
Problem: T
66 matches
Mail list logo