Re: Simple algorithm question - how to reorder a sequence economically

2013-05-24 Thread John Ladasky
On Friday, May 24, 2013 3:52:18 AM UTC-7, Steven D'Aprano wrote: > On Fri, 24 May 2013 01:14:45 -0700, Peter Brooks wrote: > > > That is, for a sequence 1,2,3,4 to produce an arbitrary ordering (eg > > 2,1,4,3) that is different each time. > > You can't *guarantee* that it will be different each

Re: Python Magazine

2013-05-25 Thread John Ladasky
On Saturday, May 25, 2013 8:30:19 AM UTC-7, Roy Smith wrote: > From my phone, I > can call any other phone anywhere in the world. But I can't talk > directly to the file server in my neighbor's house across the street? Hmmm... I've been an advocate of IPv6, but... now you've got me thinking of

Re: Simple algorithm question - how to reorder a sequence economically

2013-05-25 Thread John Ladasky
On Friday, May 24, 2013 10:33:47 AM UTC-7, Yours Truly wrote: > If you don't reshuffle p, it guarantees the maximum interval between reusing > the same permutation. Of course, that comes at a certain price. Given two permutations p[x] and p[x+1], they will ALWAYS be adjacent, in every repetition

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread John Ladasky
On Friday, May 24, 2013 4:36:35 PM UTC-7, Carlos Nepomuceno wrote: > #to create the tables list > tables=[[re.findall('(.*?)',r,re.S) for r in > re.findall('(.*?)',t,re.S)] for t in > re.findall('(.*?)',page,re.S)] > > > Pretty simple. Two nested list comprehensions, with regex pattern matchi

Re: Python Magazine

2013-05-25 Thread John Ladasky
A perfectly fair point, Roy. It's just when you started suggesting connecting to your neighbor's file server -- well, that's not something that many people would ordinarily do. So, my mind leaped to the possibility of uninvited connections. Related question: would denial-of-service attacks be

Re: help?? on functions

2013-05-27 Thread John Ladasky
Steven gave you a lot of good advice. Let me add just one remark. Python already has a builtin function called "input." If you define a variable with the same name as a builtin and then you try to use that builtin, you will be in for a (usually unpleasant) surprise. -- http://mail.python.org/

Re: How clean/elegant is Python's syntax?

2013-05-30 Thread John Ladasky
On Thursday, May 30, 2013 11:36:54 AM UTC-7, Ian wrote: > I don't object to changing the join method (one of the more > shoe-horned string methods) back into a function, but to my eyes > you've got the arguments backward. It should be: > > def join(sep, iterable): return sep.join(iterable) > >

Re: Beginner question

2013-06-04 Thread John Ladasky
On Monday, June 3, 2013 11:46:03 PM UTC-7, Carlos Nepomuceno wrote: > That doesn't even works because input() is the same as eval(raw_input()). So > you'll get a NameError exception. > > I think you know that. Perhaps you mean raw_input() instead of input(). But the OP's code shows print() funct

Re: Beginner question

2013-06-04 Thread John Ladasky
On Tuesday, June 4, 2013 12:45:38 AM UTC-7, Anssi Saari wrote: > BTW, did I get the logic correctly, the end result is random? You're right! I'm guessing that's not what the OP wants? -- http://mail.python.org/mailman/listinfo/python-list

My son wants me to teach him Python

2013-06-12 Thread John Ladasky
Hi folks, My son is 17 years old. He just took a one-year course in web page design at his high school. HTML is worth knowing, I suppose, and I think he has also done a little Javascript. He has expressed an interest in eventually wanting to program 3D video games. For that purpose, HTML

Re: My son wants me to teach him Python

2013-06-12 Thread John Ladasky
On Wednesday, June 12, 2013 8:02:46 PM UTC, Chris Angelico wrote: > [1] http://www.greenteapress.com/thinkpython/ I think, but DNS on this > computer is broken at the moment so I can't verify that link Your link is correct, thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: My son wants me to teach him Python

2013-06-12 Thread John Ladasky
On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote: >Unless you have a good reason for sticking with 2.x, go with 3.x. I agree, Chris, I will be teaching my son Python 3 from the start. In fact, I'm in the middle of a messy upgrade of my own computer to get everything ready for Py

Re: Newbie: The philosophy behind list indexes

