Re: [Tutor] Recursion depth exceeded in python web crawler

2018-06-14 Thread Mark Lawrence
On 14/06/18 19:32, Daniel Bosah wrote: I am trying to modify code from a web crawler to scrape for keywords from certain websites. However, Im trying to run the web crawler before I modify it, and I'm running into issues. When I ran this code - *import threading* *from Queue import Queue*

Re: [Tutor] Recursion depth exceeded in python web crawler

2018-06-14 Thread Steven D'Aprano
On Thu, Jun 14, 2018 at 02:32:46PM -0400, Daniel Bosah wrote: > I am trying to modify code from a web crawler to scrape for keywords from > certain websites. However, Im trying to run the web crawler before I > modify it, and I'm running into issues. > > When I ran this code - [snip enormous

Re: [Tutor] In matplotlib, why are there axes classes vs. axes API? Why not list them under one documentation?

2018-06-14 Thread Steven D'Aprano
On Thu, Jun 14, 2018 at 12:31:44PM -0400, C W wrote: > Hello everyone, > > I'm working on matplotlib, could someone explain the difference between > these two? > > Axes class: https://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes > Axes and tick API:

[Tutor] In matplotlib, why are there axes classes vs. axes API? Why not list them under one documentation?

2018-06-14 Thread C W
Hello everyone, I'm working on matplotlib, could someone explain the difference between these two? Axes class: https://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes Axes and tick API: https://matplotlib.org/api/axis_api.html I began at reading axes class, but discovered axes API by

[Tutor] Recursion depth exceeded in python web crawler

2018-06-14 Thread Daniel Bosah
I am trying to modify code from a web crawler to scrape for keywords from certain websites. However, Im trying to run the web crawler before I modify it, and I'm running into issues. When I ran this code - *import threading* *from Queue import Queue* *from spider import Spider* *from domain

Re: [Tutor] Virtual environment can't find uno

2018-06-14 Thread Mats Wichmann
On 06/14/2018 11:57 AM, Jim wrote: > Is it available for a pip install? I looked on pypi and didn't see it. > > It may be incompatible with 3.6. I was looking at the dependencies with > synaptic and found. Depends Python3(>= 3.5~), Depends Python3(<= 3.6). > > Anyway I had forgotten I have a

Re: [Tutor] Virtual environment can't find uno

2018-06-14 Thread Jim
On 06/14/2018 10:51 AM, Mats Wichmann wrote: On 06/13/2018 06:55 PM, Jim wrote: Running Linux Mint 18. I have python 3.6 running in a virtual environment. I want to use a package called oosheet to work with libreoffice calc. When I try to import it I get the following error: import oosheet

Re: [Tutor] How default arg of function works

2018-06-14 Thread Mats Wichmann
On 06/14/2018 05:01 AM, Deepak Dixit wrote: > Thanks a lot for this information. > > On Thu, Jun 14, 2018, 4:28 PM Alan Gauld via Tutor wrote: >> Yes, the default argument object is created when the >> function is defined (ie before it is even called the >> first time) and the same reference to

Re: [Tutor] Virtual environment can't find uno

2018-06-14 Thread Mats Wichmann
On 06/13/2018 06:55 PM, Jim wrote: > Running Linux Mint 18. > > I have python 3.6 running in a virtual environment. > > I want to use a package called oosheet to work with libreoffice calc. > When I try to import it I get the following error: > import oosheet > Traceback (most recent call

Re: [Tutor] accessing buttons (tkinter) made with loop

2018-06-14 Thread Peter Otten
Freedom Peacemaker wrote: > Hello Tutor, > currently im working with tkinter application. Main idea was to create 25 > buttons with for loop. Each button text was random number and user needs > to click them in order form lowest to highest. When button is clicked its > being disabled with

Re: [Tutor] How default arg of function works

2018-06-14 Thread Deepak Dixit
Thanks a lot for this information. On Thu, Jun 14, 2018, 4:28 PM Alan Gauld via Tutor wrote: > On 14/06/18 08:40, Deepak Dixit wrote: > > You mean that for default args and passed args of mutable type, python > uses > > different object and same reference will be used for further calling of >

Re: [Tutor] How default arg of function works

2018-06-14 Thread Alan Gauld via Tutor
On 14/06/18 08:40, Deepak Dixit wrote: > You mean that for default args and passed args of mutable type, python uses > different object and same reference will be used for further calling of the > function. Yes, the default argument object is created when the function is defined (ie before it is

[Tutor] accessing buttons (tkinter) made with loop

2018-06-14 Thread Freedom Peacemaker
Hello Tutor, currently im working with tkinter application. Main idea was to create 25 buttons with for loop. Each button text was random number and user needs to click them in order form lowest to highest. When button is clicked its being disabled with coresponding color (green-ok, red-not). This

Re: [Tutor] How default arg of function works

2018-06-14 Thread Deepak Dixit
You mean that for default args and passed args of mutable type, python uses different object and same reference will be used for further calling of the function. Now one more thing I want to ask you that how can I get deep understanding of python like how list, dictionary works internally and

Re: [Tutor] How default arg of function works

2018-06-14 Thread Alan Gauld via Tutor
On 14/06/18 08:04, Deepak Dixit wrote: > def test2(nums=[]): > nums.append(len(nums)); > return nums > > print 'test2()', test2() > print 'test2([1,2,3])', test2([1,2,3]) > print 'test2([1,2])', test2([1,2]) > print 'test2()', test2() > print 'test2()', test2() > > Calling test2

[Tutor] How default arg of function works

2018-06-14 Thread Deepak Dixit
I am learning python and working with function. Here is my test program :- program.py def test1(nums=[]): return nums def test2(nums=[]): nums.append(len(nums)); return nums print "Calling test1" print '=' * 40 print 'test1()',