On Wed, Oct 29, 2014 at 10:39 PM, Clayton Kirkwood
wrote:
> When I run:
> values = [ ('a', 1), ('b', 2), ('a', 5), ('c', 7)]
> key = 'a'
> pair=[]
>
You just created an empty list and called it "pair".
> [pair for pair in values if key == pair[0]]
>
Two things to bear in mind here:
- The stepper
On Thu, Nov 13, 2014 at 12:40 PM, Ben Finney
wrote:
> Danny Yoo writes:
>
> > >> To quote: "Let your statement be: 'Yes, yes', or "no, no': anything
> > >> beyond these is of evil."
> > >
> > > "Have you stopped abusing small children yet?"
> >
> > :(
> >
> > I don't understand what your respons
On Mon, Feb 2, 2015 at 9:13 AM, Alan Gauld
wrote:
> Don't expect a whole heap of support from the GUIs. A lot of the work will
> have to come from you.
> I suspect the standard GUI framework Tkinter is not going to be your best
> bet. You might find that PyQt or PyGTK will offer better multi ling
On Mon, Feb 2, 2015 at 1:18 PM, Mark Lawrence
wrote:
> On 02/02/2015 20:59, Marc Tompkins wrote:
>
>> On Mon, Feb 2, 2015 at 9:13 AM, Alan Gauld
>> wrote:
>>
>> Don't expect a whole heap of support from the GUIs. A lot of the work
>>> will
>>&
On Tue, Apr 4, 2017 at 9:55 AM, Lisa Hasler Waters
wrote:
> Hello Tutor,
>
> A middle school student of mine created a program to calculate simple and
> compound interest. He built it in PyCharm EDU using a Mac running 10.11.6.
>
> He would like to create a GUI to run this program. Please, can yo
On Tue, Apr 11, 2017 at 9:12 AM, Daniel Berger wrote:
>Hello,
>
>I have installed the modules to control xbee with Python
>https://pypi.python.org/pypi/XBee). Afterwards I have set the path
>variable on C:\Python27\python-xbee-master and also the subdirectories.
> To
>check, i
On Tue, Apr 11, 2017 at 9:48 AM, Rafael Knuth
wrote:
> I tested this approach, and I noticed one weird thing:
>
> Pi_Number = str(3.14159265358979323846264338327950288419716939)
> Pi_Number = "3" + Pi_Number[2:]
> print(Pi_Number)
>
> == RESTART: C:\Users\Rafael\Documents\01 - BIZ\CODING\Python
>
On Wed, Jul 5, 2017 at 9:51 AM, Ashfaq wrote:
> Hi Peter,
> The way you find the issue is really cool! Very cool! :)
>
>
I agree - that is very cool. But I have also made this sort of mistake a
few times, and found it by using a very quick, low-tech method...
"Unfold" the lines of the two dictio
On Sun, Oct 1, 2017 at 12:48 PM, Alan Gauld via Tutor
wrote:
> But to address another issue raised by Mats:
> > Probably the best programming test there is look at code
> > that's already been developed,
>
> Very true and in an ideal world what you would do, but...
>
> It is what we did with the
On Sat, Oct 28, 2017 at 1:43 PM, Mark Anderson
wrote:
> Hello, I am currently doing an online course to learn Python. Generally
> ive followed it well and am enjoying my first go at programming. However
> the description of how to get modules from PyPi has left me confused. Ive
> only recently do
This is a general Python tutor group; I'm not sure anybody here can help
you with the OpenSSL package (I've definitely never used it myself.) We're
all willing to help, but this might not be the right place to ask this
question.
More to the point, though, when you ask questions on this list it's
On Tue, Jul 31, 2018 at 10:03 AM, Alan Gauld via Tutor
wrote:
> On 31/07/18 03:52, Saket Mehrotra wrote:
>
> > error ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
> > AttributeError: module 'ssl' has no attribute 'PROTOCOL_SSLv23'
>
> Are you sure you spelled the attribute correctly?
>
> Have
On Wed, Aug 1, 2018 at 1:13 AM, Alan Gauld via Tutor
wrote:
> On 01/08/18 05:07, Saket Mehrotra wrote:
> > Hi
> >
> > I am also not using any Open SSL package.
> > I have just added " import requests" in py file. And when I run the
> module
> > I get the SSL package error ,not sure why.
>
> Th
try... except is meant to catch errors: places where your program would
otherwise crash. It does NOT work as a truth check.
In your example:
> try:
> type(uvc) == float
> except TypeError as e:
> print(e, msg)
>
> "type(uvc)==float" resolves to a standalone True or False, not an
exception
On Sat, Sep 1, 2018 at 10:40 AM, Dana O'Connor
wrote:
> Hi,
> I've been trying to download and use Python 3.7 for the past few days and
> every time I try to open it it tells me I don't have "pip" which should be
> impossible because this version of Python is supposed to automatically come
> with
On Sat, May 11, 2019 at 12:05 PM Cranky Frankie
wrote:
> 2) For wxPython I'm finding a lot of the documentation is outdated.
I'm a fan of wxPython myself, for a number of reasons - it suits the way I
think, and the applications it generates look native to the platform
they're running on, as opp
401 - 416 of 416 matches
Mail list logo