2013-06-15 Thread John Ladasky
On Friday, June 14, 2013 10:21:28 PM UTC-7, ian.l@gmail.com wrote: >I'm sure there's a good reason, but I'm worried it will result in a lot of >'one-off' errors for me, so I need to get my head around the philosophy of this >behaviour, and where else it is observed (or not observed.) My under

Imports (in Py3), please help a novice

2013-06-15 Thread John Ladasky
I'm currently running Python 3.3 on Ubuntu 13.04. Up until now, I have gotten away with writing modules whose namespace is completely defined within a single Python script. That has allowed me to use the following, simple setup script for installation by distutils: ## setup.py ## from distuti

Re: Imports (in Py3), please help a novice

2013-06-15 Thread John Ladasky
Followup to my own post: I am sticking pretty closely to this example from Mike Driscoll which, admittedly, is based on Python 2.6: http://www.blog.pythonlibrary.org/2012/07/08/python-201-creating-modules-and-packages/ I'm trying to do this one step at a time. First try a local import, then i

Re: Imports (in Py3), please help a novice

2013-06-16 Thread John Ladasky
Thanks for your reply, Miki. On Sunday, June 16, 2013 7:50:53 AM UTC-7, Miki Tebeka wrote: > > Is there an import / distutils tutorial out there? I'm looking for it, but > > perhaps one of you already knows where to find it. Thanks! > > Did you have a look at http://docs.python.org/3.3/distuti

Homework help requested (not what you think!)

2013-07-16 Thread John Ladasky
Hi folks, No, I'm not asking for YOU to help ME with a Python homework assignment! Previously, I mentioned that I was starting to teach my son Python. https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ He just took a course at his high school called Web Technology and D

Homework help requested, thanks to everyone.

2013-07-21 Thread John Ladasky
Thanks to everyone for their wealth of suggestions. I already had my students playing with turtle. And I had asked them to alphabetize a string (without having previously revealed the sorted() function). So far, I have taken up the suggestion of the number-guessing game. One of my students h

PyGLet on Python 3

2013-07-22 Thread John Ladasky
On 07/21/2013 08:10 PM, Joseph Clark wrote: > John, have you taken a look at pyglet? It's an alternative to pygame and I > found it pretty slick once I got the hang of it. There is a development > version that's compatible with python 3 and I've never had a bug with it. It > wraps OpenGL itse

Python3, GUIs, game APIs, PyGLet, 2to3...?

2013-07-24 Thread John Ladasky
I am teaching Python 3 to a few beginning computer programming students. Being high-school age boys, they are, unsurprisingly, interested in games. I want to introduce them to real-time programming and GUI in the most painless way possible. I know that Python comes bundled with Tkinter. Asid

Re: Python3, GUIs, game APIs, PyGLet, 2to3...?

2013-07-25 Thread John Ladasky
Followup to my own post: I've made progress with PyGLet. I should mention that I'm using Ubuntu Linux 13.04 64-bit, in case it matters. I tried executing "2to3 -w *.py" on just the files in the directory pyglet-1.2alpha1/pyglet. I then changed back to the pyglet-1.2alpha1 directory, and execu

Re: Python3, GUIs, game APIs, PyGLet, 2to3...?

2013-07-25 Thread John Ladasky
On Thursday, July 25, 2013 1:35:43 AM UTC-7, Kushal Kumaran wrote: > Does your python command mean python2 or python3? The setup.py at > https://code.google.com/p/pyglet/source/browse/setup.py seems to run > 2to3 automatically, but that will only happen if you actually use > python3 to run setup.

Re: PyGLet on Python 3

2013-07-25 Thread John Ladasky
Hi Devyn. After I didn't get a response concerning PyGLet inside this thread, I started another thread. It's here: https://groups.google.com/forum/#!topic/comp.lang.python/ARtI0GC9RHc -- http://mail.python.org/mailman/listinfo/python-list

PyGLet, 2to3...?

2013-07-25 Thread John Ladasky
On Thursday, July 25, 2013 3:26:01 PM UTC-7, John Ladasky wrote: > I'll try again from scratch, and see whether that clears up my problems. Nope, that didn't work. === john@john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup.py install [sudo]

Re: PyGLet, 2to3...?

2013-07-26 Thread John Ladasky
On Thursday, July 25, 2013 4:49:16 PM UTC-7, John Ladasky wrote: > On Thursday, July 25, 2013 3:26:01 PM UTC-7, John Ladasky wrote: > > > I'll try again from scratch, and see whether that clears up my problems. > > Nope, that didn't work. Thanks to both Jerry and Ku

