Re: Quote of the day

2016-05-17 Thread Michael Torrie
On 05/17/2016 08:27 AM, Paul Rudin wrote: > Marko Rauhamaa writes: >> That's a long time to be without a product to sell. > > But you do have the option of building a kernel incorporating your fix > and using that. Sure as an individual end user that may be the best option. But not necessarily f

Re: JNLP File download and run

2016-05-20 Thread Michael Torrie
On 05/20/2016 01:30 AM, Robert Clove wrote: > Hi, > > Can someone give me pseudo code to download and JNLP file from a URL and > run it? > > Looks like a advance concept in python You could use the urllib module to download the file, then use the subprocess module to spawn the javaws executable

Re: Image loading problem

2016-05-22 Thread Michael Torrie
On 05/21/2016 01:55 PM, Random832 wrote: > On Sat, May 21, 2016, at 12:54, Peter Otten wrote: >> It's not your fault, there's an odd quirk in the library: you have to >> keep a reference of the PhotoImage instance around to prevent the >> image from being garbage-collected. > > Just out of curiosi

Re: JNLP File download and run

2016-05-24 Thread Michael Torrie
lso subprocess (or os.startfile) to do what you want to do, including examples you can adapt. Should be just a few of lines of actual python code to start with. > > On Fri, May 20, 2016 at 9:06 PM, Michael Torrie <mailto:torr...@gmail.com>> wrote: > > On 05/20/2016 01:

Re: Strange Python related errors for androwarn.py. Please help!

2016-05-26 Thread Michael Torrie
On 05/26/2016 11:31 AM, Sean Son wrote: > Hopefully those help in any troubleshooting steps that you all recommend to > me! > > Thank you! You could try emailing the author who's email address is listed on the project's main github page. I suspect the project itself is abandoned. Was this worki

Re: Strange Python related errors for androwarn.py. Please help!

2016-05-26 Thread Michael Torrie
On 05/26/2016 05:57 PM, Michael Torrie wrote: > You could try emailing the author who's email address is listed on the > project's main github page. I suspect the project itself is abandoned. Ahem. That should have been whose. Sigh. -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange Python related errors for androwarn.py. Please help!

2016-05-27 Thread Michael Torrie
On 05/27/2016 08:41 AM, Sean Son wrote: > Thank you for your reply. So the error isnt due to a bug in function > itself? It is due to a possible error in the Android APK file? If that > is the case, it would take a while to figure this out. I tried contacted > the author of the project but I have

Re: Strange Python related errors for androwarn.py. Please help!

2016-05-27 Thread Michael Torrie
On 05/27/2016 08:09 PM, Michael Torrie wrote: > On 05/27/2016 08:41 AM, Sean Son wrote: >> Thank you for your reply. So the error isnt due to a bug in function >> itself? It is due to a possible error in the Android APK file? If that >> is the case, it would take a while

Re: How can I debug silent failure - print no output

2016-05-27 Thread Michael Torrie
On 05/27/2016 08:41 PM, Sayth Renshaw wrote: > This is my terminal and directory structure. Add more print() calls. Offhand I'd say that pq(filename=filename) is returning an empty list so that for loop is not doing anything. Hence your debugging print() calls never happen. Add sanity print()'s

Re: Efficient handling of fast, real-time hex data

