On 26/9/23 22:27, Abdelkhelk ashref salay eabakh via Python-list wrote:
Dear Python team,
This is my not first time using Python, I tried to launch Python and it showed
I'm no expert but
"Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit
(AMD64)] on win
On 31/12/22 16:45, Goran Ikac wrote:
Happy New Year, everybody!
I'm new in the Python List, new in Python world, and new in coding.
A few days (weeks?) ago, I faced a problem trying to write a program for an
exercise. I asked for help and nobody answered.
In the meantime, I found a part of the
Roy Smith added the comment:
I agree that this is confusing and that what we need is an assertion for the
top-level mock having specific calls in a specific order, and ignores any
intervening extra calls to mocked functions. In other words, a version of
assert_has_calls() which looks
Roy Smith added the comment:
It's nice to see this is still being worked on after all these years :-)
I'm not actually convinced the proposed fix makes sense. It swaps out one
incorrect behavior for a different incorrect behavior. If it really is more
effort than it's worth to fix
New submission from Roy Smith :
At https://docs.python.org/3.9/library/unittest.mock.html#unittest.mock.Mock,
it says:
unsafe: By default if any attribute starts with assert or assret will raise an
AttributeError.
That's not an English sentence. I think what was intended was, "By de
Roy Smith added the comment:
The https://bitbucket.org/cliff/cpython#python24258 URL 404's
Looking at the attached bz2.py diff, I would change:
if isinstance(filename, (str, bytes, os.PathLike)):
self._fp = _builtin_open(filename, mode)
+self.filename
Change by Roy Smith :
--
nosy: +roysmith
___
Python tracker
<https://bugs.python.org/issue24258>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Roy Smith :
See https://docs.python.org/3.7/library/bz2.html
For bz2.open(), the section header says:
bz2.open(filename, mode='r' ...)
but the text says:
The mode argument ... The default is 'rb'.
As I understand it, 'r' and 'rb' actually do the same thing, but the docs
Roy Smith added the comment:
Just as another edge case, type() can do the same thing:
Foo = type("Foo", (object,), {"a b": 1})
f = Foo()
for example, will create a class attribute named "a b". Maybe this actually
calls setattr() under the covers, but
Roy Smith added the comment:
I just got bit by this in Python 3.5.3.
I get why it does this. I also get why it's impractical to change the behavior
now. But, it really isn't the obvious behavior, so it should be documented at
https://docs.python.org/3.5/library/argparse.html?highlight
Roy Smith added the comment:
Just for the archives:
https://bugs.chromium.org/p/chromium/issues/detail?id=1022011
--
___
Python tracker
<https://bugs.python.org/issue38
Roy Smith added the comment:
Yeah, that's weird. Looks like this may be a Chrome bug. I'm seeing it in
Chrome (Version 77.0.3865.90 (Official Build) (64-bit)), but not Safari. This
is on MacOS (High Sierra).
In the attached screenshot, I narrowed the window a bit. In the second
New submission from Roy Smith :
In https://docs.python.org/3.5/reference/import.html#importsystem, section "5.2
Packages", second sentence, the word "naming" is broken across two lines.
In 3.7.5rc1 as well. Didn't check any others.
--
assignee: docs@python
compo
lowup" NOT "reply"
Sorry I can't help you on your initial problem
Regards,
Chris Roy-Smith
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 09 Jul 2017 21:47:58 -0500, John Black wrote:
> In article <477bde19-0653-4e41-a717-0efe90ac5...@googlegroups.com>,
> timetowal...@gmail.com says...
>>
>> I use https://groups.google.com/forum/#!forum/comp.lang.python to look
>> over message posts.
>>
>> What's with all of the Case
In article mjaqqd$t0m$1...@news.albasani.net,
Johannes Bauer dfnsonfsdu...@gmx.de wrote:
so that textwrap.wrap() breks non-breaking spaces, is this a bug or
intended behavior?
I opened http://bugs.python.org/issue16623 on this a couple of years
ago. Looks like it was being worked
In article 550bbfc1$0$13010$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I cannot remember the details, and I don't have my copy of the Apple
Standard Numerics manual here to look it up
Amongst the details you don't remember is the correct
In article am4cga9sn16m74v1952gnfq5u443mkk...@4ax.com,
Mario Figueiredo mar...@gmail.com wrote:
What makes you think your anedoctal bugs constitute any sort of
evidence this programming language isn't ready to be used by the
public?
There's several levels of ready.
I'm sure the core
In article 8c09473e-92df-40ac-b083-d2b3a2b75...@googlegroups.com,
Xrrific xiaok...@gmail.com wrote:
Guys, please Help!!!
I am trying to impress a girl who is learning python and want ask her out at
the same time.
Could you please come up with something witty incorporating a simple
In article clhf9mfn89...@mid.individual.net,
Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
But in documentation, in contexts where it's not critical,
I'm more likely to use the spelling I'm most familiar
with, which is colour. I can't imagine any English
speaker, native or otherwise,
In article mailman.19183.1424872728.18130.python-l...@python.org,
Sturla Molden sturla.mol...@gmail.com wrote:
On 24/02/15 22:34, Roy Smith wrote:
http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm
-is-broken-and-how-to-fix-it/
This is awful. It is broken
http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
--
https://mail.python.org/mailman/listinfo/python-list
In article mpg.2f4beb20faeff072989...@nntp.aioe.org,
Mario Figueiredo mar...@gmail.com wrote:
It's not been an easy ride trying to decide whether or not to use super.
I started learning python from a Mark Lutz book that advised me against
it.
I'm curious, what were the arguments against
In article mailman.18388.1422845124.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Feb 2, 2015 at 1:35 PM, Matthew Barnett
auxl...@mrabarnett.plus.com wrote:
And the plural of virus is viruses, not viri (that's the plural of
vir) or virii (that would be the
In article 54ceda0b$0$12977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
What is the plural of octopus?
It's a trick question. Octopus is already plural. Monopus is singular.
--
https://mail.python.org/mailman/listinfo/python-list
In article 54c3a0c1$0$13013$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Tim Chase wrote:
On 2015-01-24 17:21, Steven D'Aprano wrote:
# Cobra
def sqroot(i as int) as float
# Python
def sqroot(i:int)-float:
Cobra's use of
In article 54bb2c5f$0$12977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
You know that two-factor authentication doesn't offer any real security
against Man In The Middle attacks?
The fact that TFA doesn't solve all problems doesn't change
In article 54ba3654$0$13008$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Good reasons for using global variables are few and far between. Just about
the only good reason for using global variables that I can think of is if
you have one or
In article 54ba39e0$0$13008$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Every time I think I would like to learn a new language, I quite quickly run
into some obvious feature that Python has but the newer language lacks, and
I think bugger
In article mailman.17811.1421497179.18130.python-l...@python.org,
Skip Montanaro skip.montan...@gmail.com wrote:
On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen
jpiit...@ling.helsinki.fi wrote:
How far do you want to go? Is a b + c the same as a(b) + c or the
same as a(b + c)?
I
In article 54ba5a25$0$12991$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Whitespace is significant in nearly all programming languages, and so it
should be. Whitespace separates tokens, and lines, and is a natural way of
writing (at least for
In article 54bb1c83$0$12979$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Even that doesn't protect you, because your security is controlled by
websites and banks etc. with stupid security policies. E.g. I am forced to
deal with one bank that
In article 87zj9kb2j0@elektro.pacujo.net,
Marko Rauhamaa ma...@pacujo.net wrote:
Skip Montanaro skip.montan...@gmail.com:
Beautiful is better than ugly.
Yes, our job is to increase the Harmony of the Universe. Useful
applications are happy side effects.
Explicit is better than
yawar.a...@gmail.com wrote:
I have implemented what I believe is a
fairly robust, if ugly-looking, native Python module
I don't know which zen this is, but Beauty is important.
--
https://mail.python.org/mailman/listinfo/python-list
In article mailman.17109.1419228400.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 22, 2014 at 4:42 PM, Ganesh Pal ganesh1...@gmail.com wrote:
(a) I was trying to reduce the below piece of code using List comprehension
? Any suggestion please let me know
In article 0udf9a1m3n02rt06a5ib58mvifm7sde...@4ax.com,
Steve Hayes hayes...@telkomsa.net wrote:
On Mon, 22 Dec 2014 09:51:02 +1100, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Tony the Tiger wrote:
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote:
I am in
In article 5497e1d5$0$12978$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Steve Hayes wrote:
Yes, my initial reaction was that's awesome.
And my second thought was that it was scary.
I ran it. It worked, and printed Hello world. I
In article 87egrrrf2i@elektro.pacujo.net,
Marko Rauhamaa ma...@pacujo.net wrote:
Roy Smith r...@panix.com:
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 :-)
Speaking of trust and AWS, Amazon adminsâ
In article mailman.17133.1419276169.18130.python-l...@python.org,
Tim Chase python.l...@tim.thechases.com wrote:
On 2014-12-22 19:05, MRAB wrote:
On 2014-12-22 18:51, Mark Lawrence wrote:
I'm having wonderful thoughts of Michael Palin's favourite Python
sketch which involved fish
In article 54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Obviously you don't write obfuscated code like this for production use,
except in such cases where you deliberately want to write obfuscated code
for production use.
In article mailman.17098.1419207020.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith r...@panix.com wrote:
Heh. I once worked on a C++ project that included its own crypo code
(i.e. custom implementations of things like AES
In article mailman.16944.1418561416.18130.python-l...@python.org,
1248283...@qq.com wrote:
I want to delete the file names.txt if it exits in /home/names.txt in my
remote vps server.
import paramiko
host = vps ip
port = 22
transport = paramiko.Transport((host, port))
password = key
On 15/12/14 10:21, Simon Evans wrote:
Dear Jussi, and Billy
I have changed the input in accordance with your advice, re:
--
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
here the user
In article mailman.16880.1418342293.18130.python-l...@python.org,
Ian Kelly ian.g.ke...@gmail.com wrote:
I never said that functions can't be used as namespaces. I said that
functions are *bad* namespaces, and I gave reasons why I think this is true.
An excellent example of functions acting
In article 54878f8a$0$13010$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I really think you guys are trying too hard to make this function seem more
complicated than it is. If you find it so hard to understand a simple
function with four
In article 5485721c$0$2817$c3e8da3$76491...@news.astraweb.com,
Steven D'Aprano st...@pearwood.info wrote:
On Mon, 08 Dec 2014 11:35:36 +1100, Chris Angelico wrote:
On Mon, Dec 8, 2014 at 11:27 AM, Roy Smith r...@panix.com wrote:
Although, to be honest, I'm wondering if this is more
Chris Angelico wrote:
I'm actually glad PEP 479 will break this kind of code. Gives a good
excuse for rewriting it to be more readable.
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
What kind of code is that? Short, simple, Pythonic and elegant? :-)
Here's the code again,
In article mailman.16689.1417996247.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Dec 8, 2014 at 10:33 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
How would we re-write this to work in the future Python 3.7? Unless I have
missed something,
In article mailman.16690.1417998873.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
Next problem, what the heck is res? We're not back in the punch-card
days. We don't have to abbreviate variable names to save columns.
Variable names are supposed to describe what
In the process of refactoring some code, I serendipitously created what I think
is an essential new bit of Python syntax. The “or else” statement. I ended up
with:
sites_string = args.sites or else self.config['sites']
which, of course, is a syntax error today, but it got me thinking
In article mailman.16498.1417544472.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Wed, Dec 3, 2014 at 4:41 AM, Zachary Ware
zachary.ware+pyl...@gmail.com wrote:
On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote:
Wouldnât it be neat to write
In article 1248a112-88fd-4346-a733-7716671b8...@googlegroups.com,
reetesh nigam nigamreetes...@gmail.com wrote:
I need to read xml attributes coming in response data. I am using Django rest
framework.
requested XML : myTagxyz verified=N product=ABC
startDate=02-02-2014//myTag
In article mailman.16191.1416757555.18130.python-l...@python.org,
Skip Montanaro skip.montan...@gmail.com wrote:
But it breaks all the picture that I've built in my head about comps till
now...
Note that list comprehensions are little more than syntactic sugar for for
loops. If you're
] for key in keys] for line in results]
but I'm glad to report that this was merely some third-party code that I
imported into our repo. Whew, that was close!
On Nov 23, 2014, at 11:45 AM, Skip Montanaro wrote:
On Sun, Nov 23, 2014 at 9:57 AM, Roy Smith r...@panix.com wrote
In article 87y4r348uf@elektro.pacujo.net,
Marko Rauhamaa ma...@pacujo.net wrote:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info:
You haven't given any good reason for objecting to calling Unicode
strings by what they are. Maybe you think that it is an implementation
detail,
In article mailman.16011.1416478357.18130.python-l...@python.org,
Robin Becker ro...@reportlab.com wrote:
I need to pack circles into a partial annulus ie part of a larger circle
bounded by two radii [...]
Circle packing is hard so I'm thinking of using some kind of spring/repulsion
model
In article mailman.15887.1416150791.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
UDP for anything more than your network's MTU is inefficient
Why do you say it's inefficient? Sure, the UDP datagram will get
fragmented and re-assembled at the other end, but it's not
In article mailman.15913.1416175276.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Nov 17, 2014 at 8:32 AM, Abdul Abdul abdul.s...@gmail.com wrote:
from PIL import Image
import os
for inputfile in filelist
outputfile =
In article 54694389$0$13001$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Chris Angelico wrote:
You should be able to use two semicolons, that's equivalent to one colon
right?
ChrisA
(No, it isn't, so don't take this advice.
New submission from Roy Smith:
At https://docs.python.org/2/library/hmac.html, hmac.new() is shown as
hmac.new(key[, msg[, digestmod]])
This implies that digestmod can only be given if msg is given. This is
incorrect. Either can be given without the other.
--
assignee: docs@python
In article mailman.15769.1415869145.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Thu, Nov 13, 2014 at 7:47 PM, Cameron Simpson c...@zip.com.au wrote:
My view is that if there's a main (i.e. the module implements a small app
all on its own, however tiny), then the
In article mailman.15778.1415890500.18130.python-l...@python.org,
Lie Ryan lie.1...@gmail.com wrote:
On 13/11/14 03:57, Larry Martell wrote:
We were all making this much harder than it is. I ended up doing this:
wp = urllib.request.urlopen('http://php_page/?' + request.POST.urlencode())
In article mailman.15802.1415923204.18130.python-l...@python.org,
Ben Finney ben+pyt...@benfinney.id.au wrote:
satishmlm...@gmail.com writes:
import os
os.write(1, b'Hello descriptor world\n')
OSError: Bad file descriptor
It works fine for me::
import os
os.write(1,
In article m3tscl$f1e$2...@dont-email.me,
Denis McMahon denismfmcma...@gmail.com wrote:
Hi
Given x,y are a lists of keys and value that I wish to combine to a
dictionary, such that x[n] is the key for value y[n], which is preferred:
z = {a:b for (a,b) in zip(x,y)}
z = {x[n]:y[n] for n
In article i0h06a9pj8h3olo5rnrgc64i7ckpvtv...@4ax.com,
Steve Hayes hayes...@telkomsa.net wrote:
I have a book on Python that advocates dividing programs into modules, and
importing them when needed.
Yes, this is a good idea. Breaking your program down into modules, each
of which does a
In article mailman.15627.1415636743.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Tue, Nov 11, 2014 at 3:11 AM, Grant Edwards invalid@invalid.invalid
wrote:
I know, but in c.l.p, even jokes get nicely pednatic answers.
And in c.l.p, odd jokes get even more
In article b509998d-c547-4638-8810-0388c0894...@googlegroups.com,
sohcahto...@gmail.com wrote:
Please help me this assignment is due in an hour. Don't give me hints, just
give me the answer because I only want a grade. I'm not actually interested
in learning how to program, but I know
In article 545d76fe$0$12980$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
The following list comprehension and generator expression are almost, but
not quite, the same:
[expr for x in iterable]
list(expr for x in iterable)
The
In article 54521c8f$0$12982$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Anton wrote:
Let's say I have an incoming list of values *l*. Every element of *l* can
be one of the following options:
1) an integer value
2) a string in form
In article mailman.15221.1414379336.18130.python-l...@python.org,
Cameron Simpson c...@zip.com.au wrote:
The is test is more direct and less subject to iffiness because the longer
expression using id() leaves more scope/time for things to change, and of
course id itself can be rebound to
In article 544e2cf2$0$13009$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Roy Smith wrote:
Yes and no. If something goes wrong in a .write() method,
is not Python supposed to raise an error? (!)
Define wrong. It is not an error
In article 683c84d8-d916-4b63-b4b2-92cd2763e...@googlegroups.com,
wxjmfa...@gmail.com wrote:
Le dimanche 26 octobre 2014 14:41:43 UTC+1, Dan Sommers a écrit :
On Sun, 26 Oct 2014 00:45:49 -0700, wxjmfauth wrote:
Ditto for fileobj.write(). Why should it return something ?
with
In article mailman.14792.1413133694.18130.python-l...@python.org,
Shiva shivaji...@yahoo.com wrote:
Why is the second part of while condition not being checked?
while ans.lower() != 'yes' or ans.lower()[0] != 'y':
ans = input('Do you like python?')
My intention is if either of the
In article h2j33adothf9uctcdp5psqk2cclr019...@4ax.com,
Seymore4Head Seymore4Head@Hotmail.invalid wrote:
For the record, I don't want a hint. I want the answer.
42.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Sep 30, 2014 1:50 PM CEST Jean-Michel Pichavant wrote:
I'm currently writing a presentation to help my co-workers ramp up on new
features of our tool (written in python (2.7)).
I have some difficulties presenting code in an efficient way (with some
basic syntax highlights). [...]
In article mailman.14101.1411042251.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Thu, Sep 18, 2014 at 9:55 PM, cool-RR ram.rac...@gmail.com wrote:
My function gets an iterable of an unknown type. I want to check whether
it's ordered. I could check whether it's a
In article mailman.14103.1411047208.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
The one thing you can rely on (and therefore must comply with, when
you design an iterable) is that iteration will hit every element
exactly once.
Does it actually say that somewhere?
In article mailman.13850.1410102277.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
You can't store a list in memory; what you store is a set of bits
which represent some metadata and a bunch of pointers.
Well, technically, what you store is something which has the
In article mailman.13780.1409884245.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Fri, Sep 5, 2014 at 12:24 PM, Rustom Mody rustompm...@gmail.com wrote:
On Thursday, September 4, 2014 7:38:40 PM UTC+5:30, Chris Angelico wrote:
So a fairer comparison is: How many
In article 54049ab7$0$29972$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
import tempfile
def edit(editor, content=''):
f = tempfile.NamedTemporaryFile(mode='w+')
[...]
command = editor + + f.name
status =
In article mailman.13604.1409316126.18130.python-l...@python.org,
Frank Millman fr...@chagford.com wrote:
The project is inherently database-driven. The python code expects to find
certain tables and columns in the database. As I develop new features, I
sometimes need to modify the database
In article mailman.13623.1409351910.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Sat, Aug 30, 2014 at 5:02 AM, Ethan Furman et...@stoneleaf.us wrote:
Speaking of suckitude, we could classify technologies that way:
xml: major suckitude
rpc: no suckitude
In article 63bdccb4-9e34-4e40-b07d-14342e218...@googlegroups.com,
peter peter.mos...@talk21.com wrote:
I used to struggle with the concept of ''.join(('hello ','world')) - it
seemed so convoluted compared with the intuitive 'hello '+'world', and I
could never remember the syntax. Also, for
In article d8811b7e-fc37-447c-848d-f3bd314af...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
Heh! You make it sound that the character model is the most important thing
in choosing a language!
There are people using Fortran -- with not intention of finding
an alternative.
In article cb2aff1b-c091-48b5-90f5-d82c6060b...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
On Monday, August 25, 2014 5:36:25 PM UTC+5:30, Roy Smith wrote:
Rustom Mody wrote:
Heh! You make it sound that the character model is the most important
thing
in choosing
In article 53eee06a$0$29984$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
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
In article lsm8ic$j90$1...@online.de,
Philipp Kraus philipp.kr...@flashpixx.de wrote:
found = re.search( a
href=\/projects/boost/files/latest/download\?source=files\
title=\/boost/(.*),
Utilities.URLReader(http://sourceforge.net/projects/boost/files/boost/;)
)
if found == None :
In article lsmeej$49n$1...@online.de,
Philipp Kraus philipp.kr...@flashpixx.de 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
In article mailman.12994.1408021090.18130.python-l...@python.org,
Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Thu, 14 Aug 2014 17:47:00 +1000, Cameron Simpson c...@zip.com.au
declaimed the following:
Your Android phone will be running some flavour of Linux I believe. Someone
who
In article 53ec2453$0$2299$426a7...@news.free.fr,
YBM ybm...@nooos.fr.invalid wrote:
Le 14/08/2014 04:16, Tim Chase a écrit :
On 2014-08-13 21:01, Tim Chase wrote:
On 2014-08-14 09:46, luofeiyu wrote:
s=Aug
how can i change it into 8 with some python time module?
import time
In article a8f10c4f-d4a0-48ed-ae92-2a43e9a09...@googlegroups.com,
Simon Evans musicalhack...@yahoo.co.uk wrote:
Dear Programmers,
I have been looking at the You tube 'Web Scraping Tutorials' of Chris Reeves.
I have tried a few of his python programs in the Python27 command prompt, but
In article 53eaab7d$0$29979$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
By studying how other scraping programs work, and studying how your racing
pages store data, you should be able to put the two together and see how to
get the data you
In article mailman.12903.1407893523.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
I like to look at SQL as a language that specifies an end result
without specifying how to get there
Well, sure, but sometimes the how to get there is a matter of 10x, or
100x, or 1000x
In article b3c69a72-5f0c-4e2a-8ef0-91842e12c...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
A C programmer asked to swap variables x and y, typically writes something
like
t = x; x = y; y = t;
Fine, since C cant do better.
Sure C can do better.
x = x ^ y
y = y ^ x
x = x
In article mailman.12816.1407668534.18130.python-l...@python.org,
Dave Angel da...@davea.name wrote:
Your simplest answer is probably to write a function that converts
a string like you have into a datetime object, say call it
converter (). Then after testing it, you call
min (dates, key
In article b5ac5b12-cda7-464e-9c14-63ef184a7...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
They haven't figured out yet that the
first step to solving a problem is to decide what algorithms you're
going to use, and only then can you start translating that into code.
In article 154cc342-7f85-4d16-b636-a1a953913...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
l= [6,2,9,12,1,4]
sorted(l,reverse=True)[:5]
[12, 9, 6, 4, 2]
No need to know how sorted works nor [:5]
Now you (or Steven) can call it abstract.
And yet its
1. Actual
In article mailman.12827.1407702752.18130.python-l...@python.org,
Mark Lawrence breamore...@yahoo.co.uk wrote:
On 10/08/2014 19:26, Rustom Mody wrote:
Its when we have variables that are assigned in multiple places that
we start seeing mathematical abominations like
x = x+1
I'm not
In article 338e8fb0-c9ec-462a-b560-1c1ff77de...@googlegroups.com,
Rustom Mody rustompm...@gmail.com wrote:
[To the OP]
Yeah I am in the minority at least out here in considering
comprehensions simpler than loops. Take your pick
When comprehensions first came out, I stubbornly refused to get
Roy Smith added the comment:
How about something like this:
Note: The current iglob() implementation is optimized for the case of many
files distributed in a large directory tree. Internally, it iterates over the
directory tree, and stores all the names from each directory at once
1 - 100 of 2572 matches
Mail list logo