Python Web Scrapping : Within href readonly those value that have href in it

2017-01-13 Thread shahsn11
I am trying to scrape a webpage just for learning. In that webpage there are multiple "a" tags. consider the below code Something Something Now i want to read only those href in which there is http. My Current code is for link in soup.find_all("a"): print link.get("href") i would like

Re: Can not run the Python software

2017-01-13 Thread Bernard via Python-list
Thanks for the info.. -Original Message- From: Michael Torrie To: python-list Sent: Fri, Jan 13, 2017 11:08 pm Subject: Re: Can not run the Python software On 01/13/2017 08:32 PM, Joseph L. Casale wrote: >> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hel

RE: Can not run the Python software

2017-01-13 Thread Joseph L. Casale
> And this is coming up a lot. This is something that should already be > on all supported versions of Windows if Windows updates are done, right? No, it's not an update. You install the runtime *if* you need it. > but maybe it's time that the > Python installer bundles the redistributable inst

Re: Can not run the Python software

2017-01-13 Thread Michael Torrie
On 01/13/2017 08:32 PM, Joseph L. Casale wrote: >> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello >> World" program and got the following message: >> "Process finished with exit code 1073741515 (0xC135)" >> I am using Windows 8.1 on an HP ENVY Touchsmart Notebook

RE: Can not run the Python software

2017-01-13 Thread Joseph L. Casale
> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello > World" program and got the following message: > "Process finished with exit code 1073741515 (0xC135)" > I am using Windows 8.1 on an HP ENVY Touchsmart Notebook (64-bit OS, > x64-based processor). If you track

Re: Software to Control RGB Strips

2017-01-13 Thread Brett Salyer
On Friday, January 13, 2017 at 1:07:40 PM UTC-5, Brett Salyer wrote: > Hey all, > > I was debating on getting some RGB light strips for my room. I noticed, from > this tutorial: > > http://popoklopsi.github.io/RaspberryPi-LedStrip/#!/ws2812 > > > there is a WS2812x library to run commands tha

Re: Can not run the Python software

2017-01-13 Thread Michael Torrie
On 01/13/2017 06:34 PM, Bernard via Python-list wrote: > Hi, > > Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello > World" program and got the following message: > "Process finished with exit code 1073741515 (0xC135)" > I am using Windows 8.1 on an HP ENVY Touchs

Re: Can not run the Python software

2017-01-13 Thread Bernard via Python-list
-Original Message- From: hba008 To: hba008 ; python-list Sent: Fri, Jan 13, 2017 7:02 pm Subject: Re: Can not run the Python software I have been added to the mailing list per your instructions. Please, have someone address the problem belowThanks Sent from my Sprint

Re: How can I make a sentinel value NOT be initialized in a class/method - OOP?

2017-01-13 Thread sohcahtoa82
On Friday, January 13, 2017 at 2:27:04 PM UTC-8, David D wrote: > I am testing out some basic Object Oriented Programming in Python. The > basics: > > -User enters a name > -While loop with a sentinel value of "quit" will continue entering names > until the sentinel value is reached > -The o

Re: Extended ASCII [solved]

2017-01-13 Thread D'Arcy Cain
On 2017-01-13 05:44 PM, Grant Edwards wrote: On 2017-01-13, D'Arcy Cain wrote: Here is the failing code: with open(sys.argv[1], encoding="latin-1") as fp: for ln in fp: print(ln) Traceback (most recent call last): File "./load_iff", line 11, in print(ln) UnicodeEncodeError:

Re: Can not run the Python software

2017-01-13 Thread hba...@aol.com via Python-list
I have been added to the mailing list per your instructions. Please, have someone address the problem belowThanks Sent from my Sprint Phone. -- Original message--From: Date: Thu, Jan 5, 2017 10:13 PMTo: python-list@python.org;Subject:Can not run the Python software Hi, J

Re: Announcement: TLSv1.2 will become mandatory in the future for Python.org Sites

2017-01-13 Thread oliver
When I run this per email from my work laptop, python3 -c "import urllib.request,json; print(json.loads(urllib.request.urlopen(' https://www.howsmyssl.com/a/check').read())['tls_version'])" I get the following traceback: C:\...>python -c "import urllib.request,json; print(json.loads(urllib.reque

Re: How can I make a sentinel value NOT be initialized in a class/method - OOP?