2016-05-31 Thread Michael Torrie
On 05/31/2016 06:20 PM, jlada...@itu.edu wrote: > So, how can I take the byte sequence <0x01 0x02 0x03 0x04 0x05 0x06 > \n> that Serial.readline() returns to me, and QUICKLY turn it into > three integer values, 258, 772, and 1286? Better yet, can I write > these bytes directly into an array (numpy

Re: Don't put your software in the public domain

2016-06-03 Thread Michael Torrie
On Jun 3, 2016 04:57, "Steven D'Aprano" wrote: > (1) If the GPL licence is valid, then they are in breach of the licence > terms, the licence is revoked, and they are not legally permitted to > distribute or use the software; > > (2) If, as some people insist, the GPL licence is not valid, then th

Re: Operator precedence problem

2016-06-05 Thread Michael Torrie
On 06/05/2016 10:05 AM, Uri Even-Chen wrote: > My suggestion: Never write expressions, such as 2 ** 3 ** 2 or even 2 * 4 > + 5, without parentheses. Always add parentheses - 2 ** (3 ** 2) (or (2 ** > 3) **2) or (2 * 4) + 5 (or 2 * (4 + 5)). I can understand using parenthesis when operator precede

Re: Everything good about Python except GUI IDE?

2016-06-05 Thread Michael Torrie
On 03/02/2016 03:36 PM, Marko Rauhamaa wrote: > Requirements for what I have in mind: > > 1. It would have to be and feel like real Python. > > 2. External commands should be available as callable Python functions. > > 3. Functions/commands should return streams. (Generators, maybe?) > > 4.

Re: Everything good about Python except GUI IDE?

2016-06-05 Thread Michael Torrie
On 06/05/2016 10:01 PM, Michael Torrie wrote: > I've thought about this before and even tried my hand at creating a nice > library for doing this sort of thing with Python. Generators seem like > a natural analog for the shell pipes. However there is one big problem > with them

Re: Recommendation for GUI lib?

2016-06-07 Thread Michael Torrie
Accidentally didn't reply to the list... On 06/07/2016 03:45 PM, Roland Koebler via Python-list wrote: > You can also try Qt (http://qt.io), and one of its Python-bindings. > But I was never happy with Qt and think some GUI-concepts of GTK+ are much > better than the ones of Qt, and I like Glade m

Re: Possible PEP - two dimensional arrays?

2016-06-08 Thread Michael Torrie
On 06/07/2016 06:17 PM, Harrison Chudleigh wrote: > I was programming a computer game and found that while 1D arrays can be > created using the module array, there is no module for two-dimensional > arrays, unlike languages like C. Currently, the closest thing Python has to > a 2D array is a dictio

Re: how to solve memory

2016-06-09 Thread Michael Torrie
On 06/09/2016 06:58 PM, meInvent bbird wrote: > Do you have a question for the list? If so, please state what it is, and describe what you are doing and what isn't working. If you can boil it down to a dozen lines of run-able, self-contained code that illustrates the problem, that is helpful too

Re: base64.b64encode(data)

2016-06-13 Thread Michael Torrie
On 06/12/2016 11:16 PM, Steven D'Aprano wrote: > "Safe to transmit in text protocols" surely should mean "any Unicode code > point", since all of Unicode is text. What's so special about the base64 > ones? > > Well, that depends on your context. For somebody who cares about sending > bits over a p

Re: python regex: variable length of positive lookbehind assertion

2016-06-15 Thread Michael Torrie
On 06/15/2016 08:57 AM, Jussi Piitulainen wrote: > Marko Rauhamaa writes: >> And nothing in alister's answer suggests that. > > Now *I'm* surprised. He simply said, here's a regex that can parse the example string the OP gave us (which maybe looked a bit like HTML, but like you say, may not be),

Re: PyCon Keynote

2016-06-18 Thread Michael Torrie
On 06/18/2016 03:20 PM, Chris Angelico wrote: > On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: >> On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: >> >>>https://www.youtube.com/watch?v=bSfe5M_zG2s >> >> Good example of how not to do a presentation. Embarrassing. >> I turned it off after

Re: PyCon Keynote

2016-06-18 Thread Michael Torrie
On 06/18/2016 04:33 PM, Michael Torrie wrote: > On 06/18/2016 03:20 PM, Chris Angelico wrote: >> On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: >>> On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: >>> >>>>https://www.youtube.com/watch?v=bSfe5M_zG2

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/17/2016 05:52 PM, Chris via Python-list wrote: > Any suggestions for a good open source text editor for the Mac out > there? For now, I am going to stick with vim. Good choice. -- https://mail.python.org/mailman/listinfo/python-list

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie > wrote: >> >> On 06/17/2016 05:52 PM, Chris via Python-list wrote: >>> >>> Any suggestions for a good open source text editor for the Mac &g

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:50 PM, Michael Torrie wrote: > On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: >> But not vi/vim. It only lets you place your cursor *on* a character, >> not *in-between* characters. That’s why you need two separate >> insertion commands, insert-before and

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: > Pull up any old GUI-based editor you like, for example Windows > (shudder) Notepad. If there are N characters in your file, then the > insertion point can be placed at N + 1 positions: in-between two > adjacent characters, or before the first cha

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 08:51 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 2:09:31 PM UTC+12, Michael Torrie wrote: >> It was later on that they figured out the N+1 thing you mentioned by >> ignoring the character cells: >> >> 0 1 2 3 4 5 6 7 8 9 10 >> H E

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 08:51 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 2:09:31 PM UTC+12, Michael Torrie wrote: >> It was later on that they figured out the N+1 thing you mentioned >> by ignoring the character cells: >> >> 0 1 2 3 4 5 6 7 8 9 10 H E L L O

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Michael Torrie
On 06/19/2016 04:41 AM, Pete Forman wrote: > Both emacs and vim are powerful tools in the hands of experienced users > but I would recommend neither to someone starting out who is just > looking for a code-aware editor. In any case this doesn't matter here because the original poster already said

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Michael Torrie
On 06/19/2016 01:34 AM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 7:13:26 PM UTC+12, Christian Gollwitzer wrote: > >> Am 19.06.16 um 02:12 schrieb Lawrence D’Oliveiro: >> >>> But not vi/vim. It only lets you place your cursor *on* a character, >>> not *in-between* characters. >> >>

Re: Method Chaining

2016-06-19 Thread Michael Torrie
On 06/19/2016 09:01 AM, Ethan Furman wrote: > On 06/19/2016 04:56 AM, Joonas Liik wrote: >> On 18 June 2016 at 23:47, Ethan Furman wrote: >>> On 06/18/2016 07:05 AM, Joonas Liik wrote: > the leading dot does not resolve the ambiguity that arises from: with ob_a: with ob_b

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Michael Torrie
On 06/19/2016 10:20 AM, Rustom Mody wrote: > Yes the OP said he was using vim > And he could not handle a unicode encoding issue I missed that part! I somehow thought the unicode issues were coming from his use of the built-in Mac text editor. In any case, I have never had unicode problems with v

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Michael Torrie
On 06/19/2016 12:06 PM, Christian Gollwitzer wrote: > Am 19.06.16 um 18:20 schrieb Rustom Mody: >> I gave an emacs solution to the issue not because I find editor-wars engaging >> but because I dont know how to do *this* with vi. >> I'd be surprised if vi actually cant do these: >> 1. Look under th

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Michael Torrie
On 06/19/2016 03:21 PM, Quivis wrote: > On Sat, 18 Jun 2016 20:26:36 -0400, Joel Goldstick wrote: > >> that it is on every linux system > > No, it isn't! I can be *installed* on every Linux system, but that a > whole other can of worms. True vim is not. But vi should be. I'm not aware of any L

Re: Request for opinions: A cross language development tool

2016-06-21 Thread Michael Torrie
On 06/21/2016 06:10 AM, Tal Zion wrote: > So how does this magic work? We developed a new compiler platform called > Bridge. At the heart of Bridge is the Bridge Extensible Code > Representation (BECR). Code in any language is parsed into an AST and is > then translated to the BECR. The BECR sup

Re: while Loops

2016-06-21 Thread Michael Torrie
On 06/21/2016 09:50 PM, Elizabeth Weiss wrote: > i=1 > while i<=5: >print(i) >i=i+1 > > The result is: > 1 > 2 > 3 > 4 > 5 > > Why is one of the results 5 since i=i+1? Should the maximum result be 4 since > 4 +1=5? > > Thanks for your help! If you trace the execution through in your m

Re: how to python to use virtual memory?

2016-06-24 Thread Michael Torrie
On 06/24/2016 08:44 PM, Dennis Lee Bieber wrote: > I don't know how Linux handles swap disk -- Windows normally sets the > swap space to ~2X physical memory (for small RAM -- my 12GB system has a > 12GB swap and suggests 18GB). Linux typically uses a user-set swap partition. The old rule of

Re: Assignment Versus Equality

2016-06-26 Thread Michael Torrie
On 06/26/2016 12:47 PM, Christopher Reimer wrote: > I started writing a BASIC interpreter in Python. The rudimentary version > for 10 PRINT "HELLO, WORLD!" and 20 GOTO 10 ran well. The next version > to read each line into a tree structure left me feeling over my head. So > I got "Writing Compil

Getting back into PyQt and not loving it.

2016-06-26 Thread Michael Torrie
I'm starting to question the advice I gave not long ago to for new users to consider the Qt toolkit with Python. I just did a little project porting a simple graphical user interface from GTK+ to Qt (PyQt4 for now as that's what I have installed). For the most part it worked out pretty well. It'

