join us at the new Maintainers Summit at PyCon US

2019-03-08 Thread Shauna Gordon-McKeon
Hello CompLangPythonistas! I am co-organizing a "Maintainers Summit" at PyCon US this year. The goal is to create a community of practice to help support Python project maintainers socially, technologically, and logistically. This is the first time the event will be held, so I'm trying to spread

Python System Error

2018-06-09 Thread deon gordon
Greetings, confirm 1b131414ca21eea0843469f76454389f1e9ceebe I am using Window 7 Professional (32bit). I downloaded and installed python-3.6.5.exe and have an error after several attempts to install and repair. Python-system error api-mis-win-crt-runtime-l1-1-0.dll is missing from your computer

Re: Target WSGI script cannot be loaded as Python module.

2018-05-23 Thread John Gordon
led successfully. Is your web server using Python 2 or Python 3 to execute WSGI? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies&quo

Re: Detection of ultrasonic side channels in mobile devices with Python?

2018-02-28 Thread John Gordon
whack-job newsgroups that would love to > discuss that aspect of it. Sounds like the plot to the latest Kingsman movie. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread John Gordon
te column. Without this screenshot, we would have had only the user's (incorrect) assertion that the file existed, and no way to diagnose the true issue. Granted, this was an environment issue and not a code issue, but I can imagine situations where the same sort of thing could apply t

Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread John Gordon
In <151517608506.368831.5093080329614058603@welt.netz> "Kim of K." writes: > print(emo('now you see emos')) > OF COURSE THIS SHIT DOES NOT WORK. What device did you run this on? Your average terminal window isn't going to support emojis... -- John

Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread John Gordon
hy should software be any different? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: errors with json.loads

2017-09-20 Thread John Gordon
r > So "text" seems to be a string. Why does json.loads return an error? Because, although text is the right type, it does not contain a valid json string. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by b

the core values of the Python "platform"

2017-09-13 Thread Darin Gordon
Bryan Cantrill gave an interesting talk recently at a Node conference about "platform values" [1]. The talk lead me to think about what the core values of the Python "platform" are and I thought it would be good to ask this question of the community. What would you consider the top (<= 5) core valu

Re: Case-insensitive string equality

2017-08-31 Thread John Gordon
much less frequently.) -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposed new syntax

2017-08-10 Thread John Gordon
200)] [100, 101, 102, 103, 104, 200, 201, 202, 203, 204] -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: get value from list using widget

2017-07-05 Thread John Gordon
u actually mean that *you* want to select a value in your code? I could go on, but you get my point. We need lots more information before we can even begin to help you. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com

Re: how to add new tuple as key in dictionary?

2017-07-05 Thread John Gordon
= groupkey[tuple([0,3])] + [[0,1]] The right-hand side of your expression is rightly complaining that groupkey[(0,3)] doesn't exist. Would you expect to say a = a + 1 When a doesn't exist? Your code tries to do much the same thing. -- John Gordon A is for Am

Re: Visit All URLs with selenium python

2017-04-13 Thread John Gordon
rl in the loop? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick questions about globals and database connections

2017-04-05 Thread John Gordon
conn = psycopg2.connect(cstr) return conn.cursor() def updatedb(dbtype): db = dbconnect(dbtype) db.execute("DML code") print "updated " + dbtype 'close connection It would probably be even better to return conn, as that would allow upda

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-13 Thread John Gordon
ndividually, so I would think > the order of the dict's fields does not matter since you'd manually > specify each field's data. The original example used a loop to get all of the dict fields and add them to the GUI, instead of adding each field individually. -- John Gord

Re: How to add months to a date (datetime object)?

2017-02-06 Thread John Gordon
> > end_date = start_date + relativedelta(months=delta_period) + > > timedelta(days=-delta_period) > Where do you define 'delta_period', and what is your question? There is no question; it is an answer in response to the original post asking how to add months to a datet

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread John Gordon
e interactive, you could require that the user supply a file in the current directory containing the username and password. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edw

Re: Using python to start programs after logging in

