On 13/07/18 18:42, Talia Koch via Tutor wrote:
> Hi, I am trying to figure out a code that would change my text output to
> 'Arial'
It all depends on how you are displaying your text.
If it is in a GUI such as Tkinter or WxPython you can
change the font in yor program. But the technique is
compl
On 11/07/18 22:41, Anil Duggirala wrote:
> Will the Django tutorial guide me toward connecting
> Python and SQL?
Yes, Django has its own mechanism for doing that
and the tutorials will cover it.
> Could you share a link to your SQL tutorial
See the signature.
On the left hand contents frame
On 11/07/18 14:55, Anil Duggirala wrote:
> I would like to ask what for recommendations on
> books/resources to learn python to build a payment processor.
You don;t tell us your experience level.
If you can already program in any other language then just
use the standard Python tutorial on pyth
On 07/07/18 18:46, Daryl Heppner wrote:
> I'm stepping back to simply return the DealID from the XML using the
> concept of a class. My code results in exit code 0 but doesn't print
> any results. Could you give me a hint where I'm missing something?
You have an issue which has shown up in seve
On 05/07/18 17:03, Hlavin, Matthew (GSFC-5460)[GSFC INTERNS] wrote:
> install the library using the line:
> $ pip install -U pyvisa
> When I type this line, I get a syntax error
The most common reason is that you are trying to type it
at the Python >>> prompt.
It should be typed at the OS prompt.
On 04/07/18 12:08, Daryl Heppner wrote:
> If you have any suggestions for continued self-learning (books,
> courses, etc.) I'd appreciate any tips.
So far as OOP goes you can't go far wrong with the latest version
of Grady Booch's OOAD book. I've read both the previous versions
and the latest upd
On 04/07/18 01:08, Alan Gauld via Tutor wrote:
> # Now the main code just needs the outer loops:
> tree = ET.parse(r'\\DealData.xml')
> root = tree.getroot()
> deals = []
> for deal in root.findall("Deals"):
> for dl in deal.findall("Deal"):
&g
On 03/07/18 20:39, Daryl Heppner wrote:
> The idea of a class is something I'd unsuccessfully tried but I'm up
> for the challenge! I'm very comfortable in Transact SQL but OOP is
> new to me.
OK, What I meant by using a class was to define one (or more?)
that encompassed all the data in one De
On 03/07/18 14:48, Bellamy Baron wrote:
> I have heard C++ is faster than python and I have a few questions
> 1.Is there a way to make python run just as fast
Kind of. Nearly. But its limited to specific types of program.
The most common approach is to identify the slow bits and rewrite
them in C
On 02/07/18 23:52, Daryl Heppner wrote:
> The two While Loops are the part I'm struggling with. The goal is to
> list each bill month number and date for each month in the term.
When you need multiple values you need to use a collection
type such as a list or tuple. Your problem is that you are u
On 03/07/18 06:23, Adam Jones wrote:
> Good day, I am currently checking a piece of arcpy code. Where a point is
> shifted within a set distance to protect the privacy of said point. Please
> see the code below, and please advise me or correct the code where it is
> needed
It would help us to help
On 02/07/18 21:06, Daryl Heppner wrote:
> I'm trying to calculate the amount of rent per lease for the life of
> the lease, by month. The following code provides the correct results
> except for the monthnum and billper.
> The while loop (below) returns the first value correctly but stops
> w
On 01/07/18 23:34, Alan Gauld via Tutor wrote:
> Realize that you made a mistake, get the original
> version back
>
> co -l -v1.1 myfile.py
Oops, a bit rusty. The command should be:
co -l1.1 myfile.py
--
Alan G
Author of the Learn to Program web site
http://www.alan-g
On 02/07/18 02:54, Chris Roy-Smith wrote:
> If I have grasped things correctly a widget is an object.
Every value in Python is an object.
numbers, strings, lists, functions, instances of classes.
All are objects.
You can see that by using the dir() function on them:
>>> dir(5)
['__abs__', '__a
On 01/07/18 11:33, Chris Roy-Smith wrote:
>> Even better would be to learn a form of VCS (version control system)
> I don't know anything about these tools,
VCS store versions of a file. You can check for differences between
versions, restore previous versions, even merge different versions.
Mo
On 01/07/18 09:15, Chris Roy-Smith wrote:
>> def cmd2(): print('This is number 2')
> I was hoping eventually to generate the command form the results of a
> database query, not knowing the exact command until run time. Perhaps
> what I was trying to achieve is too close to self modifying code,
On 30/06/18 11:50, Shall, Sydney wrote:
>> And if you want to try using Jython or MacPython(?)
>> you can use the native GUI builders for those:
>> - Eclipse/Netbeans (Java)
>> - XDeveloper (MacOS) - I tried this once and it kind of works...
>>
> Alan,
>
> Could you expand a bit on the use of XDe
On 30/06/18 03:55, Chris Roy-Smith wrote:
> I am trying to change the command of a tkinter Button in my program.
> Eventually I want to be able to do this to many buttons.
Since I'm not 100% sure if you mean the command or the label or both
here is a simple example that does both...
###
On 29/06/18 16:05, Glen wrote:
> Can someone advise on a RAD, drag and drop style graphical form/dialog
> creator? Akin to VBA or Visual Studio that will work with Python?
There is nothing even close to the VB GUI builder for Python.
That's because Python has to cover many GUI frameworks,
VB onl
On 29/06/18 13:18, Sergio Rojas wrote:
> # read the whole file
> with open(thefilename, 'r') as theFile:
contentfile = theFile.read()
>
> # split the file in lines according to the newline character "\n"
> templines = []
> for line in contentfile.splitlines():
> templines.append(line.str
On 29/06/18 10:08, Mathieu Sollier wrote:
> Bonjour,
> J’essaye de programmer un Raspberry pi 3 modèle B+ composé d’un écran tactile
> devant notamment allumé mon pc via cette interface.
> Auriez vous des conseils pour réaliser cela ? et pour l’interface graphique ?
> Cordialement.
> Provenance :
On 25/06/18 20:35, Giulia Marcoux wrote:
> Hello,
>
> I am a student learning python, and i am running into some difficulties. I
> am tryign to read a csv file that has different delimiters for different
> rows: Example:
>
> Format:V1.1
> Model: R
> Step Size: 10mm
> Distance: 10cm
> Gain: 1000
On 24/06/18 18:26, Ali M wrote:
Just a quick observation, its too late to read it in detail...
> def update_list(self):
> search_term = self.search_var.get()
> for item in self.listbox.get(0, tk.END):
> if search_term.lower() in item:
> self.listbox
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
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
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
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
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
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
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 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
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 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 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 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 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 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 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 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 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
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 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
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
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 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
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
401 - 500 of 1423 matches
Mail list logo