Thanks everyone. That's a thorough enough explanation for me.
--
https://mail.python.org/mailman/listinfo/python-list
On Monday, 20 October 2014 18:56:05 UTC+1, Ian wrote:
Rather, I'm saying that where the blank line is should be the start of
a new function. There would still be a blank line, just no longer
inside the function.
Now, maybe you think there should be more blank lines in the above, in
which
On Saturday, 18 October 2014 11:53:16 UTC+1, Steven D'Aprano wrote:
I'm curious what aspect of idiomatic Perl code you are referring to. When
people talk about Perl code dismissively, I normally think of three things:
- excessively long one-liners;
- excessive use of symbols and sigils
On Wednesday, 15 October 2014 19:39:43 UTC+1, Shiva wrote:
I am trying to search a string through files in a directory - however while
Python script works on it and writes a log - I want to present the user with
count of number of strings found. So it should increment for each string
found.
On Wednesday, 15 October 2014 20:31:15 UTC+1, Ian wrote:
I agree. I very rarely use blank lines inside functions. As I see it,
if you feel you need a blank line for separation within a function,
that's an indication your function is overly complex and should be
broken up.
Whereas I feel that
On Thursday, 16 October 2014 15:05:47 UTC+1, Ian wrote:
I would have suggested a Counter if I thought it fit the OP's use
case. If you're listing directory contents, you're not going to have
any repeated strings, so all the counts will be 1, and your Counter
might as well be a list, which is
, it derives common usage
from a corpus of English used around the world:
http://www.oxforddictionaries.com/words/what-are-the-main-differences-between-the-oed-and-odo
http://www.oxforddictionaries.com/words/the-oxford-english-corpus
Simon
--
https://mail.python.org/mailman/listinfo/python-list
Hi guys ..
Uhm, ı have to download youtube videos ı was tried urlretrive but doesn't work
ı have no idea that's why.So there is my question, we cant donwload youtube
videos directly ? .
--
https://mail.python.org/mailman/listinfo/python-list
a Computer Scientist - Learning with Python 3:
http://openbookproject.net/thinkcs/python/english3e/
If you're after a printed book, the original (I believe) author's current
version is here:
http://www.greenteapress.com/thinkpython/thinkpython.html
Simon
--
https://mail.python.org/mailman/listinfo
type (Christoph Reiter) (#727810)
- GLib.GError and GLib.Error are now unified (Simon Feltman) (#712519)
- Non-introspected signals support marshaling cairo objects
(Simon Feltman) (#694604)
- GTypeClass methods show up as Python GObject class methods
(Johan Dahlin) (#685218
New submission from Simon Zack:
Functions added by addTypeEqualityFunc is not used for comparing list elements
in assertListEqual, and only used in assertEqual.
It would be nice to have assertListEqual use functions added by
addTypeEqualityFunc for comparisons of list elements. I think
Changes by Simon Zack simonz...@gmail.com:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22452
___
___
Python-bugs-list
New submission from Simon Weber:
When dealing with implicit relative imports of the form import
dotted_as_names as..., the 2to3 import fixer will rewrite them as from .
import dotted_as_names as
This is invalid syntax. Here's an example:
$ tree package/
package/
├── __init__.py
replacing it with a tab character. Shift-tab
probably out dented too.
Simon
--
Sent from Kaiten Mail. Please excuse my brevity.
--
https://mail.python.org/mailman/listinfo/python-list
New submission from Simon Zack:
The python unittest module currently uses camel case. This feels rather
inconsistent with the rest of the python library, which is in lower case and
follows PEP8.
Would it be a good idea to add lower-case aliases, and possibly deprecate the
camel case methods
''Oddschecker.com' and
'Bestbetting.com' which is what I am interested in working on.
Hope you can help.
Yours Simon Evans.
--
https://mail.python.org/mailman/listinfo/python-list
I am going wrong.
Yours faithfully
Simon Evans.
import urllib
import re
htmlfile = urllib.urlopen(http://www.racingpost.com/horses2/cards/card.sd?
race_id=600048r_date=2014-05-08#raceTabs=sc_)
htmltext
On Tuesday, August 12, 2014 9:00:30 PM UTC+1, Simon Evans 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
altered them from accessing data using links say
to highlight tabs and trailing
spaces.
Simon
--
https://mail.python.org/mailman/listinfo/python-list
tolerate the different style, you can use another tool to reindent your
code.
Simon
--
https://mail.python.org/mailman/listinfo/python-list
#Patterns_for_non-regular_languages
[3]: https://en.wikipedia.org/wiki/Regular_language
Simon
--
Sent from Kaiten Mail. Please excuse my brevity.
--
https://mail.python.org/mailman/listinfo/python-list
I am pleased to announce version 3.12.2 of the Python bindings for
GObject. This is the third release in the stable 3.12.x series for GNOME 3.12.
Download
The new release is available from ftp.gnome.org:
https://download.gnome.org/sources/pygobject/3.12/pygobject-3.12.2.tar.xz (686K)
=
- Unification of GLib.GError and GLib.Error. GLib.Error should be used for any
exception handling while GLib.GError is a compatibility alias.
(Simon Feltman) (#712519)
- New API gi.require_foreign() for ensuring cairo marshalling is supported.
(Simon Feltman) (#707735)
- Automatic marshalling of cairo
Changes by Simon de Vlieger si...@ikanobori.jp:
--
nosy: +ikanobori
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21052
___
___
Python-bugs-list
Dear Programmers,
I downloaded Peazip, which doesn't remove file/ folder hierarchy. I unzipped it
and input the same code to the console and it installed Beautiful Soup 4 okay
re:-
-
Microsoft Windows [Version
Dear Programmers,
As anticipated, it has not been to long before I have encountered further
difficulty. At the top of page 16 of 'Getting Started with Beautiful Soup it
gives code to be input, whether to the Python or Windows command prompt I am
not
sure, but both seem to be resistant to
Dear Programmers, I noticed a couple of typos in my previous message, so have
now altered them thus :-
Dear Programmers,
As anticipated, it has not been to long before I have encountered further
difficulty. At the top of page 16 of 'Getting Started with Beautiful Soup it
gives code to be
I downloaded the get-pip.py file. I installed it to the same folder on my C
drive as the Beautiful Soup one in which the Beautiful Soup 4 downloads was
unzipped to. I changed directory to the folder on the Command Prompt, as you
instructed in step 2. I input the code to the console you gave on
I have input the above code by copy and pasting to the Idle python console, as
the python 2.7 command prompt is fussy about the indentation on the eleventh
line down, if I then indent it, it replies that the indentation is unnecessary
of unexpected, and if I don't it says an indentation is
I have removed the original Beautiful Soup 4 download, that I had unzipped to
my Beautiful Soup directory on the C drive.
I downloaded the latest version of Beautiful Soup 4 from the Crummy site.
I unzipped it, and removed the contents of the unzipped directory and placed
contents in my
Dear Ian, and other programmers, thank you for your advice.
I am resending the last message because this twattish cut and paste facility on
my computer has a knack of chopping off ones original message, I will try to
convey the right message this time :
I have removed the original Beautiful
Hi Ian, thank you for your help.
Yes that is the book by Vineeth J Nair.
At the top of page 12, at step 1 it says :
1.Download the latest tarball from
https://pypi.python.org/packages/source/b/beautifulsoup4/.
So yes, the version the book is dealing with is beautiful soup 4.
I am using Pyhon
The version of Python the book seems to be referring to is 2.7, re: bottom of
page 10-
'Pick the Path variable and add the following section to the Path variable:
;C:\PythonXY for example C:\Python 27'
The version of Beautiful Soup seems to be Beautiful Soup 4 as at the top of
page 12 it
Thank you for your advice. I did buy a book on Python, 'Hello Python' but the
code in it wouldn't run, so I returned it to the shop for a refund. I am going
to visit the local library to see if they have any books on Python. I am
familiar with Java and Pascal, and looking at a few You tubes on
Dear Ian,
The book does recommend to use Python 2.7 (see bottom line of page 10).
The book also recommends to use Beautiful Soup 4.
You are right that in that I have placed the unzipped BS4 folder within a
folder, and I therefore removed the contents of the inner folder and
transferred them to
I did download the latest version of Beautiful Soup 4 from the download site,
as the book suggested.
--
https://mail.python.org/mailman/listinfo/python-list
Thank you everyone who replied, for your help. Using the command prompt
console, it accepts the first line of code, but doesn't seem to accept the
second line. I have altered it a little, but it is not having any of it, I
quote my console input and output here, as it can probably explain
Dear Chris Angelico,
Yes, you are right, I did install Python 3.4 as well as 2.7. I have removed
Python 3.4, and input the code you suggested and it looks like it has installed
properly, returning the following code:-
I have downloaded Beautiful Soup 3, I am using Python 2.7. I understand from
your message that I ought to use Python 2.6 or Python 3.4 with Beautiful Soup
4, the book I am using 'Getting Started with Beautiful Soup' is for Beautiful
Soup 4. Therefore I gather I must re-download Beautiful Soup
Yeah well at no point does the book say to start inputting the code mentioned
in Python command prompt rather than the Windows command prompt, but thank you
for your guidance anyway.
I have downloaded the latest version of Beautiful Soup 4, but am again facing
problems with the second line of
On Monday, May 12, 2014 12:19:24 AM UTC+1, Simon Evans wrote:
Yeah well at no point does the book say to start inputting the code mentioned
in Python command prompt rather than the Windows command prompt, but thank
you for your guidance anyway.
I have downloaded the latest version
- but wait a moment 'BeautifulSoup4 works with 2.6+ and 3.x'(Terry Reedy) -
doesn't 2.6 + = 2.7, which is what I'm using with BeautifulSoup4.
--
https://mail.python.org/mailman/listinfo/python-list
I am new to Python, but my main interest is to use it to Webscrape. I have
downloaded Beautiful Soup, and have followed the instruction in the 'Getting
Started with Beautiful Soup' book, but my Python installations keep returning
errors, so I can't get started. I have unzipped Beautiful Soup to
I'd like to make a C memory buffer available inside Python via the Python C/API
without copying that memory into Python. How to do this? I've read [1] but it's
not clear that this functionality exists. In javascript it's possible using
String::NewExternal() [2].
Creates a new external string
I'd like to make a C memory buffer available inside Python via the Python C/API
without copying that memory into Python. How to do this? I've read [1] but it's
not clear that this functionality exists. In javascript it's possible using
String::NewExternal() [2].
Creates a new external string
Simon Zack added the comment:
The problem is still present in python 3.4 with mingw gcc 4.8.2. I was having
trouble with compiling radare2's python swig bindings.
The solution described here:
http://ascend4.org/Setting_up_a_MinGW-w64_build_environment#Setup_Python_for_compilation_of_extensions
was wondering if anybody
in this group has experience writing extension libraries for Python? Could you
help? Or could we collaborate? Thanks and all the best, Simon
[1] https://github.com/simonhf/sharedhashfile
[2]
http://www.quora.com/Inter-Process-Communication-1/Whats-a-good-library-to-share-a-key
New submission from Simon Jagoe:
At Enthought we have been tracking a deadlock in some code that turned out to
be due to the following scenario:
0) There is some cyclic garbage that requires collection; an object in the
garbage is referred to by a weakref with a callback
1) You have
Simon Cross added the comment:
Genshi is affected by the 3.4 regression too (it has a class that defines
__getnewargs__ and __getattr__).
--
nosy: +hodgestar
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16251
Simon Cross added the comment:
I have an ugly work-around for those affected:
def __getattr__(self, name):
# work around for pickle bug in Python 3.4
# see http://bugs.python.org/issue16251
if name == __getnewargs_ex__:
raise AttributeError(%r has
and
almost never worry about performance unless something is actually slow in a way
that affects something..
Warm regards,
~Simon
[1] http://hg.python.org/cpython/file/3a1db0d2747e/Lib/idlelib/PyShell.py#l117
--
https://mail.python.org/mailman/listinfo/python-list
hope I can be of use with IDLE. I've been using it for years now. :)
Warm regards,
~Simon
--
http://phoenixbureau.org/
http://phoenixbureau.org/blog.html
http://twitter.com/SimonForman
The history of mankind for the last four centuries is rather like that of
an imprisoned sleeper
Usenet
and how it's not Google Groups.)
I really hope I can be of use with IDLE. I've been using it for years now. :)
Warm regards,
~Simon
--
http://phoenixbureau.org/
http://phoenixbureau.org/blog.html
http://twitter.com/SimonForman
The history of mankind for the last four centuries
I ran across this and I thought there must be a better way of doing it, but
then after further consideration I wasn't so sure.
if key[:1] + key[-1:] == '': ...
Some possibilities that occurred to me:
if key.startswith('') and key.endswith(''): ...
and:
if (key[:1], key[-1:]) == ('',
For the record I wasn't worried about the performance. ;-)
It was for Tkinter event strings not markup tags.
I'm glad this was the time winner!
key and key[0] == '' and key[-1] == ''
Cheers to the folks who did the timings (and saved me from the trouble!)
Last but not least...
-3.11.5.tar.xz (680K)
sha256sum: 26458b012e5d443d9b4a81d9eb9ad3207f5f050c962f5bd09f16aa034d284685
What's new in PyGObject 3.11.5
=
- cache refactoring: Move all cache marshalers into files based on type
(Simon Feltman) (#709700)
- tests: Add test for an owned boxed
: 073bc913bfafcbdad5578a976022d60c4f13707489e7fb83c492ca17327e9ab7
What’s new since PyGObject 3.11.4
=
- Add enum and flags member methods (Simon Feltman) (#693099)
- overrides: Fix __repr__ for various Gdk structs (Simon Feltman)
- python.m4: g/c JD_PYTHON_CHECK_VERSION (Patrick
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
New submission from Simon Sapin:
When given a file-like object, html5lib calls .read(0) in order to check if the
result is bytes or Unicode:
https://github.com/html5lib/html5lib-python/blob/e269a2fd0aafcd83af7cf1e65bba65c0e5a2c18b/html5lib/inputstream.py#L434
When given the result
Simon Sapin added the comment:
Adding a proposed patch.
--
keywords: +patch
Added file: http://bugs.python.org/file33179/python-issue20007.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20007
Simon Sapin added the comment:
html5lib issue: https://github.com/html5lib/html5lib-python/issues/127
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20007
Simon Sapin added the comment:
I could reproduce on 3.3.3 and tip, but not 3.2.3 or 2.7.6.
--
versions: +Python 3.5 -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20007
Simon Weber added the comment:
That sounds much clearer. Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19789
___
___
Python-bugs-list
New submission from Simon Weber:
In http://bugs.python.org/issue14864, this line was added to the
logging.disable docstring:
To undo the effect of a call to logging.disable(lvl), call
logging.disable(logging.NOTSET).
To prevent misunderstanding, I propose that this line be changed
I am pleased to announce version 3.11.2 of the Python bindings for
GObject. This is the second alpha release of the 3.11.x series for GNOME 3.12.
An important change with this release is deprecation messages are
emitted when using positional arguments with overridden initializers.
Positional
Mark Lawrence breamore...@yahoo.co.uk wrote in message
news:mailman.2752.1384654581.18130.python-l...@python.org...
All the references regarding the subject that I can find, e.g.
http://stackoverflow.com/questions/1829872/read-datetime-back-from-sqlite-as-a-datetime-in-python,
talk about
Simon Naish added the comment:
I am using double backslashes in my path.
But logger\config.py is losing them, please re-read the issue description,
logger\config.py is part of the python libraries!
--
___
Python tracker rep...@bugs.python.org
http
New submission from Simon Naish:
When attempting to use a config file with logging to set up a series of loggers
in a script, when running on windows, if the config file name starts with an
'r' then the script fails with the following error:-
File C:\Users\simon\Documents\python dev
Simon Naish added the comment:
Example proggie.
It writes its own config file (really_cool_logging.conf), then attempts to read
it, all to ~/testlog
If you inherit from the class FileLogger with any other class you get instant
access to self.log.any logger command which will write debug
Simon Naish added the comment:
Updated TestFileLogger, missed a line out in my rush to get you something,
sorry!
--
Added file: http://bugs.python.org/file32545/TestFileLogger.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Simon Naish added the comment:
And again. Damn!
--
Added file: http://bugs.python.org/file32546/TestFileLogger.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
Simon Naish added the comment:
Hi Peter,
Oh well spotted!
Fair enough, but that is seriously not obvious, thanks.
Si
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19528
and easier to use for
someone not used to database work. I would also use a many to many table
being familiar with normal forms but it is not a neccessity.
Paul Simon
--
https://mail.python.org/mailman/listinfo/python-list
Nick the Gr33k nikos.gr...@gmail.com wrote in message
news:l50oo5$k05$1...@dont-email.me...
1/11/2013 7:07 ??, ?/? Paul Simon ??:
If you have a list of values of the same type, but different values,
you need a new table with a foreign key to the table it relates
Changes by Simon Charette charett...@gmail.com:
--
nosy: +charettes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11798
___
___
Python-bugs-list
New submission from Simon Feltman:
This was a bit unexpected as memoryviews support all the methods of the
Sequence abstract base class:
import collections
b = bytearray(b'asdf')
isinstance(b, collections.Sequence)
True
m = memoryview(b)
isinstance(m, collections.Sequence)
False
It would
/pygobject/3.9/pygobject-3.9.5.tar.xz (652K)
sha256sum: e785e24b001517dd57fc5cc2b7ddeb56b459555307561675edb47c11c80a85d5
What’s new since PyGObject 3.9.3
- Ensure exceptions set in closure out argument marshaling are printed
(Simon Feltman) (#705064
Simon Nicolussi added the comment:
Requests 1.2.1 has been released to address this issue. An origin_req_host
property has been added to the request object as a workaround.
The original problem of mismatched documentation and behaviour still persists
New submission from Simon Nicolussi:
A fix for a DeprecationWarning (#17678) had the unfortunate side effect of
changing the expected interface of the request object higher up in the call
stack.
For example, the documentation for CookieJar.add_cookie_header(request) states
that the request
Simon Conseil added the comment:
thanks everybody !
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17915
___
___
Python-bugs-list mailing list
New submission from Simon Conseil:
There is an encoding issue between codecs.open and sax (see attached file). The
issue is reproducible on Python 3.3.1, it is working fine on Python 3.3.0
--
components: Library (Lib)
files: report.txt
messages: 188508
nosy: sconseil
priority: normal
://allenbrowne.com/ser-48.html ?
If there are indices and especially linked primary and foreign keys its
much more complicated than that. One has to delve into Access container
structures etc. As far as I know it has to be done from Access.
Paul Simon
--
http://mail.python.org/mailman/listinfo
rusi rustompm...@gmail.com wrote in message
news:92551c63-1347-4f1a-9dca-d1bbd5e4d...@ys5g2000pbc.googlegroups.com...
Its hard to distinguish what you are saying from what I said because
you've lost the quotes.
On Apr 15, 9:01 pm, Paul Simon psi...@sonic.net wrote:
rusi rustompm...@gmail.com
all the
way through it yet.)
There are many interesting avenues to explore from here, and I personally
am just beginning, but this seems like something worth reporting.
Warm regards,
~Simon Peter Forman
[1] http://en.wikipedia.org/wiki/Laws_of_Form
[2] research.microsoft.com/en-us/people
Changes by Simon Cross hodges...@gmail.com:
--
nosy: +hodgestar
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17423
___
___
Python-bugs-list
Simon Wagner added the comment:
I compared the file in http://hg.python.org/cpython/file/3.3/Lib/zipfile.py
with the zipfile.py that is distributed with
http://www.python.org/ftp/python/3.3.0/python-3.3.0.msi
They differ in several places. I checked several times, so this is either an
error
Simon Wagner added the comment:
yep, those match. Sorry for the inconvenience.
So I will have to wait a while before I can use long path names.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17392
Changes by Simon Wagner wagner.si...@web.de:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17392
New submission from Simon Wagner:
Wrong version of zipfile.py is packaged with the Windows installer for Python
3.2 and 3.3. It seems to be the version from 3.1.
Other files might also be wrong, I did not check.
--
components: Installation, Windows
messages: 183892
nosy: Simon.Wagner
Simon Baird added the comment:
https://github.com/search?q=%22TAU+%3D+2+%2A+Math.PI%22type=Code
https://github.com/search?q=%22TAU+%3D+PI+*+2%22type=Code
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12345
On Feb 4, 2013 4:27 PM, nn prueba...@latinmail.com wrote:
On Feb 4, 10:10 am, Chris Angelico ros...@gmail.com wrote:
This isn't particularly related to the post I'm quoting, it's more a
point of curiosity.
On Mon, Feb 4, 2013 at 10:53 AM, João Bernardo jbv...@gmail.com wrote:
Re:
Simon Law added the comment:
Raymond, looking at your patch, can we assert that deque-leftblock is never
equal to deque-rightblock? If not, you need to use memmove() instead of
memcpy(), which is unsafe for overlapping arrays.
It is not clear to me that this invariant is true. At the very
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote in message
news:50ea28e7$0$30003$c3e8da3$54964...@news.astraweb.com...
On Sun, 06 Jan 2013 19:44:08 +, Joseph L. Casale wrote:
I have a dataset that consists of a dict with text descriptions and
values that are integers. If
/pigeoncomputer
Warm regards,
~Simon P. Forman
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
Changes by Simon Law sfl...@sfllaw.ca:
--
nosy: +sfllaw
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9974
___
___
Python-bugs-list mailing list
New submission from Simon Feltman:
This is a feature request to include a WeakMethod or similar object to the
weakref module. The object decomposes a bound method and holds a weakref to the
object and unbound function. This can be a very useful utility in signal and ui
based programming
Simon Feltman added the comment:
Indeed a duplicate of: http://bugs.python.org/issue14631
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16452
Simon Feltman added the comment:
Just a note this is also referred to as a WeakMethod by some folks (so this
ticket shows up in those searches). See also:
http://bugs.python.org/issue813299
http://bugs.python.org/issue7464
http://bugs.python.org/issue16452
Simon Feltman added the comment:
The WeakCallableRef that was attached seemed to support regular functions (or
anything callable) which is nice. The naming also leaves room for a
WeakCallableProxy.
--
___
Python tracker rep...@bugs.python.org
http
Simon Feltman added the comment:
Some more complex examples from various libraries:
https://github.com/django/django/blob/master/django/dispatch/saferef.py
https://github.com/11craft/louie/blob/master/louie/saferef.py
I think both of these originated in pydispatcher
201 - 300 of 1822 matches
Mail list logo