Re: Getting back into PyQt and not loving it.

2016-06-26 Thread Michael Torrie
On 06/26/2016 07:05 PM, llanitedave wrote: > Not sure that wxPython is really any different in that respect, and > Tkinter doesn't feel Pythonic to me, either -- considering how it's > Tk at heart. So what's the alternative? There really is no good > Python-based GUI tool, and that's a shame. Gu

Re: Getting back into PyQt and not loving it.

2016-06-27 Thread Michael Torrie
On 06/27/2016 12:44 AM, Lawrence D’Oliveiro wrote: > On Monday, June 27, 2016 at 6:16:01 PM UTC+12, John Ladasky wrote: > >> Between the Py3 requirement and the need to work with all major OS's, I >> decided to learn PyQt and not GTK+. > > GTK+ is available for Python 3. > > No doubt it will wo

Re: Getting back into PyQt and not loving it.

2016-06-27 Thread Michael Torrie
On 06/27/2016 02:14 PM, codewiz...@gmail.com wrote: > On Sunday, June 26, 2016 at 5:45:18 PM UTC-4, Michael Torrie wrote: >> >> Qt's a fantastic toolkit, and the most mature of any of them, and the >> most portable, but man the bindings are not Pythonic at all. > >

Re: Question on compiling on linux

2016-06-27 Thread Michael Torrie
On 06/27/2016 08:28 PM, Steven D'Aprano wrote: > On Tue, 28 Jun 2016 10:01 am, Dennis Lee Bieber wrote: > >> The Outlook style works well in a business environment where the >> recipient is likely the original sender of the quoted text, and doesn't >> need the context -- the quoted copy is just a

