Apologies for the spam, I hit the wrong button on the moderation pane.
Alan G.
On 16/02/18 13:49, Webcompliancepanel wrote:
>[1]A Regulatory Perspective: FDA's[2]OCP_Logo
>New Guidance's Deciding When to Call 510-857-5896
>Submit a 510(k) for Device &
On 16/02/18 22:50, Daniel Bosah wrote:
> Now, I'm totally lost on how to do this. I have never used a API before,
> and I'm not sure how to use the Wikipedia API. Is there any resource anyone
> can point me to to help me do this? To not only use the API but to also
> parse through all the previous
On 23/02/18 03:34, gonzales huerta wrote:
> What would be the best compiler for writing a combined code PYTHON and C?
There are several ways to do this and it depends on your application
which is
most practical. If w assume yyou want to access the C code from Python then:
1) Write a Python module
On 24/02/18 20:00, James Lundy wrote:
> To whom it may concern. This code is from Dr. John Keyser.
Since you don;t show us the complete program I will have
to make some assumptions...
> gooddata = []
This is degioned as a list by virtue of the []
> for singleday in datalist:
> if (singleday
On 27/02/18 05:13, Cameron Simpson wrote:
> hard to debug when you do. That's not to say you shouldn't use them, but many
> people use them for far too much.
> Finally, you could also consider not using a regexp for this particular task.
>
> Python's "int" class can be called with a string,
On 27/02/18 09:50, Peter Otten wrote:
>> def all_digits(s):
>> return all(c.isdigit() for c in s)
>
> Note that isdigit() already checks all characters in the string:
Ah! I should have known that but forgot.
I think the singular name confused me.
> The only difference to your suggestion is
On 02/03/18 02:40, Nirmal Bhatt wrote:
> Hi,
> I am trying to deploy the distribution file
What do you mean by "the distribution file"?
How are you creating this file?
How are you "deploying" it?
> and getting the attached error.
The server strips out attachments so we cannot
see it, please jus
On 02/03/18 20:42, Alessandro Parisi wrote:
> Hi, My name is Alessandro Parisi,
Hi.
> I would need to download this code to understand how it works
What code?
Do you have a URL? Or a link of some kind?
We are not mind readers.
--
Alan G
Author of the Learn to Program web site
http://www.alan
On 02/03/18 21:05, Roger Lea Scherer wrote:
> ability to exchange point between the pool and each of the, what I call,
> attributes of Strength, Health, Wisdom, and Dexterity. I got only to the
> first option and I'm stuck on how to get the points to change
> "permanently". The program will run wel
On 06/03/18 22:17, Albert-Jan Roskam wrote:
> But the way you wrote it, the generator expression just "floats"
Any expression can be used where a value is expected provided
that e3xpression produces a value of the required type.
A generator expression effectively produces a sequence and
the type
On 06/03/18 18:12, Roger Lea Scherer wrote:
> I know I don't have to apologize, but I am so independent I hate asking for
> help and you guys and gals have been so helpful that now that I'm stuck
> again I'm sorry I have to.
Thats not a problem and, in programming, is usually seen as
a strength n
On 11/03/18 04:20, Leslie SimondeMontfort via Tutor wrote:
> Hi, I wondered if there is someone that can help me with this code.
I'll try but theres a lot to comment on.
See below...
> def print_menu(): ## Your menu design here
> print 30 * "-" , "MENU" , 30 * "-"
> print "1. Menu
On 15/03/18 13:42, Prashanth Ram wrote:
> My code is working well in localhost but when I try to open that in VPS
> server I'm failing in running that code. I'm getting errors. I have
> installed Chrome and it's drivers. Even though I'm facing errors.
>
> I request your team to help me in this. P
On 15/03/18 16:56, Preeti Saxena wrote:
> Hi,
>I am new to python. I am trying to test my program, like a coursera
> submission, which takes run time arguments using "raw_input()". Is there a
> way I can write all the input data into a file and pass it from command
> line to the script?
In nor
e, and we need to upload the output file, running the script on our
> local system. So, the above method should work.
>
> On 15 Mar 2018 11:13 pm, "Alan Gauld via Tutor" <mailto:tutor@python.org>> wrote:
>
> On 15/03/18 16:56, Preeti Saxena wrote:
> >
On 20/03/18 13:55, Mitesh H. Budhabhatti wrote:
> Hello,
>
> Can anybody please suggest better way to connect MS SQL Server database?
As Mats said, better than what?
There are at least two "official" ways:
1) using the SQL Server driver
2) Using the ODBC driver.
Both are described here:
https:/
On 22/03/18 15:22, David Holland via Tutor wrote:
> Is there anyway I can use Python to fill in an Oracle form
What kind of Oracle form? There are at least 2 that I'm
aware of.
1) The Oracle Forms thick client app framework which runs
on a PC and connects to the database server. (I believe
thi
On 22/03/18 11:35, Connie Callaghan wrote:
> Hi,
> I was just looking help for a matrix that I am building, it needs to look
> like this
> 1, 0, 0, ...,0
> A,b,c,0,...,0
> 0,a,b,c,...,0
> 0,0,a,b,c,..0
> 0,0,0,a,b,c,...,0
> 0,0,0,0...0, 1
What exactly are the a,b,c values?
Are they variables o
First, please don't repost the entire digest - we've all seen
the messages before and some people pay by the byte. Secondly
it makes finding the relevant message pertaining to your
question much harder to find.
Delete all the irrelevant stuff.
The other problem with the digest is that it tends to
First of all, please do not repost the entire digest - we have
all already seen them - and some people pay by the byte.
Secondly...
On 26/03/18 21:44, David Brown wrote:
> Thanks Joel. That got me going in the right direction. I ended up using a
> "while true" statement. The code below seems to
On 27/03/18 22:10, Roger Lea Scherer wrote:
> outlineColor = input("What color would you like for the outline?")
> filler = input("And what color would you like to fill it with? ")
>
> hadir.begin_fill()
> hadir.color(outlineColor)
> print(filler)
> for i in range(sides):
> hadir.forward(leng
On 28/03/18 11:07, theano orf wrote:
> I am new in python and I am having problems of how to read a txt file and
> insert the data in a list,
Just a quick response, but your data is more than a text file its a CSV
file so the rules change slightly. Especially since you are using the csv
module.
On 28/03/18 18:14, Peter Otten wrote:
>> Just a quick response, but your data is more than a text file its a CSV
next(open("training.txt"))
> '1\tThe Da Vinci Code book is just awesome.\n'
>
> So the delimiter would be TAB:
Ah! On my screen it looked like a space...
> The CSV module prefers b
On 30/03/18 03:48, Pat Martin wrote:
> the "right" way to do it in python?
More or less, a couple of comments below...
> def Main():
Python function names begin with a lowercase letter by convention.
> """Run if run as a program."""
> parser = argparse.ArgumentParser()
...
>
> no
On 30/03/18 15:55, Glenn Schultz wrote:
> I can create a connection as follows and it works
Well done, so you get a connection object back as a result.
> but I think it is best to have a connection class that opens and closes.
Why? You already have a connection object.
Classes are created so
On01/04/18 20:20, Albert-Jan Roskam wrote:
> fmt="%Y-%m-%d %H:%M\n"
> f.write(now.strftime(fmt))
> Lately I've been using format(), which uses __format__, because I find it
> slightly more readable:
> format(datetime.now(), "%Y-%m-%d %H:%M")
Interesting,
I didn't know that format() recognised the
On 02/04/18 01:46, Rex Florian via Tutor wrote:
> Hello,
>
> I am running Python 3.6 in a Window 7 environment. > I have a python script
> that I am trying to run from the command line.
> I have copied it to a file named Ascii Keys.py into my user directory
> c:\Users\Rex
>
> I try to execute
On 02/04/18 04:19, Steven D'Aprano wrote:
> On Sun, Apr 01, 2018 at 10:58:51PM +0100, Alan Gauld via Tutor wrote:
>> On01/04/18 20:20, Albert-Jan Roskam wrote:
>>> fmt="%Y-%m-%d %H:%M\n"
>>> f.write(now.strftime(fmt))
>>> Lately I've been
On 02/04/18 23:44, Shannon Evans via Tutor wrote:
> Hi, I am trying to write a code with if statements but the code keeps just
> repeating and not carrying on.
There are quite a few problems here, see comments below.
> while True:
> try:
> Grade = int(raw_input("Please enter your Grad
On 03/04/18 01:19, Steven D'Aprano wrote:
> On Tue, Apr 03, 2018 at 01:00:59AM +0100, Alan Gauld via Tutor wrote:
>
>> You need to use 'in' instead. That will check whether
>> or not Grade is *one* of the values in the tuple.
>>
>> if Grade not
On 03/04/18 01:19, Steven D'Aprano wrote:
>
>> if Grade not in 'A','B','C','D','E','F':
> Actually, that returns a tuple consisting of a flag plus five more
> strings:
>
> py> 'A' in 'A','B','C', 'D', 'E', 'F'
> (True, 'B','C', 'D', 'E', 'F')
Although in the context of the program the colon a
On 03/04/18 02:15, Rex via Tutor wrote:
> At the Python command prompt, I write:
>
> import tkinter as tk
> top = Tk()
You forgot the module prefix.
top = tk.Tk()
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo
On 04/04/18 16:10, Evapcoop, Evapcoop wrote:
> I wanted to know if it is possible to use Nimblenet and all it's
> associated packages with Python3.6.> From what I have read, that library is
> compatible with Python2.7.
I think you just answered your own question. If the package is
designed for v
On 05/04/18 04:02, Mark Lawrence wrote:
> Python 3.6 has more functionality than 2.7 by definition, but your
> comment implies, at least to me, that 2.7 and 3.6 are chalk and cheese.
> Nothing could be further from the truth and has regrettably been one of
> the reasons for the dreadfully slow
On 05/04/18 15:28, Zachary Ware wrote:
> I would appreciate keeping the FUD about the differences to a minimum
> :). The differences are there and they are significant, but far from
> insurmountable; in my experience, well-written Python 3 code is fairly
> trivial to port to Python 2/3.
I agre
On 07/04/18 01:50, Roger Lea Scherer wrote:
> So I've examined my educational material, I've perused the python
> documentation and for the life of me I can't figure out why return doesn't
> print a result in the IDE. I use print, the program acts as expected. What
> am I missing?
The fact that re
On 08/04/18 06:16, SUNIL KUMAR MAURYA wrote:
> NZEC error occurs often in Python 3.5. How can it be resolved?
A Non Zero Error Code occurs when the interpreter exits with
an error. Those are very rarely errors in the interpreter
they are due to errors in the code which it is executing.
So, to sto
On 12/04/18 11:54, Aditya Mukherjee wrote:
> Hello, I'm relatively new to python and have been given a task for
> university, and would greatly appreciate if anyone could help me basically
> just get started because as of now I am completely clueless and have no
> idea what to do. I don't really kn
On 12/04/18 17:44, Shannon Evans via Tutor wrote:
> Hi,
> I have managed to get my two json files that need to be imported into
> python and then i need to write a program on who gets fruit and who doesn't
> and then need to get the final stock at the end. I was just wondering how i
> import the fi
On 12/04/18 18:24, Scharrer, Brianna wrote:
What appears below seems to be an assignment of some kind.
We do not do your work for you although we will offer help.
But it is best if you show us your work so far, or at
least describe how you intend to tackle it.
In this case you are being given a s
On 14/04/18 04:32, Pareshkumar Panchal wrote:
> I am trying to merge two csv files with following condition.
>
> filea.csv column( a1,a2,a3)
> fileb.csv column( b1,b2,b3)
>
> i wanted to merge if a1 & b1 reference (as the title is different but
> contents are valid for comparison). also the resu
On 15/04/18 03:57, Chris Roy-Smith wrote:
> I am trying to get tkinter to return a number from a window, which then
> sets how many times to print a sign.
I don;t jhave time to look at this in detail just now, maybe later.
But first impressions is that you have a very unorthodox style of
Tkinte
On 15/04/18 03:57, Chris Roy-Smith wrote:
> The code does not wait till the function returns a value,
OK, I've had a closet look now and can confirm the
problem lies in your code structure. Its not event based.
You need to understand event-driven programming better.
In event driven code you ini
On 15/04/18 14:24, Alan Gauld via Tutor wrote:
> OK, I've had a closet look now and can confirm the
A closer look! Not a closet look. Ooops! :-/
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on F
On 16/04/18 03:30, Sandra Sherif via Tutor wrote:
> Dear Python Tutor,
>
> I am in desperate need for help with programming on python. I am new to using
> python and I’m trying to write a program called “turtle tag”. I’m trying to
> do these things in the program:
> a. Asks how many turtles are
On 19/04/18 17:50, Niharika Jakhar wrote:
> Hi again
> I tried re-writing the code with all your advices(i assume to cover all of
> them). I have extended the code a little bit to store the data in the form
> of lists and am trying to access it.
> I also changed the file name to BioGRID.txt
>
> He
On 20/04/18 05:53, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> I have a situation in which the same code gives an error in idle but works
> in qtconsole
> regards,
>
> *in idle*
> v = np.zeros(len(x))
>
> for i in range(len(x)):
> if x[i] < 1.0:
> v[i] = 0
You don't give us any clue to what
Use Reply-All or Reply-List to include the mailing list in replies.
On 20/04/18 09:10, Niharika Jakhar wrote:
> Hi
>
> I want to store the data of file into a data structure which has 11
> objects per line , something like this:
> 2354 somethin2 23nothing 23214.
>
>
> so I
On 21/04/18 12:50, tracey jones-Francis wrote:
> Hi there, I've been working on code
I've only glanced at this but one thing jumped out at me:
> while queue:
> currentState = queue.pop(0)
> visited.append(currentState)
> #print(visited)
> for a in newAplhabet:
> if (currentState, a) == (newStat
On 24/04/18 03:34, Kentaro Hori wrote:
> Hi
>
> can you take a screenshot after rebooting and trying one aging?
Although you will need to post a link to the image since the
list server will not send binary attachments.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
h
On 25/04/18 03:26, Evuraan wrote:
> Please consider this situation :
> Each line in "massive_input.txt" need to be churned by the
> "time_intensive_stuff" function, so I am trying to background it.
What kind of "churning" is involved?
If its compute intensive threading may not be the right
answer
On 25/04/18 09:27, Alan Gauld via Tutor wrote:
>> for i in $(< massive_input.file); do
>> time_intensive_stuff_in_bash i & disown
>> :
>> done
>
> Its the same except in bash you start a whole
> new process so instead of using thre
On 25/04/18 14:22, Kai Bojens wrote:
> The structure I'd like to have:
>
> result = {
> 'f...@bar.de': {
> 'Countries': [DE,DK,UK]
> 'IP': ['192.168.1.1','172.10.10.10']
> 'Count': [12]
> }
> }
> ...
> for line in logfile:
>
On 26/04/18 14:48, Mats Wichmann wrote:
>>> However personally I'd use a class to define your data structure and
>>> just have a top level dictionary holding instances of the class.
>>
>> You are right (again). I haven't thougt of using classes, but that's exactly
>> what they were invented for. T
On 30/04/18 14:35, Shannon Evans via Tutor wrote:
> Hi, is there any way that i can add a loop or iteration or something so
> that i dont have to write out every person who has fruit.
Yes that's what loops are for.
You have two options in Python: a 'for' loop or a 'while' loop
In your case I sus
On 30/04/18 23:15, Shannon Evans via Tutor wrote:
> Hi, i'm wanting to update the stock list at the end so that the fruit
> that's given is taken subtracted from the original stock list. The code
> i've written isn't updating it it's just staying the same. Any idea what i
> can do to fix this?
>
>
On 30/04/18 16:57, Daniel Bosah wrote:
> I have a function in which returns scatterplot of a Isomap
Below you show a function that creates a scatterplot
but it does not return anything. Sorry to nitpick but correct
terminology is quite important in understanding what you
are trying to achieve.
>
On 6 May 2018, at 23:00, boB Stepp wrote:
>I was solving a programming problem in one of my books concerning the
>generation of a Collatz sequence
>(https://en.wikipedia.org/wiki/Collatz_conjecture), and started to
>wonder how I should separate my program's output from its logic. It
>seems lik
The tutor list is for those learning python and its standard library. I
suspect you will get a better response asking on the main python list.
Alan g.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://
On 7 May 2018, at 15:08, ruiyan wrote:
> I want to log to the remote supercomputer automatically, upload and download
> files
If it supports ftp then there is an ftp module.
There are also http and ssh modules, depending on the complexity of your needs
and the protocols available. Ftp sound
I'm guessing at the answer here because I'm on vacation with no access to a pc
of any kind let alone Windows. But are you running python inside an ide? If so
you might find you get the expected result if you use a command prompt, since
printf usually sends output to stdout.
This is another exam
Bob,
On 8 May 2018, at 19:56, boB Stepp <
>Judging from the lack of responses, I guess I must have been on track
>on the other questions.
On The basics yes. There were a few picky details I would normally have
mentioned but I'm on vacation and replying inline via gmail on my tablet is
just too
The first block of code is full of errors and couldn't work so I have no idea
what you were really doing!
The second block should kind of work. From your description I'd guess you have
an indentation error such that most of the code that should be inside the loop
is being bypassed. Are you sur
On 9 May 2018 2:30 am, Kerri Murphy wrote:
Hi there,
Yes, the first code does a good job by asking them to go higher or lower
after each guess, in the pop up window.
My point is that the code you posted can't even run, let alone do a good
job. The indentation is all messe
On 9 May 2018, at 23:57, Rick Jaramillo wrote:
>
>Hello,
>I’m having trouble understanding the following behavior and would greatly
>appreciate any insight.
>l = [1,2,3,4]
>b=[]
>for i in range(l):
> print l
> b.append(l)
> l.pop(0)
>print b
>OUTPUT
>[1,2,3,4]
>[2,3,4]
>[3,4]
>[4]
>
On 9 May 2018, at 23:54, Brad M wrote:
>
>As an aside, I can't get "Error squiggles" to show up in my .c project in
>visual studio 2017, where as in my .cpp project it promptly notifies me
I don't know visual studio so this is a guess. But remember that c and c++ are
very different. C++ is mu
On 10 May 2018, at 16:52, emanuel sandoval
wrote:
>I want to know how to maximize a window in tkinter.
There are several options, of which your solution is probably the best!
The others involve setting the window position to top left and the width and
height to the screen size.
All the sol
On 11/05/18 01:43, Pareshkumar Panchal wrote:
> Error:
> from openpyxl.workbook import Workbook
> ImportError: No module named openpyxl.workbook
>
> I am using only pandas however it still works fine on one computer having
> openpyxl already installed eventhough i am not using openpyxl in the
> p
On 12/05/18 06:40, peter wrote:
> range does not work the same for 2.7 and my 3.6.5. Seems they have
> changed the nature of range. It is a built in listed along with lists
> and tuples
You are correct in that it has changed slightly and now returns
a range object. but you can convert it to a li
On 16/05/18 02:43, Steven D'Aprano wrote:
> The traceback Sam posted says (in part):
>
> Move = input('What Will You Do? Fight or Run: ')
> File "", line 1, in
> NameError: name 'Run' is not defined
>
> so the failed line was the call to input(). In Python 3, it would return
> a string.
On 15/05/18 22:26, Mahamed Ahmed wrote:
> Please I would like you to help me solve the problem above
We see no problem. this is a text only list so if you included
a binary attachment the server will have stripped it off for
security reasons.
Please repost the text of the problem description and
On 16/05/18 09:53, Yosef Levy wrote:
> Hello All,
>
> I have testing environment.
> Code is written under Python 2.6.
> testing output should be redirected to log file.
You don't say which OS you are using but if it's a
Unix variant you could just use command line
redirection of stdout/stderr. Th
On 22/05/18 11:16, aishwarya selvaraj wrote:
> I'm attaching both the files along with this email. It would be great if
> someone could help me out here. Thanks in advance
I don't see the attachments, even though they may just be text
the server probably sees them as potentially executable and st
On 22/05/18 18:13, Glenn Schultz wrote:
Cavbeat: I'm no dataframe expert so I'm going on
general principles here...
> I am trying to apply the function to the data frame as follows:
>
> df['loanage'].apply(myfunction(x = 2, y = 10, z = 10, df['loanage]), axis = 0)
This looks wrong on several
On 22/05/18 20:06, Pi wrote:
> works fine, but only for one path. And I need to use more than one path.
> With one path given works great:
>
> >>> find_db("/dbbs")
> ['april.db, /dbbs/analysis/april.db', 'important.sqlite,
> /dbbs/temp/important.sqlite', 'march.db, /dbbs/analysis/march.db',
On 27/05/18 04:43, Bhavna Soni wrote:
> I installed pandas library using pip9. I get errors while importing
> it, Uninstalling and Re-installing won't help. It says DLL load failed
> as window file is not found. The next time I import it says pandas
> don't have core attribute, ut core folder is pr
On 27/05/18 16:18, Alejandro Chirife via Tutor wrote:
>
> Hi all, I am having a hard time to create what at first looked like a simple
> program with Python 3 and Tkinter:
> The UI consist of a window with a label and a button.
> The label shows "waiting for a message" and the button shows "res
On 27/05/18 17:21, Joel Goldstick wrote:
> On Sun, May 27, 2018 at 12:08 PM, Pat Martin wrote:
>> ... Since it will be a script I will be running
>> through cron I won't be able to type the password
> You can set environment variables on the system that runs the script.
EV was my initial though
On 27/05/18 19:31, Silviu Chiric wrote:
> Dear all
>
> I need to get the value of given key from Redis, or both key and value, the
> below code snippet fails always, even the connection is okay
Please post the output. You print the error trace but we cant see it.
Or if that is the the whole outp
On 28/05/18 19:56, Alejandro Chirife via Tutor wrote:
> Two questions:
> 1. ... How do you send an event of data arriving
> when the events for tkinter are all about user interaction?
The easiest way is to set a global variable and use a timer
event (after()) to poll the variable periodically a
On 30/05/18 11:09, erich callahana wrote:
> I need to know how to access the window where > in the menu at the top it
> says run
You need to help us out here.
What program are you running or trying to run that has
this Window? It sounds like an IDE of some kind,
maybe IDLE? But most IDEs have a
On 31/05/18 07:06, erich callahana wrote:
> I’m not sure how to access this window
>
Unfortunately this is a text mailing list and the server strips binary
attachments for security reasons. Either send us a link to a web
page or describe what it is you are trying to do.
Include the program name,
On 01/06/18 14:00, chiara pascucci wrote:
> the user's input. The programme works fine if the it guesses the number
> right on its first try, but when the users inputs "too low" or "too high"
> an infinite loop is returned. I thinkI have done something wrong in my
> while loop and that my sentry v
On 04/06/18 16:57, Jeremy Ogorzalek wrote:
> Not sure this is how this is done, but here goes.
>
> When I try to run the code in the SGP4 module, I get the following error,
> and it originates in the io.py script:
I have no idea what you are talking about and do not know what the SGP4
or io.py fi
On 05/06/18 21:46, Roger Lea Scherer wrote:
> datums = open("C:/Users/Roger/Documents/GitHub/LaunchCode/mystery.txt", "r")
>
> for aline in datums:
> splitted = aline.split()
> try:...
> except:
> while splitted == "UP":
> hadir.pu()
splitted will never equal 'UP'
On 07/06/18 23:21, Roger Lea Scherer wrote:
> they won't. I've started from scratch again.
>
> **
> import string
>
> gettysburg =
> open("C:/Users/Roger/Documents/GitHub/LaunchCode/gettysburg.txt", "r")
>
> puncless = ""
> for char in gettysburg:
I think this is wrong. gettysburg is a
On 13/06/18 02:52, Slater, Joseph C. wrote:
> I am trying to import a function in a module by variable name.
I'd suggest getattr():
>>> import sys
>>> xt = getattr(sys,exit)
>>> xt()
Alternatively, if its a fixed set of options
(and it sound as if it is) set up a dictionary:
funcs = {'exit':
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
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 e
On 15/06/18 14:57, kenneth yashim wrote:
> please im new to python or any other programming language. please i want to
> understand how slicing works
>
> [start,stop,step]
>
'abc'[0:3]
> 'abc'
>
'abc'[0:-1]
> 'ab'
>
> why does 'abc'[2:1] or 'abc'[2:1] print ' ' instead of 'c'???
On 15/06/18 17:35, C W wrote:
> Why haven't the developers fixed the problem?
This is open source, developed by volunteers to
meet their own needs primarily and others by
happy coincidence.
If the existing solution meets the needs of the
developers they have no incentive to spend time
to "fix"
On 16/06/18 05:49, Mike C wrote:
> I can only compare to the R language I've used. If there is an issue,
> say a function freezes at startup, one user brings it up to the list,> when
> the respective maintainer sees the bug, it is usually addressed
Which is fine if there is a team working onthe
On 17/06/18 23:59, Ali M wrote:
> def update_list(self):
> search_term = self.search_var.get()
> self.listbox.delete(0, tk.END)
> for item in self.listbox:
The above pair of lines look odd.
You delete everything on the listbox then try to iterate
over it? Is that reall
On 17/06/18 19:02, C W wrote:
> I never figured out when to call a method with parenthesis, when is it not?
You call anything in Python (function, method, class, etc) using
parentheses. The parentheses are what makes it a call.
When you don't use parentheses you are referencing the
callable objec
On 18/06/18 23:12, Roger Lea Scherer wrote:
> My foggy understanding of recursion is probably the reason I can't figure
> this out. When turtle draws this program there is an orange line in the
> green which I would prefer not to have. I've tried all I could think of,
> but can't get the orange lin
On 19/06/18 16:52, C W wrote:
> Thank you all. I'm relatively new to OOP, I think that's where the problem
> is. It's different from C or any C alike language.
True, but even in C you can have pointers to functions
which work in a similar fashion.
> I'm still figuring out what's under the hood wi
On 20/06/18 20:32, Daniel Bosah wrote:
> # coding: latin-1
> from bs4 import BeautifulSoup
> from urllib.request import urlopen
> import re
>
> #new point to add... make rest of function then compare a list of monuments
> notaries ( such as blvd, road, street, etc.) to a list of words containing
>
On 20/06/18 20:32, Daniel Bosah wrote:
> reg = pattern.findall(str(soup))
>
> for i in reg:
> if i in reg and paul: # this loop checks to see if elements are in
> both the regexed parsed list and the list.
No it doesn't. It checks if i is in reg and
if paul is non empty - which it alwa
On 23/06/18 17:56, Andrew Gabler wrote:
> I am trying to install Scrapy using pip and keep getting an error message.
It would help a lot if you would show us the error message.
Otherwise we are just guessing.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www
On 24/06/18 22:21, Paula Malimba wrote:
> I'm new to programming and am studying the book Begin to Code with Python.
> I'm stuck in lesson 3, trying to make an egg timer. I keep having a syntax
> error.
Most of us won't have that book and so can't see the code.
More importantly none of us can se
901 - 1000 of 1423 matches
Mail list logo