2017-01-13 Thread Ian Kelly
On Jan 13, 2017 3:33 PM, wrote: The issue I am having is that when i enter the sentinel value of QUIT, it gets initialized as the name and printed out. How can I get around this? I hope this makes sense. Hard to say for certain without seeing your code, but the most likely cause of this is th

Re: How can I make a sentinel value NOT be initialized in a class/method - OOP?

2017-01-13 Thread Erik
Hi, On 13/01/17 22:26, daviddsch...@gmail.com wrote: The issue I am having is that when i enter the sentinel value of QUIT, it gets initialized as the name and printed out. How can I get around this? If I understand the question correctly (which looks like it's just a re-worded homework que

Re: Extended ASCII

2017-01-13 Thread Jon Ribbens
On 2017-01-13, D'Arcy Cain wrote: > I thought I was done with this crap once I moved to 3.x but some > Winblows machines are still sending what some circles call "Extended > ASCII". I have a file that I am trying to read and it is barfing on > some characters. For example: > >due to the Q

Re: Extended ASCII

2017-01-13 Thread Grant Edwards
On 2017-01-13, D'Arcy Cain wrote: > Here is the failing code: > > with open(sys.argv[1], encoding="latin-1") as fp: >for ln in fp: > print(ln) > > Traceback (most recent call last): >File "./load_iff", line 11, in > print(ln) > UnicodeEncodeError: 'ascii' codec can't encode cha

Re: Extended ASCII

2017-01-13 Thread Random832
On Fri, Jan 13, 2017, at 17:24, D'Arcy Cain wrote: > I thought I was done with this crap once I moved to 3.x but some > Winblows machines are still sending what some circles call "Extended > ASCII". I have a file that I am trying to read and it is barfing on > some characters. For example: >

Extended ASCII

2017-01-13 Thread D'Arcy Cain
I thought I was done with this crap once I moved to 3.x but some Winblows machines are still sending what some circles call "Extended ASCII". I have a file that I am trying to read and it is barfing on some characters. For example: due to the Qu\xe9bec government Obviously should be "due

How can I make a sentinel value NOT be initialized in a class/method - OOP?

2017-01-13 Thread daviddschool
I am testing out some basic Object Oriented Programming in Python. The basics: -User enters a name -While loop with a sentinel value of "quit" will continue entering names until the sentinel value is reached -The object is created with the inputted value (NAME and until a sentinel value is e

Re: Byte-run: a Python interpreter written in Python

2017-01-13 Thread Ned Batchelder
On Friday, January 13, 2017 at 12:09:52 PM UTC-5, Ian wrote: > On Fri, Jan 13, 2017 at 3:46 AM, Steve D'Aprano > wrote: > > > > http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html > > Neat. But not really surprising IMO that it can fit into 500 lines, > since it doesn't handle

Re: Byte-run: a Python interpreter written in Python

2017-01-13 Thread BartC
On 13/01/2017 18:47, Ian Kelly wrote: On Fri, Jan 13, 2017 at 11:07 AM, BartC wrote: Even when it turns out that the actual code on github is 1000 lines rather than 500! Maybe it grew a bit since the 500 lines was quoted. I assume they're excluding blank lines, comments and docstrings. And I

Re: Byte-run: a Python interpreter written in Python

2017-01-13 Thread Ian Kelly
On Fri, Jan 13, 2017 at 11:07 AM, BartC wrote: > Even when it turns out that the actual code on github is 1000 lines rather > than 500! Maybe it grew a bit since the 500 lines was quoted. I assume they're excluding blank lines, comments and docstrings. And I don't know whether the 500 lines is a

Re: Software to Control RGB Strips

2017-01-13 Thread Chris Angelico
On Sat, Jan 14, 2017 at 5:07 AM, wrote: > Hey all, > > I was debating on getting some RGB light strips for my room. I noticed, from > this tutorial: > > http://popoklopsi.github.io/RaspberryPi-LedStrip/#!/ws2812 > > > there is a WS2812x library to run commands that control the RGB strip. > > Do

Re: Problem while building Python 3.6 from source.

2017-01-13 Thread Chris Angelico
On Sat, Jan 14, 2017 at 5:00 AM, Michael S wrote: > Hello, > I am new to this mailing-list and I really don't know whether this > mail should belong to python-dev. Please tell me, if so. Hi and welcome! This kind of thing is best on this list initially. > Unfortunately, I have got the following

Re: Problem while building Python 3.6 from source.

2017-01-13 Thread Thomas Nyberg
On 01/13/2017 10:00 AM, Michael S wrote: '*** Error in ./python'" free(): invalid next size (normal): 0x015bdf90 ***'. Are you possibly running out of memory due to the extra concurrent compilations? Cheers, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Software to Control RGB Strips

2017-01-13 Thread brettsalyer
Hey all, I was debating on getting some RGB light strips for my room. I noticed, from this tutorial: http://popoklopsi.github.io/RaspberryPi-LedStrip/#!/ws2812 there is a WS2812x library to run commands that control the RGB strip. Well, I wanted to, instead of running commands through a term

Re: Byte-run: a Python interpreter written in Python

2017-01-13 Thread BartC
On 13/01/2017 17:08, Ian Kelly wrote: On Fri, Jan 13, 2017 at 3:46 AM, Steve D'Aprano wrote: http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html Neat. But not really surprising IMO that it can fit into 500 lines, If there are still 120 or so byte-codes, then that's just

Problem while building Python 3.6 from source.

2017-01-13 Thread Michael S
Hello, I am new to this mailing-list and I really don't know whether this mail should belong to python-dev. Please tell me, if so. Unfortunately, I have got the following problem: I wanted to build and install Python 3.6 from source but did not succeed. To clarify my situation, I got as an operat

Re: Byte-run: a Python interpreter written in Python

2017-01-13 Thread Ian Kelly
On Fri, Jan 13, 2017 at 3:46 AM, Steve D'Aprano wrote: > > http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html Neat. But not really surprising IMO that it can fit into 500 lines, since it doesn't handle compiling Python into bytecode (which is the hard part) and doesn't includ

Re: timers in threaded application

2017-01-13 Thread Skip Montanaro
On Fri, Jan 13, 2017 at 3:23 AM, dieter wrote: > If what you want to timeout are not I/O operations, you can have a > look at "threading.Timer". It uses a separate thread, lets it wait > a specified time and then starts a specified function, unless > "cancel"ed. > Ooh, hadn't considered that. Th

Re: matrix from matrix

2017-01-13 Thread Steve D'Aprano
On Fri, 13 Jan 2017 10:38 pm, adnan.conne...@gmail.com wrote: > Hi all, > > I have just started python coding and have ran into my first brick wall. > Can some one please assist me with the following query ? Not really, because you haven't given us enough information to answer your questions.

Re: matrix from matrix

2017-01-13 Thread Peter Otten
adnan.conne...@gmail.com wrote: > Hi all, > > I have just started python coding and have ran into my first brick wall. > Can some one please assist me with the following query ? > > I have two Matrices: > 1 – masterMatrix – A 2d matrix containing items in the rows and time as > the columns c

matrix from matrix

2017-01-13 Thread adnan . connexus
Hi all, I have just started python coding and have ran into my first brick wall. Can some one please assist me with the following query ? I have two Matrices: 1 – masterMatrix – A 2d matrix containing items in the rows and time as the columns column headers (time beginning from 00:00 to 23:

Byte-run: a Python interpreter written in Python

2017-01-13 Thread Steve D'Aprano
http://aosabook.org/en/500L/a-python-interpreter-written-in-python.html -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. -- https://mail.python.org/mailman/listinfo/python-list

A detailed description on virtualenv's packaging dependecies? (pip, easy_install, wheel, setuptools, distlib, etc.)

2017-01-13 Thread haraldnordgren
I was working on a bugfix for Virtualenv, regarding very long shebang lines that are breaking things. In the process, I realized that if I want really fix to my particular issue it likely needs to be done on the lower level of Python package management. I started with pip, moved to setuptools an

Running Virtualenv with a custom distlib?

2017-01-13 Thread haraldnordgren
I want to do some development on `distlib`, and in the process run the code via `virtualenv` which has distlib as a dependency. That is, not run the process inside a virtualenv, but run virtualenv's code using a custom dependency. What are the steps I need to go through to achieve this? It see

Re: timers in threaded application

2017-01-13 Thread dieter
Skip Montanaro writes: > ... > I still need timers, and for the moment I'm stuck with this package's event > loop. What options do I have? If the activities are really run in separate threads (such that an event processing can take arbitrary time without much affecting the processing of other eve