2017-01-20 Thread John Gordon
hen all > programs will be started on the same virtual desktop and I want to > start them on different ones. The window manager doesn't allow you to specify a target desktop? That seems like a pretty heinous feature omission. -- John Gordon A is for Amy, who fell down the s

Re: Using python to start programs after logging in

2017-01-19 Thread John Gordon
lt-in facilities for starting programs would be better. Why are you using Python instead? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashl

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-14 Thread John Gordon
In Gregory Ewing writes: > Once you're in the clutches of Apple, there is no Escape. Ha! -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "Th

Re: Install Problem

2016-12-13 Thread John Gordon
Python. How can this problem be fixed? When does the error occur? During installation? Or after installation when you're trying to run a python program? What version of Windows do you have? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread John Gordon
ever one you prefer. self.class_attr may be more convenient because you don't have to provide a specific class name. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey,

Re: calling a program from Python batch file

2016-12-07 Thread John Gordon
responding to expected patterns in their output. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. https://pexpect.readthedocs.io/en/stable/ -- John Gordon A is for Amy, who fell down the stairs gor...@pa

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-05 Thread John Gordon
ERROR No file named '$HOME/file.txt' vi $(grep -l foo *.txt) ERROR No file named '$(grep -l foo *.txt)' None of these commands would work if bash didn't "alter the input going to another program". -- John Gordon A is for Amy, who fell

Re: Error In querying Genderize.io. Can someone please help

2016-12-01 Thread John Gordon
(r.content) You're using http: instead of https:, and you're using ?katty instead of ?name=katty, and therefore the host does not recognize your request as an API call and redirects you to the normal webpage. -- John Gordon A is for Amy, who fell down the

Re: Can json.dumps create multiple lines

2016-12-01 Thread John Gordon
", > "with several strings", > "as a demo" > ]' json.dumps() has an 'indent' keyword argument, but I believe it only enables indenting of each whole element, not individual members of a list. Perhaps somet

Re: Python while loop

2016-11-30 Thread John Gordon
name; you could have called it "hamburger" and python would treat it just the same. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: MemoryError and Pickle

2016-11-21 Thread John Gordon
oesn't use pickle format, so your reader program would have to be modified to read this format. And you'll run into the same problem if the reader expects to keep all the data in memory. -- John Gordon A is for Amy, who fell down the st

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
In John Gordon writes: > In > mike.rei...@gmail.com writes: > with open("json.dat", "r") as fp: > data = json.load(fp) > for item in data: > if item['name'] == 'myField2': Oops, that should be 'm

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
value. That data looks like a list of dictionaries: import json with open("json.dat", "r") as fp: data = json.load(fp) for item in data: if item['name'] == 'myField2': print item['id'] -

After import, some submodules are accessible and some aren't

2016-10-28 Thread John Gordon
object has no attribute 'modlist' >>> ldap.dn >>> import ldap.modlist >>> ldap.modlist Why the difference? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: exist loop by pressing esc

2016-10-24 Thread John Gordon
In <6e030fd0-93c1-4d23-8656-e06c411b6...@googlegroups.com> chris alindi writes: > simple while loop range(10) if user press esc exits loop range() is typically used with for loops, not while loops. what is your while condition? what use is the range() value? -- Jo

Re: How to handle errors?

2016-10-22 Thread John Gordon
Then I ran it: > ~$ python test.py argument1 argument2 > ['test.py', 'argument1', 'argument2'] Options cannot be passed *on the hash-bang line*. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basi

Re: How to handle errors?

2016-10-20 Thread John Gordon
In <8500044a-c8d1-43ad-91d9-e836d52bd...@googlegroups.com> SS writes: > I would like to be able to handle that error a bit better. Any ideas? Wrap the socket.gethostbyname() call in a try/except block. -- John Gordon A is for Amy, who fell down the stairs gor...@

Re: Inplace shuffle function returns none

2016-10-18 Thread John Gordon
In <9d24f23c-b578-4029-ab80-f117599e2...@googlegroups.com> Sayth Renshaw writes: > So why can't i assign the result slice to a variable b? Because shuffle() modifies the list directly, and returns None. It does NOT return the shuffled list. -- John Gordon A i