Re: PyGLet, 2to3...?

2013-07-26 Thread John Ladasky
I'm making progress, but I'm not out of the woods yet. I'm trying to run some of the programs from the tutorial web pages, and from the pyglet1.2alpha1/examples directory. I've realized that I will probably need to run 2to3 on the many of the latter. The Hello, World example runs. http://ww

Re: PyGLet, 2to3...?

2013-07-26 Thread John Ladasky
On Friday, July 26, 2013 6:19:48 PM UTC-7, John Ladasky wrote: > I'm making progress, but I'm not out of the woods yet. And while I appreciate any comments that may appear here, I've just found the pyglet-users group... https://groups.google.com/forum/#!forum/pyglet-users ...

Pyglet on Python3.x, problems

2013-07-29 Thread John Ladasky
Hi folks, For whatever reason, the pyglet package is getting a lot of attention on c.l.python these past few days. I am guilty of generating some of that potentially off-topic conversation myself. At the end of my last thread, I reported that I had found the pyglet-users newsgroup, and would

Re: Pyglet on Python3.x, problems

2013-07-29 Thread John Ladasky
Thanks for your reply, Joshua. >From the interpreter, I too can import pyglet, instantiate a >pyglet.window.Window, and have it pop up (although, following your directions, >now I can't CLOSE it because you didn't assign a name to it! :^]). I can get >all the help information as well. It look

Re: Pyglet on Python3.x, problems

2013-07-29 Thread John Ladasky
G. Ian, thank you, you gave me a clue. I thought I was being careful about avoiding local imports. I just removed the tests directory from inside the pyglet-1.2alpha1 directory and tried running it from its new location. That got rid of the error message which was displaying uncorrected

Re: lambda in list comprehension acting funny

2012-07-11 Thread John Ladasky
Exactly. It's threads like these which remind me why I never use lambda. I would rather give a function an explicit name and adhere to the familiar Python syntax, despite the two extra lines of code. I don't even like the name "lambda". It doesn't tell you what it is (unless you're John McCa

Re: from future import pass_function

2012-07-26 Thread John Ladasky
On Wednesday, July 25, 2012 9:32:33 PM UTC-7, Ethan Furman wrote: > What code does `pass` run? When do we pass parameters to `pass`? When > do we need to override `pass`? > > Answers: None. Never. Still waiting for a reply from the OP for a use > case. When I brought up this same issue s

Re: from future import pass_function

2012-07-26 Thread John Ladasky
On Wednesday, July 25, 2012 1:40:45 AM UTC-7, Ulrich Eckhardt wrote: > Hi! > > I just had an idea, it occurred to me that the pass statement is pretty > similar to the print statement, and similarly to the print() function, > there could be a pass() function that does and returns nothing. I had

Re: from future import pass_function

2012-07-26 Thread John Ladasky
On Thursday, July 26, 2012 2:23:02 PM UTC-7, Ethan Furman wrote: > That's a reasonable thing to want, and quite easily accomplished by > passing `lambda: None` or `lambda *args, **kwargs: None` instead. That's the same solution that Steven D'Aprano proposed the last time we had this discussion

Re: Intermediate Python user needed help

2012-08-05 Thread John Ladasky
Check line 76 of your code for errors. If line 76 is incorrectly formed, Python may see line 77 as a continuation of line 76 and throw the SyntaxError because of that. -- http://mail.python.org/mailman/listinfo/python-list

Arithmetic with Boolean values

2012-08-11 Thread John Ladasky
I have gotten used to switching back and forth between Boolean algebra and numerical values. Python generally makes this quite easy. I just found a case that surprises me. Here is what I want to accomplish: I want to process a list. If the length of the list L is odd, I want to process it o

Re: Encapsulation, inheritance and polymorphism

2012-08-18 Thread John Ladasky
On Tuesday, July 17, 2012 12:39:53 PM UTC-7, Mark Lawrence wrote: > I would like to spend more time on this thread, but unfortunately the 44 > ton artic carrying "Java in a Nutshell Volume 1 Part 1 Chapter 1 > Paragraph 1 Sentence 1" has just arrived outside my abode and needs > unloading :-)

Re: help me debug my "word capitalizer" script