Re: sample chatting apps in pyqt

2016-06-30 Thread Michael Torrie
On 06/30/2016 07:45 AM, tommy yama wrote: > Hi all, > > Let me post my question here > Has anyone installed and run any of sample chat apps in pyqt? > > Although I've tried to install and run sample scripts in pyqt once, the > error said pyqt must be reinstalled. If you paste the error message h

Re: Creating a calculator

2016-06-30 Thread Michael Torrie
On 06/30/2016 09:08 PM, Elizabeth Weiss wrote: > while True: > print("Options:") > print("Enter 'add' to add two numbers") > print("Enter 'subtract' to subtract two numbers") > print("Enter 'multiply' to multiply two numbers") > print("Enter 'divide' to divide two numb

Re: Structure of program development

2016-07-04 Thread Michael Torrie
On 07/04/2016 01:50 PM, BartC wrote: > On 04/07/2016 17:55, Chris Warrick wrote: > >>> A second question of the basic design. If I write a program, can I move it >>> to a computer that is without any Python software, or does that machine >>> have to download the Python software? Does Python prod

Re: Need help compiling Python-devel

2016-07-05 Thread Michael Torrie
On 07/05/2016 10:35 AM, TM wrote: > This option is not straight forward. There are too many dependencies. > Easier in Linux not so easy in AIX. > > Is it possible to copy the python executable (ie the code below)? > # cp -p python python-devel What is this python-devel thing? You said you wanted

Re: the best online course

2016-07-06 Thread Michael Torrie
On 07/06/2016 06:50 PM, Lawrence D’Oliveiro wrote: >> I want to be easy and not bored so i can learn python. > > There is no Royal Road, nothing is going to be handed to you on a plate. Seconded. If he gets bored easily, he will not be very successful at learning Python or any other programming

Re: Curious Omission In New-Style Formats

2016-07-11 Thread Michael Torrie
On 07/11/2016 01:27 PM, Ian Kelly wrote: > On Mon, Jul 11, 2016 at 12:54 PM, Terry Reedy wrote: >> In any case, I think it an improvement to say that '0x00123' has a field >> width of 7 rather than a 'precision' of 5. >> > '{:#07x}'.format(0x123) # specifiy field width >> '0x00123' > "%#0

Re: Compression of random binary data

2016-07-12 Thread Michael Torrie
On 07/12/2016 11:46 AM, jonas.thornv...@gmail.com wrote: > Well the algorithm start with looking up a suitable folding structure > "close enough to the number", then it works down the folding > structure finding the fold where the difference or sum between the > folds closest to zero. > > You do t

Re: [OT] Compression of random binary data

2016-07-13 Thread Michael Torrie
On 07/13/2016 03:46 AM, jonas.thornv...@gmail.com wrote: > It is not that the data is not compressible i just need more chunks > or random data, it is the footprint of the algorithm that has a > certain it is a structure afterall albeit richer in interpretation > than the numerical field. Err, no,

Re: Touch screen development in Python

2016-07-13 Thread Michael Torrie
On 07/13/2016 01:33 PM, Jahn wrote: > I would like to learn more how to write python based touch application > for embedded system but I do not know what conditions a touch screen must > have so that it > will response to touch. > Does anyone know? These days GUI toolkits such as GTK+ or Qt pr

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Michael Torrie
On 07/13/2016 01:00 AM, Chris Angelico wrote: > On Wed, Jul 13, 2016 at 4:44 PM, Steven D'Aprano > wrote: >> Even if Github was 100% open source with no proprietary extensions, and the >> *technical* cost of leaving was low, the single-network effect would still >> lock >> you in, which leaves yo

Re: Why not allow empty code blocks?

2016-07-24 Thread Michael Torrie
On 07/24/2016 07:14 PM, BartC wrote: > I've done little Python coding but still, having to use kid gloves for > indents does figure quite a bit in that. > > I can give some more examples but I'll probably be told that I'm using > the wrong tools! Which suggest there is a problem, but the effort

Re: Why not allow empty code blocks?

2016-07-30 Thread Michael Torrie
On 07/30/2016 11:53 AM, Steven D'Aprano wrote: > On Sun, 31 Jul 2016 02:29 am, Rustom Mody wrote: > >> MIT on practical reasons for python over scheme: >> > https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python >> Berkeley on fundamental reasons for the opposite choice:

Re: Why not allow empty code blocks?

2016-07-31 Thread Michael Torrie
On 07/31/2016 10:04 AM, 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 >

Re: Using valid emails

2016-08-01 Thread Michael Torrie
On 08/01/2016 10:32 AM, D'Arcy J.M. Cain wrote: > On Sun, 31 Jul 2016 14:01:26 -0600 > Michael Torrie wrote: >>> So I have to examine every address I reply to or deal with the >>> bounce message later. Way to move your spam problem to someone >>> else. >

Re: usage of functools.partial in in parallelism

2016-08-01 Thread Michael Torrie
On 08/01/2016 01:13 AM, Michael Selik wrote: > You might benefit from watching the talk "Stop Writing Classes" > https://www.youtube.com/watch?v=o9pEzgHorH0 Great talk! Thanks for posting that. -- https://mail.python.org/mailman/listinfo/python-list

Re: Ide or code editor confusion

2016-08-04 Thread Michael Torrie
On 08/04/2016 01:23 AM, Lawrence D’Oliveiro wrote: > On Friday, July 22, 2016 at 2:38:10 AM UTC+12, Chris Angelico wrote: >> On Fri, Jul 22, 2016 at 12:22 AM, sigmaphine1914 wrote: >>> Beginning Python: using Python 2.6 and Python 3.1. By James Payne >>> >>> Part II. >> >> Ugh, that's extremely ol

Re: Python slang

2016-08-06 Thread Michael Torrie
On 08/05/2016 07:14 PM, Steven D'Aprano wrote: > In English, we refer to ourselves in the first person as I, me, myself, and > sometimes "self", never as "this". One can say "this one has a hat", for > example, but it sounds weird, like something the Borg would say about a > specific Borg unit. Sa

Re: Python slang

2016-08-06 Thread Michael Torrie
On 08/06/2016 08:27 PM, Clayton Kirkwood wrote: > You can always tell the correctness by removing the other person. If it > doesn't sound right then, then it is wrong. You don't say 'I gave to I', or > 'I gave to me', it is 'I gave to myself'. Yup good point, and I failed at that obviously. Good

Re: How do I make a game in Python ?

2016-08-06 Thread Michael Torrie
On 08/06/2016 03:51 PM, Cai Gengyang wrote: > As in, any recommended websites that helps users create complex games in > Python ? I imagine you create a complex game in Python the same way you'd do it in just about any other language. Thus any website on game design would be broadly applicable.

Re: How do I make a game in Python ?

2016-08-07 Thread Michael Torrie
On 08/07/2016 08:47 AM, Cai Gengyang wrote: > Games are great. I guess I would like to invent animated games that > can teach students how to solve mathematical, physics, engineering , > Go and programming puzzles, basic financial literacy and investing > techniques through interesting and enrichin

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Michael Torrie
On 08/08/2016 06:20 AM, aaryanrevi...@gmail.com wrote: > Hello guys! I was answering a question on a piece of homework of > mine. Sadly I can't answer it correctly due to the repetitive error > being "Make sure you removed all debugging print statements." > Hopefully one of you guys can help me sol

Re: [Tutor] Unable to get the gateway IP of wlan interface using python code

2018-11-12 Thread Michael Torrie
On 11/12/2018 05:55 PM, David Rock wrote: > Is there a requirement to use only what comes in the standard libraries, or > can you use things from pypi? > Getting interface details is exactly why netifaces was created > > https://pypi.org/project/netifaces/ Also if working with NetworkManager is

Re: Have I Been Banned?

2018-11-24 Thread Michael Torrie
On 11/20/2018 09:39 AM, Jon Ribbens wrote: > On 2018-11-20, Wildman wrote: >> In the past I have participated in the group without any >> problems. I access the forum through the usenet mirror >> and I am still using the same newsreader and account. >> Recently I made some followup posts to the g

Re: Begginers problem : tar: Error opening archive: Can't initialize filter; unable to run program "bzip2 -d

2018-12-29 Thread Michael Torrie
On 12/29/2018 01:15 AM, Rand .J wrote: > I'm trying to run this code from : https://github.com/pnnl/*safekit* ,using > cmd on windows 10, I already installed python. when I type the command: tar > -xjvf data_examples.tar.bz2 > > I keep getting the error: tar: Error opening archive: Can't initializ

Re: the python name

2019-01-04 Thread Michael Torrie
On 01/03/2019 06:35 PM, Gene Heskett wrote: > On Thursday 03 January 2019 15:28:49 Grant Edwards wrote: >> About 20 years ago, the RedHat Linux (way before RHEL) installer >> (which was written in Python) was called Anaconda. > Thanks for rescuing my old wet ram Grant, thats exactly what I was >

Re: Pythonic Y2K

2019-01-18 Thread Michael Torrie
On 01/16/2019 12:02 PM, Avi Gross wrote: > I recall the days before the year 2000 with the Y2K scare when people > worried that legacy software might stop working or do horrible things once > the clock turned. It may even have been scary enough for some companies to > rewrite key applications and e

Re: How do I get a python program to work on my phone?

2019-01-28 Thread Michael Torrie
On 2019-01-28 8:29 a.m., Steve wrote: > I now want to run it on my MotoG phone. The program accepts keyed in data > and will access two text files to keep data and I would like to have the > program chime my phone to remind me to take the next reading. > > First step is to get it running in my ph

Re: How do I get a python program to work on my phone?

2019-01-29 Thread Michael Torrie
On 2019-01-29 5:52 a.m., Bob Gailer wrote: > An interesting alternatives to create a simple web page to run in the > phone's browser. If you don't already have a server on the web you can rent > one from secure dragon for as low as $12 a year. Install websocketd and > python. Websocketd lets you do

Re: How do I get a python program to work on my phone?

2019-01-29 Thread Michael Torrie
On 2019-01-29 8:44 a.m., Michael Torrie wrote: > There have been some Python to javascript compilers, or implementations > of Python in Javascript. So maybe it's possible to make a hybrid app > using Python. Here's an interesting project that might work with some hyb

Re: Python program to phone?

2019-02-07 Thread Michael Torrie
On 02/07/2019 09:00 PM, Steve wrote: > BeeWare looks as if it requires Java, does it? > Is it exclusively java? Kind of. You do your coding in Python, then that's compiled to python byte code, which is then translated to Java byte code. You'll need the Android SDK, even if you're not using Java

Re: Convert a list with wrong encoding to utf8

2019-02-14 Thread Michael Torrie
On 02/14/2019 12:02 PM, vergos.niko...@gmail.com wrote: > Τη Πέμπτη, 14 Φεβρουαρίου 2019 - 8:16:40 μ.μ. UTC+2, ο χρήστης Calvin > Spealman έγραψε: >> If you see something like this >> >> '\xce\x86\xce\xba\xce\xb7\xcf\x82 >> \xce\xa4\xcf\x83\xce\xb9\xce\xac\xce\xbc\xce\xb7\xcf\x82' >> >> then you d

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Michael Torrie
On 02/27/2019 11:36 AM, Karsten Hilbert wrote: > On Wed, Feb 27, 2019 at 10:38:25AM -0500, Dave wrote: > >> * GUI relatively easy to understand and implement. easyGUI is truly easy in >> all areas, but fails some of my other requirements. The QT/PyQT/PySide2 >> situation is a mess - which one to

Re: ANN: Creating GUI Applications with wxPython

2019-02-27 Thread Michael Torrie
On 02/27/2019 10:59 AM, Igor Korot wrote: > Hopefully with the wxQt having more and more development we might have > a wxQt/Android port getting attention. I don't think Qt has any plans to support Android with the traditional Qt framework. They've instead focused on their next generation system,

Re: "use strict"

2019-03-12 Thread Michael Torrie
On 03/11/2019 01:00 PM, Abdur-Rahmaan Janhangeer wrote: > the problem was that i was reviewing the code, since everything worked (no > errors but wrong output for sure) it took sometimes to find that var. it > was like someone telling me there is fish in that lake and i was throwing > my line tryin

Re: subprocess svn checkout password issue

2019-03-16 Thread Michael Torrie
On 03/16/2019 10:08 AM, Grant Edwards wrote: > I don't know about svn specifically, but in the past it was typical > for programs requiring passwords and assuming interactive usage to > issue the password prompt to and read the password from /dev/tty, > rather than stdin/stdout. That allowed their

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Michael Torrie
On 03/18/2019 05:55 PM, Ben Finney wrote: >> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of >> `RefrigeratedShippingContainer` class object, still it works. > > That's right, and is indeed the point of making a static method on a > class. I'm confused. The methods that refer to Refi

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Michael Torrie
On 03/18/2019 07:09 PM, Ben Finney wrote: > Arup Rakshit writes: > > Michael Torrie writes: > >> On 03/18/2019 05:55 PM, Ben Finney wrote: >>>> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of >>>> `RefrigeratedShippingContainer` class ob

Re: Determining latest stable version for download

2019-03-20 Thread Michael Torrie
On 03/20/2019 07:10 PM, Tim Johnson wrote: > * Ian Kelly [190320 12:00]: >> 1) https://www.python.org/downloads/ has release information. Based on that >> you would currently want 3.7.2. Make sure you actually download 3.7.2 and >> not 3.7.2rc1. > Understood. Thanks. Your info is the solution.