Re: Inplace shuffle function returns none

2016-10-18 Thread John Gordon
le(a) > print(b[:3]) > For example here i just want to slice the first 3 numbers which should > be shuffled. However you can't slice a noneType object that b becomes. > So how do i get shuffle to give me my numbers? a = [1,2,3,4,5] shuffle(a) print(a[:3]) -- John Gord

Re: Build desktop application using django

2016-10-17 Thread John Gordon
omething which runs locally on your computer, such as Microsoft Word or a game. But Django is for building websites, not local applications. So Django probably isn't what you want. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for B

Re: Free Python e-books from O'Reilly

2016-10-10 Thread John Gordon
ed that they were all fairly short, none more than 80 pages or so. I suspect these books are somewhat lighter fare than the typical O'Reilly tome. Not necessarily a bad thing, but worth mentioning. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com

Re: xml parsing with lxml

2016-10-07 Thread John Gordon
child in root: print(child.tag) -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: how to append to list in list comprehension

2016-09-30 Thread John Gordon
(0) Or, if you really want to use a list comprehension: [f.append(0) for f in fups if len(f) < 5] However there's no reason to use a list comprehension here. The whole point of list comprehensions is to create a *new* list, which you don't appear to need; you just need to modify

Re: Why does the insert after list function fail?

2016-09-22 Thread John Gordon
thing; it modifies the existing list in-place. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: strings and ints consistency - isinstance

2016-09-21 Thread John Gordon
sented as a string*. The same is not true for integers. * Okay, python 2.7 does have some issues with Unicode. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Go

Re: Requests for webbrowser module

2016-09-14 Thread John Gordon
controls whether new pages are opened in a new tab or a new window. Perhaps that is your issue? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gash

Re: How to extend a tuple of tuples?

2016-09-12 Thread John Gordon
has been mutated in the very statement that > you are quoting No. An entirely new tuple is created, and 'a' is rebound to it. The existing tuple is not mutated. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assa

Re: memberof example using ldap

2016-09-12 Thread John Gordon
fine even if group doesn't exist, > It always says that user is member of The query returns a user who is not a member of the named group? That's odd. What is the search base and scope? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com

Re: ldap or active directory module

2016-09-09 Thread John Gordon
particular group Do the same search as above, returning the "member" attribute. Get the search result and then inspect the list of returned members. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for

Re: Mysterious Logging Handlers

2016-09-09 Thread John Gordon
default logging format; it's used when you haven't supplied any format of your own. The snippet of xlreader.py does not define any format, so it seems like that's where it's coming from. (This seems pretty straightforward; am I missing something?) -- John Gordon

Re: How to split value where is comma ?

2016-09-08 Thread John Gordon
for x in newlist: print(x) -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-08-03 Thread Gordon Levi
"D'Arcy J.M. Cain" wrote: >On Mon, 01 Aug 2016 00:25:58 +1000 >Gordon Levi wrote: >> "D'Arcy J.M. Cain" wrote: >> >I don't care if you are using carrier pigeon. If you send an email >> >address, make it a valid one. >>

Re: Why not allow empty code blocks?

2016-08-01 Thread Gordon Levi
"D'Arcy J.M. Cain" wrote: >On Sun, 31 Jul 2016 11:53:47 -0400 >"D'Arcy J.M. Cain" wrote: >> On Mon, 01 Aug 2016 00:25:58 +1000 >> On the other hand I have no throwaway accounts. Every address I use >> is a primary one. I have all sorts of methods to block spam. None of >> those methods involv

Re: Why not allow empty code blocks?

2016-07-31 Thread Gordon Levi
"D'Arcy J.M. Cain" wrote: >On Sat, 30 Jul 2016 16:14:18 +0100 >BartC wrote: >> > By the way, the last time I replied to you it went to the list but >> > your address bounced. Was that a glitch or are you using an >> > invalid address in a mailing list? >> >> Do you mean my email address? That

