luofeiyu writes:
> In my system : win7+ python3.4 .
AFAIK, Microsoft's Windows OS does not provide correct standard
timezones for programmers. They provide only proprietary data, which do
not match the international standard time zones.
You will need to install timezone support specifically for
I feel it is necessary to start a new post to go on the discussion about
timezone.
In my system : win7+ python3.4 .
related official material.
https://docs.python.org/3.4/library/datetime.html#strftime-and-strptime
%z UTC offset in the form +HHMM or -HHMM (empty string if the the
object is na
Russell E. Owen wrote:
> I realize the logging module supports this and has a syslog writer, so
> that's a fallback. But we were hoping to use the syslog module for
> performance.
Have you benchmarked your code and discovered that using the logging module
makes a noticeable difference to performa
Philipp Kraus wrote:
> The code works till last week correctly, I don't change the pattern. My
> question is, can it be
> a problem with string encoding? Did I mask the question mark and quotes
> correctly?
If you didn't change the code, how could the *exact same code* not mask the
question mark
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?
I realize the logging module supports this and has a syslog writer, so
that's a fallback. But we were hoping to use the syslog module for
performance.
-- Russell
--
ht
In article ,
Philipp Kraus wrote:
> The code works till last week correctly, I don't change the pattern.
OK, so what did you change? Can you go back to last week's code and
compare it to what you have now to see what changed?
> My question is, can it be a problem with string encoding? Did I
On 2014-08-16 00:48:46 +, Roy Smith said:
In article ,
Philipp Kraus wrote:
found = re.search( "http://sourceforge.net/projects/boost/files/boost/";)
)
if found == None :
raise MyError.StopError("Boost Download URL not found")
But found is always None, so I cannot get the correc
In article ,
Philipp Kraus wrote:
> found = re.search( " href=\"/projects/boost/files/latest/download\?source=files\"
> title=\"/boost/(.*)",
> Utilities.URLReader("http://sourceforge.net/projects/boost/files/boost/";)
> )
> if found == None :
> raise MyError.StopError("Boost Download U
Hello,
I have defined a function with:
def URLReader(url) :
try :
f = urllib2.urlopen(url)
data = f.read()
f.close()
except Exception, e :
raise MyError.StopError(e)
return data
which get the HTML source code from an URL. I use this to get a part of
a HTML
So I've got my program log going to a RotatingFileHandler (actually a
subclass that ensmartens the umask, but I digress). I'd like to be
able to provide information to the logger that is formatted two
different ways, primarily just so that I can provide a Program Started
message into the log.
Wha
On Fri, Aug 15, 2014 at 12:21 PM, Denis McMahon
wrote:
> Output is a sorted list of the actual times and the UTC equivalents of
> all the times in the original list. Note that I had to edit several
> strings in your times list to ensure they were all in identical format: I
> added leading 0s to nu
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 you.
Tool -> https://github.com/rfunix/PyMatch
I expected something like visual regexp:
http://laurent.r
On 15/08/2014 19:21, Denis McMahon wrote:
On Thu, 14 Aug 2014 22:10:36 +0800, luofeiyu wrote:
I finished it ,but how to make it into more pythonic way such as min
(dates, key = converter)
1. If you don't learn to post properly, I'm going to stop trying to help
you.
I say old bean do be car
In Dominique Ramaekers
writes:
> #!/usr/bin/env python3
> print("Content-Type: text/html")
> print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1
> print("Expires: Sat, 26 Jul 1997 05:00:00 GMT") # Date in the past
> print("")
> f = open("/var/www/cgi-data/index.html", "r")
> for lin
On Fri, 15 Aug 2014 20:10:25 +0200, Dominique Ramaekers wrote:
> Hi,
>
> I've got a little script:
>
> #!/usr/bin/env python3 print("Content-Type: text/html")
> print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1
> print("Expires: Sat, 26 Jul 1997 05:00:00 GMT") # Date in the past
>
Hi,
I've got a little script:
#!/usr/bin/env python3
print("Content-Type: text/html")
print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1
print("Expires: Sat, 26 Jul 1997 05:00:00 GMT") # Date in the past
print("")
f = open("/var/www/cgi-data/index.html", "r")
for line in f:
prin
On Thu, 14 Aug 2014 22:10:36 +0800, luofeiyu wrote:
> I finished it ,but how to make it into more pythonic way such as min
> (dates, key = converter)
1. If you don't learn to post properly, I'm going to stop trying to help
you.
2. To user strptime, you need to have all the time strings in the s
On Fri, Aug 15, 2014 at 11:43 AM, Denis McMahon
wrote:
> On Fri, 15 Aug 2014 09:23:02 -0600, Ian Kelly wrote:
>
>> On Fri, Aug 15, 2014 at 1:39 AM, Denis McMahon
>> wrote:
>>> On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
>>>
>>> On further inspection, it seems that strptime() in 2.7 doesn'
On Fri, 15 Aug 2014 09:23:02 -0600, Ian Kelly wrote:
> On Fri, Aug 15, 2014 at 1:39 AM, Denis McMahon
> wrote:
>> On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
>>
>> On further inspection, it seems that strptime() in 2.7 doesn't handle
>> %z at all. In 3.2, it ignores the value it gets, bec
On Sat, Aug 16, 2014 at 3:18 AM, Eric S. Johansson wrote:
> not what I said or advocated. pointing out that breaking captchas is good
> for accessibility issues it not the same as being pro spambot. it may have
> that effect but it is not the same thing.
I don't care, frankly. I'm still not goin
In Ben Finney
writes:
> "Bottom-post" usually refers to the inferior practice of quoting a
> message (entirely or large amounts) and then indiscriminately responding
> to all of it below all of the quoted text.
I was unaware of that meaning.
--
John Gordon Imagine what it must be lik
On 8/14/2014 7:19 PM, Denis McMahon wrote:
On Wed, 13 Aug 2014 07:39:20 -0400, Eric S. Johansson wrote:
you are clear but also missing a really good reason to break captchas.
handicapped accessibility. Captchas are a huge barrier to access and in
many cases push disabled users away from using
On 15/08/2014 16:23, Ian Kelly wrote:
On Fri, Aug 15, 2014 at 1:39 AM, Denis McMahon wrote:
On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
On further inspection, it seems that strptime() in 2.7 doesn't handle %z
at all. In 3.2, it ignores the value it gets, because there's no
practical wa
On Fri, Aug 15, 2014 at 1:39 AM, Denis McMahon wrote:
> On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
>
> On further inspection, it seems that strptime() in 2.7 doesn't handle %z
> at all. In 3.2, it ignores the value it gets, because there's no
> practical way to select the "right" tz strin
On 08/13/2014 02:18 PM, Ian Kelly wrote:
> On Wed, Aug 13, 2014 at 2:01 PM, Tim Chase
> wrote:
>> On 2014-08-13 12:24, Chris Kaynor wrote:
>>> Many of the better captchas also include options for an audio cue in
>>> addition to the default visual one.
>>
>> Have you actually tried to use the audio
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 smaller. Instead of 30 items per
sub-array, try it with 5 items per sub-array. Instead of eight decimal
pla
CAN U BE VERY DETAILED PLEASEE
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, August 15, 2014 2:23:25 PM UTC+1, Steven D'Aprano wrote:
> Jamie Mitchell wrote:
>
>
>
> [...]
>
> > I just want to get a contour plot of two numpy arrays.
>
> > When I call plt.contour on my data I get "input must be a 2D array"
>
>
>
> You are providing a 1D array, or possibly
On Thu, 14 Aug 2014 14:52:17 +0800, luofeiyu wrote:
> in the manual https://docs.python.org/3.4/library/time.html
>
> %zTime zone offset indicating a positive or negative time difference
> from UTC/GMT of the form +HHMM or -HHMM, where H represents decimal hour
> digits and M represents deci
Jamie Mitchell wrote:
[...]
> I just want to get a contour plot of two numpy arrays.
> When I call plt.contour on my data I get "input must be a 2D array"
You are providing a 1D array, or possibly a 3D array. So the question you
really want to ask is not "How do I do contour plots" but "how do I
On 15.08.2014 11:18, ngangsia akumbo wrote:
> i have this piece of code
>
> file1 = open('text.txt, w)
> try:
> text = file1.read()
> finally:
> file1.close()
>
> i wish to manage an office task using this small code , how can i implemetn
> it to function.
import random
import troll
i
On Thursday, August 14, 2014 5:53:09 PM UTC+1, Steven D'Aprano wrote:
> Jamie Mitchell wrote:
>
>
>
> > Hello all,
>
> >
>
> > I want to contour a scatter plot but I don't know how.
>
> >
>
> > Can anyone help me out?
>
>
>
> Certainly. Which way did you come in?
>
>
>
> :-)
>
>
>
On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
> problem :
>
> t1 is GMT time 2014 00:36:46 t2 is GMT time 2014 14:36:46
>
> datetime.datetime.strptime do not give me the right answer.
As far as I can tell from running the following, it all seems to work as
expected in python 3.2 (
i have this piece of code
file1 = open('text.txt, w)
try:
text = file1.read()
finally:
file1.close()
i wish to manage an office task using this small code , how can i implemetn it
to function.
how can i pars it in a webpage ?
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 15 Aug 2014 07:39:23 +, Denis McMahon wrote:
> I've patched my 2.7 to set a tz string of "UTC[+-]" from the
> [+-] %z value.
... but that doesn't do much, because time.struct_time in 2.7 doesn't
recognise anything that strptime passes in as a tz at all, as it expects
the dst
Mark Lawrence :
> The rules here are quite clear, don't top post. If you can't be
> bothered to adhere to the rules, don't post.
Top-posting is bad, but I find nagging worse.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On 15/08/2014 08:03, alex23 wrote:
On 15/08/2014 5:43 AM, Eric S. Johansson wrote:
On 8/14/2014 2:37 PM, Peter Pearson wrote:
"Which of the following eight sentences are sarcastic in tone?"
and responses on this list alone show problems with detecting sarcasm
(or snark).
It can be especiall
On 15/08/2014 01:56, Dan Stromberg wrote:
On Thu, Aug 14, 2014 at 5:44 PM, Mark Lawrence wrote:
I really don't understand why people here are spoon feeding you when you
still insist on top posting. Ever heard the term "manners"? Oh what a
stupid comment, obviously not.
*plonk*
Getting peop
On 15Aug2014 13:59, Chris Angelico wrote:
On Fri, Aug 15, 2014 at 1:51 PM, Denis McMahon wrote:
AttributeError: 'module' object has no attribute 'timezone'
Both fail as you describe in 2.7, but in 3.4/3.5ish (my 'python3' is a
bit of a mess, but it's something between those two I think), bot
On Fri, 15 Aug 2014 10:24:47 +0800, luofeiyu wrote:
On further inspection, it seems that strptime() in 2.7 doesn't handle %z
at all. In 3.2, it ignores the value it gets, because there's no
practical way to select the "right" tz string from the offset.
For example, a dictionary of offset minute
On 15/08/2014 5:43 AM, Eric S. Johansson wrote:
On 8/14/2014 2:37 PM, Peter Pearson wrote:
"Which of the following eight sentences are sarcastic in tone?"
and responses on this list alone show problems with detecting sarcasm
(or snark).
It can be especially difficult for people on the autism
41 matches
Mail list logo