2012-08-23 Thread John Ladasky
On Wednesday, August 22, 2012 3:28:18 AM UTC-7, Kamil Kuduk wrote: > less file.txt | sed -e "s/\b\([a-z]\{4,\}\)/\u\1/g" Say what? Yes, you could do a crazy regex at the Linux prompt. But... will you be able to retain that insane syntax in your head until the NEXT time you need to write somet

Re: interfacing with x86_64 assembler

2012-09-01 Thread John Ladasky
I haven't seen this joke on the Net in years, does anyone still remember it? "C combines the power of assembly language with the readability and maintainability of assembly language." -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a specific sort of string modification. Can someone help?

2013-01-06 Thread John Ladasky
On Saturday, January 5, 2013 12:35:26 AM UTC-8, Sia wrote: > I have strings such as: > > tA.-2AG.-2AG,-2ag > > .+3ACG.+5CAACG.+3ACG.+3ACG Just curious, do these strings represent DNA sequences? -- http://mail.python.org/mailman/listinfo/python-list

Re: RIse and fall of languages in 2012

2013-01-10 Thread John Ladasky
On Wednesday, January 9, 2013 11:23:51 PM UTC-8, Steven D'Aprano wrote: > One should always be careful pronouncing a language dead or dying, No kidding! https://www.google.com/#q=is+fortran+still+used I usually use the query phrase "Why isn't Fortran dead yet?", but you get a better list of l

Re: Thought of the day

2013-01-16 Thread John Ladasky
On Sunday, January 13, 2013 8:16:29 PM UTC-8, Steven D'Aprano wrote: > A programmer had a problem, and thought Now he has "I know, I'll solve > two it with threads!" problems. Very nice! :^) This problem isn't exclusive to Python, however. Other multi-threaded applications can produce jumbled

MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !!!!!!!!!!!!!!

2012-02-26 Thread John Ladasky
On Feb 26, 12:29 am, BV wrote: > MAJOR CANADIAN CHRISTIAN MISSIONARY CONVERTS TO ISLAM MAJOR JAVA EVANGELIST CONVERTS TO PYTHON !! ...Hey, someone has to keep the spam around here on-topic. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python math is off by .000000000000045

2012-02-26 Thread John Ladasky
Curiosity prompts me to ask... Those of you who program in other languages regularly: if you visit comp.lang.java, for example, do people ask this question about floating-point arithmetic in that forum? Or in comp.lang.perl? Is there something about Python that exposes the uncomfortable truth ab

Re: Python is readable

2012-03-18 Thread John Ladasky
On Mar 14, 11:23 pm, alex23 wrote: > The idea that Python code has to be obvious to non-programmers is an > incorrect and dangerous one. Incorrect? Probably. Dangerous? You'll have to explain what you mean. What I would say is that, when PROGRAMMERS look at Python code for the first time, th

No os.copy()? Why not?

2012-04-02 Thread John Ladasky
I'm looking for a Python (2.7) equivalent to the Unix "cp" command. Since the equivalents of "rm" and "mkdir" are in the os module, I figured I look there. I haven't found anything in the documentation. I am also looking through the Python source code in os.py and its child, posixfile.py. Any hel

Re: No os.copy()? Why not?

2012-04-02 Thread John Ladasky
On Mar 28, 9:50 pm, alex23 wrote: > On Mar 29, 6:12 am, John Ladasky wrote: > > > I'm looking for a Python (2.7) equivalent to the Unix "cp" command. > > Any help?  Thanks. > > Try the shutil module:http://docs.python.org/library/shutil.html Many thanks!

Re: No os.copy()? Why not?

2012-04-03 Thread John Ladasky
I use subprocess.call() for quite a few other things. I just figured that I should use the tidier modules whenever I can. -- http://mail.python.org/mailman/listinfo/python-list

Re: having both dynamic and static variables

