On Sun, May 4, 2014 at 1:55 PM, Sithembewena Lloyd Dube
wrote:
> Thanks, i was actually getting the error information to update the post.
> Apoligies to waste your time posting here - I could not find an appropriate
> PyCountry discussion list and my next best bet seemed to be a Python users'
> li
On Wed, May 14, 2014 at 12:08 PM, Charles Agriesti
wrote:
> Is this Anaconda thing any part of being able to run the scripts from the
> textbook with time_series? Is it a complete wild goose chase?
>
First off - I know nothing about using Python in a scientific setting.
Second (before anyone el
On Sun, May 25, 2014 at 10:32 AM, Marino David wrote:
> Hi all:
> I am a newpie at python.
> I read a python toolbox in which there is code line:import cores as co. I
> wantta know what the cores is.
> When I type "import cores as co", error occur as follows:
> Traceback (most recent call last):
>
On Tue, May 27, 2014 at 12:27 PM, Degreat Yartey
wrote:
> I am studying python on my own (i.e. i am between the beginner and
> intermediate level) and i haven't met any difficulty until i reached the
> topic 'Generators and Iterators'.
> I need an explanation so simple as using the expression 'pri
On Fri, May 30, 2014 at 2:41 AM, Aaron Misquith
wrote:
> Like pypdf is used to convert pdf to text; is there any library that is
> used in converting .ppt files to .txt? Even some sample programs will be
> helpful.
>
I suspect you'd need to use PowerPoint itself to do that cleanly; you can
defin
On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
wrote:
> It has again given some error I do not understand. This time my code is:
>
> count = 0
> def getPersistence(self,n):
>
> product = 1
> if len(str(n)) == 1:
> return self.count
> else:
> a = str(n)
> for
On Fri, May 30, 2014 at 11:06 PM, Ritwik Raghav
wrote:
> That's all the code I'm writing.
>
That can't be true - the 11 lines of code you posted doesn't include
anything that would give you "Correct Return Value: No", let alone any
reference to PersistentNumber. From the error message, it would
On Tue, Jun 3, 2014 at 7:53 AM, Charles Agriesti
wrote:
> Thanks all. Problem apparently solved. Shortly after that last message it
> quit working completely. Reinstall Python 2.7 + swampy -> no good;
> uninstall both 2.7 and 3.4, manually remove the folders that remained
> because of scripts tha
On Tue, Jun 3, 2014 at 11:00 AM, Mark Lawrence
wrote:
pip-win (https://sites.google.com/site/pydatalog/python/pip-for-windows)
>
>
> Never heard of it so thanks for the link.
>
> I don't know how long it's been around but I'll tell you this much for
free: I wish I'd known about it when I first s
On Tue, Jun 10, 2014 at 7:55 AM, Stephen Brazil wrote:
> Hello! I am brand new to python and need to know how to make the attached
> lines of code work. Should be pretty
>
You need quotes.
Stephen (without quotes) is an object, which you haven't previously
defined. 'Stephen' is a string, whic
On Tue, Jun 10, 2014 at 9:28 AM, Jon Engle wrote:
> for port in range (startingPort, 65535):
> thread.start_new_thread(setup, (port,))
> startingPort=startingPort+1
> #print startingPort
>
I think you just need this:
for port in range (startingPort, 65535):
> thread.start_new_thread(s
On Tue, Jun 10, 2014 at 2:00 PM, Jon Engle wrote:
> Ok, so after making the changes the code does bind the startingPort
> variable but that is the only port that gets bound. Also when connecting to
> the startingPort I receive the following error:
>
> Please enter starting port: 65520
>
>
On Tue, Jun 10, 2014 at 4:08 PM, Jon Engle wrote:
> Ok, so when I run the code it immediately terminates and never 'listens' to
> the ports in the loop. I have verified by running netstat -an | grep 65530
> and the startingPort is not binding.
The problem is that all threads started by a program
On Tue, Jun 24, 2014 at 8:34 AM, mark murphy
wrote:
> What I hope to be able to do is scan the directory, and for each instance
> where there are two files where the first 8 characters (TDDD) are
> identical, run a process on those two files and place the output (named
> TDDD) in a new
On Tue, Jun 24, 2014 at 1:02 PM, Peter Otten <__pete...@web.de> wrote:
> Sorting is probably the approach that is easiest to understand, but an
> alternative would be to put the files into a dict that maps the 8-char
> prefix to a list of files with that prefix:
>
I was debating the virtues of th
On Sun, Jul 6, 2014 at 1:57 PM, Danny Yoo wrote:
> 2. Direct feedback to the Python web site maintainers so that either
they fix the problem or are at least aware that something is deficient.
Google offers a per-site custom search; it's free for very basic
functionality and not very expensive
On Fri, Jul 18, 2014 at 9:29 AM, Chris wrote:
> On 07/18/2014 09:44 AM, Alan Gauld wrote:
> > Are you sure thats the version of Python you are running
> > in the virtualenv?
>
> I've modified the first line to #!./bin/python (instead of
> #!/usr/bin/python).
>
> Now, there's another error message
On Sun, Jul 20, 2014 at 8:40 AM, LN A-go-go
wrote:
>
> States OJ
> AK 36
> AL 39
> AR 39
> AZ 45
> CA 61
> CO 54
> CT 61
> DC 93
> DE 62
> FL 51
> GA 47
> HI 72
> IA 54
> ID 36
> IL 62
> IN 50
> KS 41
> KY 41
> LA 40
> MA 62
> MD 62
> ME 58
> MI 57
> MN 54
> MO 49
> MS 43
> MT 47
> NC 50
> ND 45
On Sun, Jul 20, 2014 at 2:37 PM, Alan Gauld wrote:
> In fact in this case I suggested he use a for loop to iterate over
> the file and use a dictionary to store the results...
Ah. I missed that, as I've only noticed this newer thread. And I
apologize for imputing motive (a liking for "while Tr
On Sun, Jul 20, 2014 at 6:12 PM, Mark Lawrence wrote:
>> Ah. I missed that, as I've only noticed this newer thread. And I
>> apologize for imputing motive (a liking for "while True"); I'd just
>> noticed that you often advise it. I don't know who _does_ think this
>> is a desirable pattern; I'
On Sun, Jul 20, 2014 at 8:10 PM, Ben Finney wrote:
> Marc Tompkins writes:
>
>> Seriously, though, how is
>> 1) Do {this} forever, until something happens that I'll tell you about
>> later
>>
>> better than
>> 2) Do {this} until this condition, wh
On Tue, Jul 29, 2014 at 4:13 PM, 이명교 wrote:
> inf1 = open('first.txt')
> for line in inf1.readlines():
> list1.append(line)
So far, so good...
> list1 = line[:-1].split('\n')
...but then you do this, which wipes out list1.
> for a in list1:
> if a not in list1:
Even if you hadn't
On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel wrote:
> I think this is because on windows, *.py files are associated with py.exe
> that choose the python version depending on the first line of your file.
No. *ix operating systems (Unix, Linux, OS X, etc.) inspect the first
line of a file to de
On Tue, Aug 5, 2014 at 8:23 AM, Zachary Ware
wrote:
>
> which it should be if the most recently
> installed Python was 3.3 or 3.4, installed with default options.
>
And there we have my problem with this glorious new "feature". YOU
CAN'T RELY ON IT, because it depends on the most recent version
On Fri, Aug 15, 2014 at 10:46 AM, Terry--gmail wrote:
(By the way - your indentation got flattened - cue the inevitable
chorus of "DON'T POST TO THIS LIST IN HTML" - so this is my best-guess
reconstruction.)
> lens = []
> # pre-format the list called lens for maximum number of columns contained i
On Sun, Aug 17, 2014 at 4:48 PM, Terry--gmail wrote:
> WOW! There is a lot of help on this mailing list! I want to thank everyone
> for their valuable input! Thanks! (I am working my way through the
> replies.)
>
> Sorry about the HTML. I think I have it turned off now in Thunderbirdy for
> this
On Sun, Aug 17, 2014 at 9:40 PM, Terry--gmail wrote:
> I found another place in Thunderbirdy to set 'plain text'.
>
> This is a test.
>
> Does the below code look correct now?
>
> --And did I reply correctly this time? (Reply-All and keep only
> tutor@python.org address...)
>
>
> for line_number,
On Sun, Aug 17, 2014 at 9:49 PM, Marc Tompkins wrote:
> On Sun, Aug 17, 2014 at 9:40 PM, Terry--gmail
> wrote:
>> I found another place in Thunderbirdy to set 'plain text'.
>>
>> This is a test.
>>
>> Does the below code look correct now?
>>
&
On Sun, Aug 17, 2014 at 10:51 PM, Terry--gmail wrote:
> I'm copy and pasting from Ninja-IDE, which I thought was created
> specifically to do python programming...
Specifically for programming, yes, and Python is among the supported
languages - but according to their web page, they support many
l
On Mon, Aug 18, 2014 at 12:13 AM, Cameron Simpson wrote:
> On 17Aug2014 23:51, Terry--gmail wrote:
>>
>> I'm copy and pasting from Ninja-IDE, which I thought was created
>> specifically to do python programming...so I never checked to see if it
>> needs to have the tab set to enter 4 spaces, as i
On Mon, Aug 18, 2014 at 1:00 AM, Marc Tompkins wrote:
> Also, looking at the Ninja-IDE website more closely I see that,
> although they do mention compatibility with multiple languages, they
> were designed by and for Python programmers - which makes the
> tab/space issue less like
On Tue, Aug 19, 2014 at 1:04 PM, Mark Lawrence wrote:
> I'm not aware of any problem with Thunderbird or any (semi-)decent mail
> client.
The original poster uses NinjaIDE and Thunderbird, and his code was
being persistently flattened when he copied/pasted. I believe I've
just tracked it down to
On Aug 20, 2014 12:07 PM, "Terry--gmail" wrote:
>
> Alan Gauld
>
> Hi!
> We are not quite out of the woods on this last example you gave me. It
now seems to be complaining
> that it doesn't want to append an integer to the list or that this isn't
the place to use '.append' -- I am probably interp
On Wed, Aug 20, 2014 at 1:38 PM, Terry--gmail wrote:
> Marc, my understanding is, is that:
>
> lens[col].append(len(item))
>
> -should be building a mirror image of my list of lists called catalog2,
> which currently has 9 columns by x number of rows, and that we are plu
On Mon, Aug 25, 2014 at 12:04 AM, Alex Kleider wrote:
> I appreciate your further elucidation, like your 'sledge hammer' metaphor and
> thank you for the fragility warning. I expect within such a limited scope,
> the dangers are not great.
As someone who has been burned by this sort of thinkin
On Thu, Sep 4, 2014 at 3:26 PM, Alan Gauld wrote:
> On 04/09/14 21:37, Najam Qasim wrote:
>> I downloaded notepad++. Can you please help me how to run python script in
>> notepad++?
>
> I only played with notepad++ briefly but I seem to recall it had a menu with
> commands to 'make' and 'run' a fi
On Fri, Sep 5, 2014 at 4:09 AM, Whees Northbee wrote:
> I'm really sorry if my post doesn't appropriate to the forum rule.. I
> already asked in other forums 2 months ago, but no answer or had voted down
> and closed..
It's not that you've broken a rule. It's just that you're asking on a
forum w
On Fri, Sep 5, 2014 at 2:32 PM, Crush wrote:
> Ok nevermind, I did not figure it out. My code...
>
> count = 0
> while count < 3:
> count += 1
> Subprocess.Popen('command')
> if count == 3:
> sys.exit()
>
> This does not work as I want it to; it consecutively executes the command
> t
On Sun, Oct 26, 2014 at 1:15 PM, Danny Yoo wrote:
>
> >> why is it I get this messages repeatedly despite having been reading
> and writing on the list for over a year now?
>
> This has happened to me once in a while too. I conjecture that it might
> be a bug with Mailman, but I'd have to dive i
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
>>&
Hi Rafael
You are appending quit to the list, before checking to see if quit has been
typed. You could move the "if Statement" up in the code and add an else
statement, so Quit is not appended to the list first thing.
while True:
activity = input(prompt)
if activity == "quit":
pr
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
>
advance for sending me into the right direction.
Marc
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
.
Can a charitable soul advise whether my approach makes sense and whether
I am using the right type of object for the task at hands?
I am looking for guidance and willing try completely different
approach/objects if necessary.
Thanks in advance for sending me into the right direction.
Marc
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
Hi,
First of all I'm gonan introduce myself. My name is Marc and I'm a student
and also a python's programmer begginer. I've been studying/learning python
and now I need some help to finish my project.
I have two scripts, one of them in python (the main script) and the other
401 - 459 of 459 matches
Mail list logo