> On 30 Nov 2015, at 03:54, ryguy7272 wrote:
>
> Now, how can I count specific words like 'fraud' and 'lawsuit'?
- convert the page to plain text
- remove any interpunction
- split into words
- see what words occur
- enumerate all the words and increase a counter for each word
Something like t
fl :
> I read several parts on line about Python that everything in Python is
> an object.
Python has two distinct entities: objects and references.
All numbers, strings, classes, modules, class instances, files etc are
objects.
Variables, however, are not objects. They are references. Here are
On 2015-11-30 02:40, Rob Hills wrote:
A program I am writing at present does exactly this and I simply do
multiple calls to string.replace (see below)
On 30/11/15 10:31, Mr Zaug wrote:
I seem to be heading in this direction.
#!/usr/bin/env python
import re
from os.path import exists
script, t
On Sunday, November 29, 2015 at 9:32:22 PM UTC-5, Cem Karan wrote:
> You might want to look into Beautiful Soup
> (https://pypi.python.org/pypi/beautifulsoup4), which is an HTML
> screen-scraping tool. I've never used it, but I've heard good things about
> it.
>
> Good luck,
> Cem Karan
>
> O
In a message of Sun, 29 Nov 2015 21:31:49 -0500, Cem Karan writes:
>You might want to look into Beautiful Soup
>(https://pypi.python.org/pypi/beautifulsoup4), which is an HTML
>screen-scraping tool. I've never used it, but I've heard good things about it.
>
>Good luck,
>Cem Karan
http://coderev
André Roberge writes:
> In Python, a "variable" is a name given to an object. In Python, the
> "=" sign is used to assign a name to an object: the name is on the
> left-hand side, and the object is on the right hand side. Multiple
> names can be assigned to the same object.
Take care with the di
A program I am writing at present does exactly this and I simply do
multiple calls to string.replace (see below)
On 30/11/15 10:31, Mr Zaug wrote:
> I seem to be heading in this direction.
>
> #!/usr/bin/env python
> import re
> from os.path import exists
>
> script, template_file = argv
> print "
On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote:
> Mr Zaug wrote:
>
> > When I run this script on OS X El Capitan, I see,
> >
> > # permission sensitive cache
> > $include "_dispatcher_shared_auth-checker:
> >
> > Was I supposed to incorporate it into the script I poste
You might want to look into Beautiful Soup
(https://pypi.python.org/pypi/beautifulsoup4), which is an HTML screen-scraping
tool. I've never used it, but I've heard good things about it.
Good luck,
Cem Karan
On Nov 29, 2015, at 7:49 PM, ryguy7272 wrote:
> I'm trying to figure out how to count
On Sunday, 29 November 2015 22:06:58 UTC-4, fl wrote:
> Hi,
>
> I read several parts on line about Python that everything in Python is an
> object. Yes, it is a key difference with other languages. Then, I read a page
> it says variables: global and local variable at:
>
> http://www.tutorialspo
On Sun, Nov 29, 2015 at 9:06 PM, fl wrote:
> Hi,
>
> I read several parts on line about Python that everything in Python is an
> object. Yes, it is a key difference with other languages. Then, I read a
> page
> it says variables: global and local variable at:
>
> http://www.tutorialspoint.com/pyt
Hi,
I read several parts on line about Python that everything in Python is an
object. Yes, it is a key difference with other languages. Then, I read a page
it says variables: global and local variable at:
http://www.tutorialspoint.com/python/python_functions.htm
I have a question that whether
On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote:
> Mr Zaug wrote:
>
> > When I run this script on OS X El Capitan, I see,
> >
> > # permission sensitive cache
> > $include "_dispatcher_shared_auth-checker:
> >
> > Was I supposed to incorporate it into the script I poste
On Sunday, November 29, 2015 at 8:12:25 PM UTC-5, Rick Johnson wrote:
> On Sunday, November 29, 2015 at 3:37:34 PM UTC-6, Mr Zaug wrote:
>
> > The items I'm searching for are few and they do not change. They are
> > "CONTENT_PATH", "ENV" and "NNN". These appear on a few lines in a template
> > f
Thanks. That does help quite a lot.
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, November 29, 2015 at 3:37:34 PM UTC-6, Mr Zaug wrote:
> The items I'm searching for are few and they do not change. They are
> "CONTENT_PATH", "ENV" and "NNN". These appear on a few lines in a template
> file. They do not appear together on any line and they only appear once on
> eac
I'm trying to figure out how to count words in a web site. Here is a sample of
the link I want to scrape data from and count specific words.
http://finance.yahoo.com/q/h?s=STRP+Headlines
I only want to count certain words, like 'fraud', 'lawsuit', etc. I want to
have a way to control for speci
In a message of Sun, 29 Nov 2015 13:36:58 -0800, fl writes:
>Hi,
>
>When I search around tutorial about None, I came across this link:
>
>http://jaredgrubb.blogspot.ca/2009/04/python-is-none-vs-none.html
>
>I don't understand what use of this class example:
>
>
>
class Zero(): # a class that i
Mr Zaug wrote:
> When I run this script on OS X El Capitan, I see,
>
> # permission sensitive cache
> $include "_dispatcher_shared_auth-checker:
>
> Was I supposed to incorporate it into the script I posted?
Are you referring to my post? I'm sorry, I can't make sense of your
question.
-
On Sun, 29 Nov 2015 13:36:57 -0800, Mr Zaug wrote:
> result = re.sub(pattern, repl, string, count=0, flags=0);
re.sub works on a string, not on a file.
Read the file to a string, pass it in as the string.
Or pre-compile the search pattern(s) and process the file line by line:
import re
patts
Hi,
When I search around tutorial about None, I came across this link:
http://jaredgrubb.blogspot.ca/2009/04/python-is-none-vs-none.html
I don't understand what use of this class example:
>>> class Zero(): # a class that is zero
...def __nonzero__(self):
... return False
I can onl
I need to use re.sub to replace strings in a text file. I can't seem to
understand how to use the re module to this end.
result = re.sub(pattern, repl, string, count=0, flags=0);
I think I understand that pattern is the regex I'm searching for and repl is
the thing I want to substitute for what
On Sun, 29 Nov 2015 07:05:30 -0800, cescus92 wrote:
> In this day I stumbled upon a very simple task: I had a list of
> instances of a custom class and I had to convert i into a JSON.
That's all well and good, but firstly you need to both dumps and loads to
work properly with json, and secondly
When I run this script on OS X El Capitan, I see,
# permission sensitive cache
$include "_dispatcher_shared_auth-checker:
Was I supposed to incorporate it into the script I posted?
--
https://mail.python.org/mailman/listinfo/python-list
gcalcli (https://github.com/insanum/gcalcli) is a Python application that
provides a command-line interface to Google calendar. All of the stuff I can
find on installation seems to be written for *nix platforms and there is
precious little for windows. I'm wondering if anyone can provide the s
cescu...@gmail.com wrote:
> Hello everyone!
>
> I'm writing here since I've read on the Pyhton's documentation that this
> is the most common path that a new proposal should follow. I'd be really
> glad if this proposal could become a PEP if I see a good response from the
> community or, in the w
Hello everyone!
I'm writing here since I've read on the Pyhton's documentation that this is the
most common path that a new proposal should follow. I'd be really glad if this
proposal could become a PEP if I see a good response from the community or, in
the worst case, understand why this propo
In a message of Sun, 29 Nov 2015 13:23:19 +, Jon Ribbens writes:
>I don't know if, in future, pyvenv will be the way to go and
>virtualenv will be deprecated, but either way we do not appear
>to be there yet.
pyenv is going away. python -m venv is the preferred way to get a venv
https://bugs
On 2015-11-29, Laura Creighton wrote:
> In a message of Sun, 29 Nov 2015 13:19:46 +0100, Lele Gaifax writes:
>>Jon Ribbens writes:
> No, Pyvenv is precisely what Daniele can not use.
> The problem is that venv does not come with a big sign saying
>
> ONLY FOR PYTHON 3.x
> ABSOLUTELY DOES NOT WORK
Oscar Benjamin schrieb am 18.11.2015 um 13:52:
> On 18 November 2015 at 07:50, Daniel Haude wrote:
>>
>> I'm trying to implement some (but not all) methods of a Python class in C.
>> What I've found on the Net is:
>> - how to implement entire modules in C so that I can import that module and
>>
In a message of Sun, 29 Nov 2015 13:19:46 +0100, Lele Gaifax writes:
>Jon Ribbens writes:
>
>> On 2015-11-28, D.M. Procida
>> wrote:
>>>
>>> Is something else required?
>>
>> Debian's package management is mysterious and apparently bizarre
>> and frankly in respect to Python, not very good.
>
>I
Jon Ribbens writes:
> On 2015-11-28, D.M. Procida
> wrote:
>>
>> Is something else required?
>
> Debian's package management is mysterious and apparently bizarre
> and frankly in respect to Python, not very good.
I do not agree with you on the quality of Python support on Debian systems,
but I
On Sun, Nov 29, 2015 at 7:14 PM, Pablo Lucena wrote:
> Is anyone else getting 503 errors when accessing the downloads page of
> python.org?
>
>
> --
> *Pablo Lucena*
> --
> https://mail.python.org/mailman/listinfo/python-list
Yes, the whole site seems to be down. Cc'ing the www list, although
som
Is anyone else getting 503 errors when accessing the downloads page of
python.org?
--
*Pablo Lucena*
--
https://mail.python.org/mailman/listinfo/python-list
34 matches
Mail list logo