2011-03-22 Thread John Ladasky
On Mar 5, 9:44 pm, John Nagle wrote: >     All functions in Python can be replaced dynamically. While they're > running. From another thread.  Really. Indeed, and I find this feature VERY useful when coding. Two places I've used it are: 1) in GUI coding (say, when I have a panel of buttons, an

Why aren't copy and deepcopy in __builtins__?

2011-03-27 Thread John Ladasky
Simple question. I use these functions much more frequently than many others which are included in __builtins__. I don't know if my programming needs are atypical, but my experience has led me to wonder why I have to import these functions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why aren't copy and deepcopy in __builtins__?

2011-03-28 Thread John Ladasky
On Mar 28, 2:25 am, Andrea Crotti wrote: > John Ladasky writes: > I almost never use them either, maybe also in many cases you could avoid > using them... > When for example you use them? To take one example: neural network programming. I construct a network object (which is q

Multiprocessing, shared memory vs. pickled copies

2011-04-04 Thread John Ladasky
Hi folks, I'm developing some custom neural network code. I'm using Python 2.6, Numpy 1.5, and Ubuntu Linux 10.10. I have an AMD 1090T six-core CPU, and I want to take full advantage of it. I love to hear my CPU fan running, and watch my results come back faster. When I'm training a neural net

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-05 Thread John Ladasky
Hi Philip, Thanks for the reply. On Apr 4, 4:34 pm, Philip Semanchuk wrote: > So if you're going to use multiprocessing, you're going to use pickle, and you > need pickleable objects. OK, that's good to know. > > Pickling is still a pretty > > vague progress to me, but I can see that you have

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-06 Thread John Ladasky
Hello again, Philip, I really appreciate you sticking with me. Hopefully this will help someone else, too. I've done some more reading, and will offer some minimal code below. I've known about this page for a while, and it describes some of the unconventional things one needs to consider when s

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-07 Thread John Ladasky
Following up to my own post... On Apr 6, 11:40 pm, John Ladasky wrote: > What's up with that? Apparently, "what's up" is that I will need to implement a third method in my ndarray subclass -- namely, __reduce__. http://www.mail-archive.com/numpy-discussion@scipy.org/ms

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-07 Thread John Ladasky
On Apr 7, 10:44 am, Robert Kern wrote: > On 4/7/11 1:40 AM, John Ladasky wrote: > > > On Apr 5, 10:43 am, Philip Semanchuk  wrote: > >> And as Robert Kern pointed out, numpy arrays are also pickle-able. > > > OK, but SUBCLASSES of numpy.ndarray are not, in my hands,

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-09 Thread John Ladasky
On Apr 7, 6:10 pm, sturlamolden wrote: > On 8 apr, 02:38, sturlamolden wrote: > > > I should probably fix it for 64-bit now. Just recompiliong with 64-bit > > integers will not work, because I intentionally hardcoded the higher > > 32 bits to 0. > > That was easy, 64-bit support for Windows is do

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-09 Thread John Ladasky
On Apr 9, 10:15 am, sturlamolden wrote: > On 9 apr, 09:36, John Ladasky wrote: > > > Thanks for finding my discussion!  Yes, it's about passing numpy > > arrays to multiple processors.  I'll accomplish that any way that I > > can. > > My preferred ways

Re: Egos, heartlessness, and limitations

2011-04-13 Thread John Ladasky
I may regret wading into a flame-war, but... I got started with Python in 2002. I took one look at TKinter, said "yuck!", and went searching for something else. Now, wxPython is a bit clunky for a Python programmer because of its strong ties to C++ -- but that's what I chose, and it has served m

Multiprocessing: don't push the pedal to the metal?

2011-05-21 Thread John Ladasky
Hello again, everyone. I'm developing some custom neural network code. I'm using Python 2.6, Numpy 1.5, and Ubuntu Linux 10.10. I have an AMD 1090T six-core CPU. About six weeks ago, I asked some questions about multiprocessing in Python, and I got some very helpful responses from you all. ht

Re: Multiprocessing: don't push the pedal to the metal?

2011-05-22 Thread John Ladasky
Following up to my own post... Flickr informs me that quite a few of you have been looking at my graphs of performance vs. the number of sub-processes employed in a parallelizable task: On May 21, 8:58 pm, John Ladasky wrote: > http://www.flickr.com/photos/15579975@N00/5744093219 [...] >

Re: Multiprocessing: don't push the pedal to the metal?

2011-05-23 Thread John Ladasky
On May 23, 2:50 am, Adam Tauno Williams wrote: > I develop an app that uses multiprocessing heavily.  Remember that all > these processes are processes - so you can use all the OS facilities > regarding processes on them.  This includes setting nice values, > schedular options, CPU pinning, etc..

Re: Puzzled by list-appending behavior

2011-05-26 Thread John Ladasky
On May 25, 9:46 pm, Uncle Ben wrote: > list = [1,2,3] Somewhat unrelated, but... is it a good idea to name your list "list"? Isn't that the name of Python's built-in list constructor method? Shadowing a built-in has contributed to more than one subtle bug in my code, and I've learned to avoid

Re: My Issues

2017-09-13 Thread John Ladasky
On Wednesday, September 13, 2017 at 2:37:48 PM UTC-7, iv...@linebox.ca wrote: > Hi Carson, > > If you are having big troubles installing Python on Windows (it really should > be a click install from the Python download page here > https://www.python.org/downloads/) you can use Anaconda to instal

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-18 Thread John Ladasky
On Saturday, September 16, 2017 at 11:01:03 PM UTC-7, Terry Reedy wrote: > On 9/16/2017 7:04 PM, b...@g...com wrote: > The particular crippler for CLBG problems is the non-use of numpy in > numerical calculations, such as the n-body problem. Numerical python > extensions are over two decades ol

Stdlib, what's in, what's out (was: "Energy Efficiency across Programming Languages")

2017-09-18 Thread John Ladasky
On Monday, September 18, 2017 at 5:13:58 PM UTC-7, MRAB wrote: > On 2017-09-18 23:08, b...@g...com wrote: > > My rationale is simple, the authors of the libraries are not tied into the > > (c)Python release cycle, the PEP process or anything else, they can just > > get on with it. > > > > Consi

Re: Stdlib, what's in, what's out

2017-09-19 Thread John Ladasky
On Tuesday, September 19, 2017 at 1:05:51 AM UTC-7, Stefan Behnel wrote: > John Ladasky schrieb am 19.09.2017 um 08:54: > > I have come to understand from your other posts that adding something to > > the stdlib imposes significant constraints on the release schedules of > >

Re: converting numbers into words (Posting On Python-List Prohibited)

2017-11-09 Thread John Ladasky
On Wednesday, November 8, 2017 at 11:40:18 PM UTC-8, Lawrence D’Oliveiro wrote: > On Thursday, November 9, 2017 at 7:51:35 PM UTC+13, r16...@rguktrkv.ac.in > wrote: > > > How can I covert numbers into word like ex:-123 One hundred twenty three? > > Here’s

Re: Problem with assignment. Python error or mine?

2017-12-21 Thread John Ladasky
On Thursday, December 21, 2017 at 7:37:39 AM UTC-8, MRAB wrote: > Python never makes a copy unless you ask it to. > > What x1=X does is make the name x1 refer to the same object that X > refers to. No copying. Well, except with very simple, mutable data types like scalars... compare this: >>>

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

2018-01-29 Thread John Ladasky
On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote: > > (The day a programmer posts a WAV file of themselves reading their code > out aloud, is the day I turn my modem off and leave the internet forever.) What's a... modem? -- https://mail.python.org/mailman/listinfo/python-l

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread John Ladasky
On Friday, February 9, 2018 at 12:50:16 AM UTC-8, Tim Golden wrote: [snip and rearrange] > So dropping GG altogether would probably not add very much, as we're > generally blocking undesirable posts from there and we'd rather not > block genuine posts which happen to be made through the relativ

PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
Hi there, I am making my first attempt at 3D rendering. My system configuration: OS : Ubuntu 16.04 64-bit Python : 3.5.1 Qt : 5.5.1 PyQt : 5.5.1 OpenGL : 4.5.0 (I have a modern GPU) All software was installed from the Canonical repository. I didn't build any binaries myself. >From

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:45:50 PM UTC-7, Lawrence D’Oliveiro wrote: > On Monday, October 3, 2016 at 2:14:13 PM UTC+13, John Ladasky wrote: > > > > I am making my first attempt at 3D rendering. > > Bear in mind there are two kinds of 3D rendering: realtime (with OpenGL

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:21:15 PM UTC-7, blue wrote: > You have here a PyQt5 Reference Guide > http://pyqt.sourceforge.net/Docs/PyQt5/index.html > Some example can be found here 4 and 5 > http://codeprogress.com/python/libraries/pyqt/ That's a nice page of examples, but there are no OpenG

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-03 Thread John Ladasky
On Monday, October 3, 2016 at 1:30:29 AM UTC-7, Phil Thompson wrote: > On 3 Oct 2016, at 4:29 am, John Ladasky wrote: > > And as you can see: trying to call versionFunctions() is exactly where my > > program failed. > > Try passing a QOpenGLVersionProfile object to versio

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-08 Thread John Ladasky
ext() f = QSurfaceFormat() # The default p = QOpenGLVersionProfile(f) self.GL = c.versionFunctions(p) super().initializeGL() On Tuesday, October 4, 2016 at 12:56:53 AM UTC-7, Phil Thompson wrote: > On 4 Oct 2016, at 5:57 am, John Ladasky wrote: > > > &

Re: comapring 2 sequences of DNA ouput the silent and non mutations

2016-10-29 Thread John Ladasky
Disha, Before you struggle to reinvent the wheel, you might want to check out the Biopython package. http://biopython.org/wiki/Biopython I haven't used it for a few years, but the version that I did use was very comprehensive. -- https://mail.python.org/mailman/listinfo/python-list

Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-08 Thread John Ladasky
On Monday, November 7, 2016 at 5:23:25 PM UTC-8, Steve D'Aprano wrote: > On Tue, 8 Nov 2016 05:47 am, j...@i...edu wrote: > > It has been very important for the field of computational molecular > > dynamics (and probably several other fields) to get floating-point > > arithmetic working right on GP

Re: Thank you Python community!

2018-03-20 Thread John Ladasky
On Monday, March 19, 2018 at 9:28:09 AM UTC-7, Etienne Robillard wrote: > I would like to thank you guys sincerely for helping a lot of people to > stay clean, and focus on programming high-level stuff in Python instead > of doing some really nasty drugs. Yeah, it's either Python or that horrif

Re: Plot not working

2018-05-04 Thread John Ladasky
On Friday, May 4, 2018 at 9:13:02 PM UTC-7, Sharan Basappa wrote: > I am new to Python and using it to learn machine learning. > > Below is a sample program I am running to plot IRIS data set. > The code runs but no plot comes up. I am not sure what the issue is with the > code. > > # Imports >

Re: Posting warning message

2018-06-10 Thread John Ladasky
On Sunday, June 10, 2018 at 7:47:01 AM UTC-7, T Berger wrote: > When I go to post a reply, I get a warning asking if I want my email address > (or other email addresses listed) visible to all, and do I want to edit my > post. What should I do? Are you posting through Google Groups? Sometimes I

Matplotlib 3D limitations, please recommend alternative

2018-07-04 Thread John Ladasky
I'm a regular Matplotlib user. Normally, I graph functions. I just attempted to graph an icosahedral surface using the plot_trisurf() methods of Matplotlib's Axes3D. I have discovered that Matplotlib is basically hard-wired for graphing functions, and therefore will not work for general-purpos

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-06 Thread John Ladasky
On Wednesday, July 4, 2018 at 3:30:32 PM UTC-7, Rick Johnson wrote: > On Wednesday, July 4, 2018 at 4:53:19 PM UTC-5, John Ladasky wrote: > > There are many 3D graphics packages on PyPI. Some appear to be quite > > specialized. I would appreciate your recommendations. Thanks! &g

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-06 Thread John Ladasky
On Wednesday, July 4, 2018 at 6:38:18 PM UTC-7, William Ray Wing wrote: > > On Jul 4, 2018, at 5:53 PM, John Ladasky wrote: [snip] > > I explored Python OpenGL bindings about three years ago, and quickly got > > bogged down. Even with Python to assist, dealing with OpenGL wa

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-07 Thread John Ladasky
On Saturday, July 7, 2018 at 6:36:16 AM UTC-7, Rick Johnson wrote: > John Ladasky wrote: > > > Back then I wrote: > > > > "I have concluded that Qt, PyQt, and OpenGL are all > > rapidly-evolving, and huge, software packages. There may > > be compatibi

Can pip install packages for all users (on a Linux system)?

2018-07-24 Thread John Ladasky
I've been using "sudo pip3 install" to add packages from the PyPI repository. I have multiple user accounts on the computer in question. My goal is to install packages that are accessible to all user accounts. I know that using the Synaptic Package Manager in Ubuntu will install for all users

Re: Can pip install packages for all users (on a Linux system)?

2018-07-25 Thread John Ladasky
On Wednesday, July 25, 2018 at 7:15:35 AM UTC-7, Stephan Houben wrote: > Op 2018-07-24, John Ladasky schreef : > > I believe that I now have tensorflow 1.8 installed twice on my system, > > once for each user. If anyone can share how to convince pip to behave > > like Synapti

Re: How to sort over dictionaries

2018-08-28 Thread John Ladasky
The top-level object you are showing is a list [], not a dictionary {}. It has dictionaries inside of it though. Do you want to sort the list? Python's sorted() function returns a sorted copy of a sequence. Sorted() has an optional argument called "key". Key accepts a second function which c

Re: clever exit of nested loops

2018-09-27 Thread John Ladasky
On Wednesday, September 26, 2018 at 12:50:20 AM UTC-7, vito.d...@gmail.com wrote: > I have "abused" the "else" clause of the loops to makes a break "broke" more > loops I did this once upon a time. In recent years, when I start writing tricky nested loops, I frequently find myself reaching fo

Re: What's needed for jpegtran in Python 3?

2018-09-27 Thread John Ladasky
On Thursday, September 27, 2018 at 10:48:16 AM UTC-7, Chris Green wrote: > I think that must be what I have already installed, it doesn't make > the module available in Python 3, it just says this when I try and > install it:- > > root@t470:~# pip install jpegtran-cffi > Requirement alread

Re: [spam] Re: look what I've found [ignore]

2016-05-29 Thread John Ladasky
On Sunday, May 29, 2016 at 11:55:04 AM UTC-7, Peter Pearson wrote: > > No, it reached me, too, through NNTP. I also saw it, through the Google Groups gateway. -- https://mail.python.org/mailman/listinfo/python-list

Re: value of pi and 22/7

2016-06-17 Thread John Ladasky
On Friday, March 18, 2011 at 5:17:48 AM UTC-7, Neil Cerutti wrote: > RIIght. What's a cubit? > > -- > Neil Cerutti How long can you tread water? (Showing my age...) -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting back into PyQt and not loving it.

2016-06-26 Thread John Ladasky
On Sunday, June 26, 2016 at 7:41:17 PM UTC-7, Michael Torrie wrote: > If GTK+ had first-class support on Windows and Mac, including native > themes and seamless UI integration (file and print dialogs), I'd say > GTK+ would be the only game in town for Python programmers. > Unfortunately, unless you

Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
A while back, I shared my love for using Greek letters as variable names in my Python (3.4) code -- when, and only when, they are warranted for improved readability. For example, I like to see the following: from math import pi as π c = 2 * π * r When I am copying mathematical formulas from

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
Lawrence, I trust you understand that I didn't post a complete working program, just a few lines showing the intended usage? -- https://mail.python.org/mailman/listinfo/python-list

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
On Sunday, July 3, 2016 at 12:42:14 AM UTC-7, Chris Angelico wrote: > On Sun, Jul 3, 2016 at 4:58 PM, John Ladasky wrote: > Very good question! The detaily answer is here: > > https://docs.python.org/3/reference/lexical_analysis.html#identifiers > > > A philosophical ques

Re: Amber Brown: Batteries Included, But They're Leaking

2019-05-19 Thread John Ladasky
mpy is not part of the Python stdlib. On Monday, September 18, 2017 at 10:21:55 PM UTC+1, John Ladasky wrote: > OK, I found this statement intriguing. Honestly, I can't function without > Numpy, but I have always assumed that many Python programmers do so. > Meanwhile: most of th

Re: Meanwhile Norwegian trolls created ...

2019-08-19 Thread John Ladasky
On Saturday, August 17, 2019 at 2:40:14 AM UTC-7, Abdur-Rahmaan Janhangeer wrote: > But it is not so easy to combine different memory management paradigms. Oh, I feel this. I love the look and feel of PyQt5, but object management has bitten me more than once. -- https://mail.python.org/mailman

"Don't install on the system Python"

2019-11-30 Thread John Ladasky
Long-time Ubuntu user here. For years, I've read warnings about not installing one's personal stack of Python modules on top of the system Python. It is possible to corrupt the OS, or so I've gathered. Well, I've never heeded this advice, and so far nothing bad has happened to me. I don't li

Re: "Don't install on the system Python"

2019-12-01 Thread John Ladasky
On Sunday, December 1, 2019 at 12:47:43 AM UTC-8, Cameron Simpson wrote: > On 01Dec2019 09:29, Manfred Lotz <...@posteo.de> wrote: > >On Sat, 30 Nov 2019 20:42:21 -0800 (PST) > >John Ladasky <...@sbcglobal.net> wrote: > >> For years, I've read war

  1   2   3   >