Re: Determining latest stable version for download

2019-03-21 Thread Michael Torrie
On 03/21/2019 09:36 AM, Tim Johnson wrote: > Michael, I should have asked the following question: > Would I be able to install from the EPEL Repository or the Redhat > Software Collections to a local ~/bin? I am not sure, but have my doubts. Software Collections distributes software in RPM,

Re: Function to determine list max without itertools

2019-04-19 Thread Michael Torrie
On 04/19/2019 04:01 AM, Sayth Renshaw wrote: > def max_try(listarg): > myMax = listarg[0] > try: > for item in listarg: > if item > myMax: > myMax = item > except TypeError: > print(f'Only numbers are supported, this entry "{item}" was not') >

Re: Error Opening Python for Windows Download

2019-05-13 Thread Michael Torrie
On 05/12/2019 04:42 PM, Alexandra Mistak wrote: > Hi Python, > > I have unsuccessfully downloaded Python Windows x86-64 executable installer > multiple > times. > > After installation, when I go to launch the program it tells me to

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Michael Torrie
On 05/20/2019 04:23 PM, Andrew Z wrote: > What does 249 specification mention about drivers? Nothing that I can see. But it stands to reason that at some point the Python code is going to have to interface with the SQL database server's API. And when the database in question is proprietary, the o