Re: JSON result parsing

2016-07-29 Thread John Gordon
return results['ID'] else: return 'something else' -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tin

Re: Python text file fetch specific part of line

2016-07-29 Thread Gordon Levi
c...@zip.com.au wrote: >On 28Jul2016 19:28, Gordon Levi wrote: >>Arshpreet Singh wrote: >>>I am writing Imdb scrapper, and getting available list of titles from IMDB >>>website which provide txt file in very raw format, Here is the one part of >>>file(http:

Re: Python text file fetch specific part of line

2016-07-28 Thread Gordon Levi
Arshpreet Singh wrote: >I am writing Imdb scrapper, and getting available list of titles from IMDB >website which provide txt file in very raw format, Here is the one part of >file(http://pastebin.com/fpMgBAjc) as the file provides tags like Distribution > Votes,Rank,Title I want to parse titl

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Gordon Levi
Zagyen Leo wrote: >yeah, it may be quite simple to you experts, but hard to me. > >In one of exercises from the Tutorial it said: "Write a program that asks the >user their name, if they enter your name say "That is a nice name", if they >enter "John Cleese" or "Michael Palin", tell them how yo

Re: what the heck this code is doing?

2016-07-01 Thread John Gordon
27;?? It loops through the child items in entry, looking for one with a 'key' value of 'Track ID'. If it finds one, it sets found=True and loops one more time, returning the text of the *next* child element. It depends on the 'key' element being directly followed by the &#

Re: Break and Continue: While Loops

2016-06-23 Thread John Gordon
ode prints i and THEN adds one to it. So i is 4, it gets printed, then 1 is added to it, so it becomes 5 and then the loop exits. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears

Re: while Loops

2016-06-22 Thread John Gordon
ing at 5, and only stop when i is 6. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: how to for loop append a list [] when using parallel programming

2016-06-15 Thread John Gordon
In meInvent bbird writes: > how to for loop append a list [] when using parallel programming items = [] for item in parallelized_object_factory(): items.append(item) If you want a more specific answer, ask a more specific question. -- John Gordon A is

Re: log file.

2016-06-14 Thread John Gordon
g for help with logging, or communicating with the pump? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.py

Re: how to solve memory

2016-06-10 Thread John Gordon
ur name changed in previous post? My comment was that the recursive calls weren't indented in the "if deep > 0" block, therefore DFS was being called infinitely with smaller and smaller values of deep. But it appears you have fixed that issue. -- John Gordon

Re: how to solve memory

2016-06-10 Thread John Gordon
In <4f853aa2-cc00-480b-9fd7-79b05cbd4...@googlegroups.com> meInvent bbird writes: > https://drive.google.com/file/d/0Bxs_ao6uuBDULVNsRjZSVjdPYlE/view?usp=sharing I already responded to your earlier post about this program. Did you read it? -- John Gordon A is for

Re: why it is like stop running after a 3 seconds

2016-06-09 Thread John Gordon
he function, but the recursive calls aren't inside that if block. DFS keeps calling itself with smaller and smaller values of deep. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears

Re: Unit test a class with xml elements

2016-05-24 Thread John Gordon
here. > Share if any examples available. Create your own sample XML illustrating each desired combination. Then write test cases for each. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for B

Re: ZipImportError: can't find module

2016-05-24 Thread John Gordon
ob? Are the permissions on the zipfile correct, and all parent directories? How, specifically, are you importing the module? Are you doing something like this: zipfile = zipimport.zipimporter('file.zip') zipfile.load_module('mymodule') -- John Gordon

Re: Program prints questions for user input, but won't show the answer output

2016-05-18 Thread John Gordon
ounter < 7: > if (pints[counter] < lowPints): > lowPints = pints[counter] > counter = counter + 1 > return lowPints And getLow() has a very similar problem. I suspect you want to unindent the 'counter = counter + 1' statement so that it is NOT insid

Re: Python 3.5.1 Not Working

2016-05-13 Thread John Gordon
ion 3.4.3 if you are using Windows XP. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: web facing static text db

2016-04-30 Thread Gordon Levi
"Fetchinson ." wrote: >Hi folks, > >I have a very specific set of requirements for a task and was >wondering if anyone had good suggestions for the best set of tools: > >* store text documents (about 10 pages) >* the data set is static (i.e. only lookups are performed, no delete, >no edit, no

Re: Simplest way to locate a string in a column and get the value on the same row in another column

2016-04-28 Thread John Gordon
ething else? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: Python path and append

2016-04-25 Thread John Gordon
en rename it afterwards, instead of rewriting the original file. import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_

Promoting Python

2016-04-05 Thread Gordon( Hotmail )
at downloading the relevant software was blocked by AVG software as risky. Gordon Liberty Basic for n = 32 to 255: print n;chr$(n) : next n REM BBC Basic FOR c = 1 TO 15 : COLOUR c PRINT "Color ";c NEXT c REM BBC Basic c = 0 FOR x = 80 TO 2000 STEP 96 GCOL c: CIRCLE FILL x,500,

Re: Pyscripter Issues

2016-03-31 Thread John Gordon
bit version. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Announcing the release of Yosai: a security framework for python applications

2016-03-27 Thread Darin Gordon
Hey Everyone! I am very glad to announce the first release of Yosai, a security framework for python applications. Details, including link to project: http://www.daringordon.com/introducing_yosai Regards Darin -- https://mail.python.org/mailman/listinfo/python-list

Re: Not downloading

2016-03-23 Thread John Gordon
P, try using an older 3.4 version of Python. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: from a module return a class

2016-03-19 Thread John Gordon
It has to be a function or a class. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: from a module return a class

2016-03-19 Thread John Gordon
taxError: 'return' outside function Show us the complete definition of promptUser_PWord(). -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "Th

Re: from a module return a class

2016-03-18 Thread John Gordon
en't callable. promptUser_PWord() has to be a function or a class. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- htt

Re: from a module return a class

2016-03-18 Thread John Gordon
; > callable. promptUser_PWord() has to be a function or a class. > > > Yes, but I guess the OP's program will run into the SyntaxError when > trying to import the module, i.e., before it ever encounters the > TypeError: 'module' object is not callable. Good poi

Re: password and username code

2016-03-06 Thread John Gordon
inding out if a name is registered? There are lots of possible ways to do it. Do you have one in mind? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "Th

Re: list reversal error

2016-03-03 Thread John Gordon
valuates to j = len(data) which would yield 5 for a five-element list, but the last actual element is in data[4]. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears --

Re: Continuing indentation

2016-03-03 Thread John Gordon
In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa writes: > Ethan Furman : > > No, it isn't. Using '\' for line continuation is strongly discouraged. > Why would you discourage valid syntax? Some things that are permissible may not be desirable. -- J

Re: Everything good about Python except GUI IDE?

2016-03-02 Thread Gordon Levi
Marko Rauhamaa wrote: >Gordon Levi : > >> Nobody likes filling in forms but how do you suggest converting a form >> based app into something loveable. > >Straight HTML does forms just fine without CSS or JavaScript, yet few >can resist. > >> What interf

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Gordon Levi
Marko Rauhamaa wrote: >Rustom Mody : > >> On Sunday, February 28, 2016 at 7:22:08 PM UTC+5:30, Marko Rauhamaa wrote: >>> Rustom Mody : >>> >>> > whereas in fact every significant GUI embeds text (possibly >>> > recursively) >>> > >>> > eg TI inside GUI -- think of text inside gimp GUI inside TI

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Gordon Levi
Rustom Mody wrote: >On Sunday, February 28, 2016 at 6:38:40 PM UTC+5:30, Gordon Levi wrote: >> Chris Angelico wrote: >> >> >On Sun, Feb 28, 2016 at 9:25 PM, Rustom Mody wrote: >> >> Code is always the last resort for arbitrary complexity >> >>

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Gordon Levi
Chris Angelico wrote: >On Sun, Feb 28, 2016 at 9:25 PM, Rustom Mody wrote: >> Code is always the last resort for arbitrary complexity >> Lets keep it the last resort. >> >> If the bottom-line is that python's GUI-builders are so deep into suxland >> that they are best avoided in place of hand-wr

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Gordon Levi
wrong.addres...@gmail.com wrote: >On Saturday, 27 February 2016 18:08:36 UTC+2, Dietmar Schwertberger wrote: >> On 27.02.2016 12:18, wrong.addres...@gmail.com wrote: >> > Isn't there any good GUI IDE like Visual Basic? I hope there are some less >> > well known GUI IDEs which I did not come acro

Re: importing: what does "from" do?

2016-01-21 Thread John Gordon
You shouldn't have to rewrite any of the actual code. -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- https://mail.python.org/mailman/listinfo/python-list

Re: importing: what does "from" do?

2016-01-21 Thread John Gordon
contain > > something named 'hexdump'? > Yes In that case, the problem is most likely a circular import issue, as you mentioned. The only way to fix it is to reorganize your modules. How did this error come up? Did the code work previously? If so, what changed? -- Jo

Re: importing: what does "from" do?

2016-01-21 Thread John Gordon
#x27;utilities' module? Does it, in fact, contain something named 'hexdump'? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb

Re: Which Python editor has this feature?

2016-01-11 Thread Gordon Levi
jf...@ms4.hinet.net wrote: >It lets you jump between the current cursor position and the line the upper >level indentation start, something like the bracket matching in C editor. >Because of Python use indentation as its code block mark, It might be helpful >if we can jump between different lev

Re: Question about a class member

2016-01-07 Thread John Gordon
transmat_ = transmat > model.means_ = means > model.covars_ = covars > # Generate samples > X, Z = model.sample(50) > - sample() is a method in the GaussianHMM class. (In this case, it's a method in the _BaseHMM class, from which GaussianHMM inherits.) -- John Gord

Re: imshow keeps crashhing

2016-01-06 Thread John Gordon
it even show up as a choice? Is there something special about the /private directory? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrum

Re: imshow keeps crashhing

2016-01-06 Thread John Gordon
Do you have any > suggestions? I don't really know much about Macs... Can you run Preview and open the temporary file successfully? When launched from scipy, Does Preview run as a user other than yourself? What are the permissions on the temporary file when it's originally create

Re: Why is there difference between cmd line and .py file?

2016-01-05 Thread John Gordon
> IndexError: invalid index to scalar variable. > // The built-in function sum() returns a single value, not a list, so this is a reasonable error. I suspect the code actually intended to call numpy.sum(), which does return a list (or something like a list). -- John Gordon

Re: imshow keeps crashhing

2015-12-22 Thread John Gordon
ble SCIPY_PIL_IMAGE_VIEWER. If that variable is not present, it uses 'see' by default. Do you have a suitable image viewing program installed on your computer? If so, try setting the SCIPY_PIL_IMAGE_VIEWER environment variable to the name of that program. -- John Gordon

Re: error reading api with urllib

2015-12-16 Thread John Gordon
your Request object. Try doing that. (It works in your browser because it defaults to GET automatically.) -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, &qu

Re: Is vars() the most useless Python built-in ever?

2015-12-01 Thread John Gordon
re is almost always *MANY* ways to > achieve the same output.=20 The koan reads: There should be one-- and preferably only one --obvious way to do it. You left out the rather important word "obvious". -- John Gordon A is for Amy, who fell down the stairs gor...

Re: if else python

2015-11-26 Thread John Gordon
e in a loop, so perhaps you're seeing the 'if' branch on one loop iteration, anf the 'else' branch on the next iteration? I see that your if and else branches both contain a screen.addstr() call. Are you seeing both of these outputs? -- John Gordon A is fo

Re: Finding scores from a list

2015-11-24 Thread John Gordon
back (most recent call last): > File "", line 1, in > print((results["gengyang"])["score"]) > TypeError: list indices must be integers, not str Lists are indexed by number, not by name. You want something like this: for result in results:

  1   2   3   4   5   6   7   >