Re: PEP 594 cgi & cgitb removal

2019-05-24 Thread Michael Torrie
On 05/24/2019 01:24 PM, Marko Rauhamaa wrote: > There's a programming language arms race. Python wants to beat Java, C# > and go in the everything-for-everybody game. Python developers seem to > take the popularity of the language as proof of success. Pride goes > before the fall. I don't see this

Re: PEP 594 cgi & cgitb removal

2019-05-24 Thread Michael Torrie
On 05/24/2019 04:27 AM, Jon Ribbens via Python-list wrote: > On 2019-05-23, Gunnar Þór Magnússon wrote: >>> nginx is the current hotness. CGI has not been hotness since the >>> mid 90s. >> >> Serverless is the new hotness, and serverless is CGI. Technology is >> cyclical. > > Sorry, in what sense

Re: Checking refusal of a network connection

2019-06-01 Thread Michael Torrie
On 06/01/2019 11:15 AM, Markus Elfring wrote: >>> connect(3, {sa_family=AF_INET, sin_port=htons(37351), >>> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused) >> >> Without seeing the code, I'd be suspicious of that difference. > > I would expect that the IPv4 addre

Re: FDs will be closed after exception automatically in python2.7?

2019-06-10 Thread Michael Torrie
On 06/10/2019 04:18 AM, lampahome wrote: > as title, > > I confused will fd will be close after exception automatically? > Like: > try: > fd=open("file","w+") > fd.get() //any useless function of fd > except Exception: > print 'hi' No. What if you want to work with the fd object afte

Re: How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Michael Torrie
On 06/13/2019 05:49 PM, Christian Seberino wrote: > I have a third party GUI that manages some hardware. > > I want to control the hardware from a Python script. > > This seems to mean I need to somehow have Python code > that imitates a human doing the necessary > actions on the GUI (selec

Re: Use global, or not

2019-06-29 Thread Michael Torrie
On 06/29/2019 05:42 AM, Cecil Westerhof wrote: > That was the other possibility I was thinking about. And that would be > maybe better. Because I now do things like: > global_dict['messages']['created'].format(len(filepathArr)) > > much better would be: > instance.created(len(filepathArr))

Re: How do you insert an item into a dictionary (in python 3.7.2)?

2019-06-29 Thread Michael Torrie
On 06/28/2019 09:06 AM, CrazyVideoGamez wrote: > How do you insert an item into a dictionary? For example, I make a dictionary > called "dictionary". > > dictionary = {1: 'value1', 2: 'value3'} > > What if I wanted to add a value2 in the middle of value1 and value3? How about: dict[1.5] = 'valu

Re: Handle foreign character web input

2019-06-30 Thread Michael Torrie
On 06/30/2019 06:21 AM, Richard Damon wrote: > On 6/30/19 4:00 AM, moi wrote: >> Unfortunately not. >> >> The only thing Python succeeds to propose is a mechanism >> which does the opposite of UTF-8 when it comes to handle >> memory *and* - at the same time - which also does the opposite >> of UTF-

Re: Do I need a parser?

2019-07-02 Thread Michael Torrie
On 07/02/2019 12:47 PM, Thomas Jollans wrote: > Obviously, as Cameron points out, using Python instead of a custom > scripting language has security implications, that go with the increased > power that the user has. I've always found this kind of thing to be a bit strange. I do understand where

Re: What's wrong on using Popen's communicate method?

2019-07-05 Thread Michael Torrie
On 07/05/2019 09:03 PM, jf...@ms4.hinet.net wrote: > From Vista to Win10? That's a three generation gap! Buy a new PC might be > a better solution:-) Maybe. Windows 10 would probably run okay on that machine. It might be 10 years old, but if it's 64-bit, Win 10 should run on it. You could a

Re: Proper shebang for python3

2019-07-24 Thread Michael Torrie
On 7/24/19 4:20 PM, Cameron Simpson wrote: > That is some progress, hooray. Then there's just sbin -> bin to go. I suppose in the olden days sbin was for static binaries, usable in single user mode for recovering the system without the main drive mounted. In more recent times, binaries that are

Re: Boolean comparison & PEP8

2019-07-28 Thread Michael Torrie
On 7/28/19 5:55 AM, Jonathan Moules wrote: > But this appears to be explicitly called out as being "Worse" in PEP8: > > """ > Don't compare boolean values to True or False using ==. > > Yes:   if greeting: > No:    if greeting == True: > Worse: if greeting is True: > """ Yet the recommended solu

Re: Boolean comparison & PEP8

2019-07-28 Thread Michael Torrie
On 7/28/19 6:04 PM, Chris Angelico wrote: > This is a fairly unusual case, though. More commonly, the default > would be None, not False, and "if bar is None:" is extremely well > known and idiomatic. Ahh yes, true. > This analysis is correct, but the situations where you *actually* want > to kno

Re: help with tkinter

2019-08-09 Thread Michael Torrie
On 8/9/19 4:52 AM, Peter J. Holzer wrote: > On 2019-08-09 10:34:34 +0300, Ahmad Adam Kabbara wrote: >> so when I write from >> tkinter import* >> t=Tk() >> tkinter.colorchooser.askcolor() >> I get this error message >> Traceback (most recent call last): >> File "C:\Users\kabba\Desktop\color and c

Re: Web framework for static pages

2019-08-12 Thread Michael Torrie
On 8/12/19 1:14 AM, morphex wrote: > What frameworks are there for generating static web pages in Python? What are > the features of each? A quick google search reveals a number of them. Pelican, Hyde, etc. -- https://mail.python.org/mailman/listinfo/python-list

Re: How should we use global variables correctly?

2019-08-22 Thread Michael Torrie
On 8/22/19 10:00 AM, Windson Yang wrote: > I can 'feel' that global variables are evil. I also read lots of articles > proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found > CPython Lib use quite a lot of `global` keyword. So how should we use > `global` keyword correctly? IIUC

<    2   3   4   5   6   7   8   9   10   11   >