Re: Highlighting program variables instead of keywords?

2014-01-28 Thread Michael Torrie
On 01/28/2014 12:38 PM, Ned Batchelder wrote: > JMF, seriously, stop it. You've convinced no one because you have no > convincing arguments. > > It's obnoxious to continue to make this claim. Stop it. Please. > > If you want to try to convince someone, convince me. Write to me > offline: n.

Re: C++ to python for LED Matrix

2014-02-01 Thread Michael Torrie
Yes you could use Python for this sort of thing. The link you posted is just using a kernel spi driver that Python can write to just as well as C++ can (via it's /dev/spidev0.0 file). There is a python library that can talk to SPI in Python on the pi: http://www.100randomtasks.com/simple-spi-on-

Re: generator slides review and Python doc (+/- text bug)

2014-02-03 Thread Michael Torrie
On 02/03/2014 06:59 AM, wxjmfa...@gmail.com wrote: > generator slides review and Python doc > > > I do not know what tool is used to produce such > slides. What slides? What web site are you referring to? A little context wouldn't hurt. -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Usage of U+00B6 PILCROW SIGN

2014-02-04 Thread Michael Torrie
On 02/04/2014 08:21 AM, wxjmfa...@gmail.com wrote: > > Useless and really ugly. How do you recommend we discover the anchor links for linking to? -- https://mail.python.org/mailman/listinfo/python-list

Re: What are the kinds of software that are not advisable to be developed using Python?

2014-02-08 Thread Michael Torrie
On 02/08/2014 05:11 PM, Chris Angelico wrote: > On Sun, Feb 9, 2014 at 10:54 AM, Sam wrote: >> I got to know about Python a few months ago and today, I want to develop >> only using Python because of its code readability. This is not a healthy >> bias. To play my own devil's advocate, I have a q

Re: Accessing container's methods

2015-12-07 Thread Michael Torrie
On 12/07/2015 11:10 AM, Tony van der Hoff wrote: > Hi, > > I have a class A, containing embedded embedded classes, which need to > access methods from A. > . > A highly contrived example, where I'm setting up an outer class in a > Has-a relationship, containing a number of Actors. The inner clas

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Michael Torrie
On 12/09/2015 04:11 AM, Steven D'Aprano wrote: > Maildir is also *much* safer too. With mbox, a single error when writing > email to the mailbox will likely corrupt *all* emails from that point on, > so potentially every email in the mailbox. With maildir, a single error > when writing will, at wor

Re: Administrators and moderators of Python-list, please erase all the messages that I not should have posted here in python-list!

2015-12-10 Thread Michael Torrie
On 12/10/2015 07:44 AM, françai s wrote: > Administrators and moderators of Python-list, please erase all the messages > that I not should have posted here in python-list. > > I ask this because I probably be in future a good programmer famous and I > do not want to talk about the topics that I s

Re: Administrators and moderators of Python-list, please erase all the messages that I not should have posted here in python-list!

2015-12-10 Thread Michael Torrie
On 12/10/2015 07:44 AM, françai s wrote: > Administrators and moderators of Python-list, please erase all the messages > that I not should have posted here in python-list. > > I ask this because I probably be in future a good programmer famous and I > do not want to talk about the topics that I s

Re: Python variable assigning problems...

2015-12-11 Thread Michael Torrie
On 12/11/2015 11:00 AM, ICT Ezy wrote: > Thank you very much your answer, I had not known assignment id Right2Left > before. I done it. Except that Robin was mistaken. Assignment is indeed left to right, though what's being assigned is on the right. > -- https://mail.python.org/mailman/listi

Re: Python variable assigning problems...

2015-12-11 Thread Michael Torrie
On 12/11/2015 11:05 AM, ICT Ezy wrote: > Deat Ian, Thank you very much your answer, but above answer from > Robin Koch and your answer is different. What's the actually process > here? I agree with Robin Koch, but your answer is correct. Pl explain > differences ? If you go re-read the answers, yo

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-19 Thread Michael Torrie
On 12/19/2015 05:41 PM, Mark Lawrence wrote: > On 19/12/2015 23:19, malitic...@gmail.com wrote: >> you are absolutely correct Mark >> i'm a beginner in python and from the original question and test case given >> above i wrote this >> >> class BankAccount(object): >> def __init__(self, initi

OT: citizens and countries - was Re: v3.5.1 - msi download

2015-12-22 Thread Michael Torrie
On 12/22/2015 07:06 PM, jf...@ms4.hinet.net wrote: > Mark Lawrence at 2015/12/21 UTC+8 8:50:00PM wrote: >> My fellow Pythonistas, ask not what our language can do for you, ask >> what you can do for our language. > > When I saw this sentence, I can't resist to think of the famous lie created > by

Re: We will be moving to GitHub

2016-01-02 Thread Michael Torrie
On 01/02/2016 12:02 AM, Ben Finney wrote: > What is being done to stave off the common response, addressed by GitHub > users to people submitting a change as a link to their Git repository, > of “can you please submit that as a GitHub pull request”? > > That common response makes for an unnecessar

Re: We will be moving to GitHub

2016-01-02 Thread Michael Torrie
On 01/01/2016 11:43 PM, Steven D'Aprano wrote: > On Sat, 2 Jan 2016 07:09 am, Chris Angelico wrote: > >> Yes, git is a capable tool. But so is Mercurial, and the arguments >> weren't primarily based on differences in functionality (which are >> pretty minor). It's mainly about the network effect.

Re: GitHub's �pull request� is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/02/2016 09:56 PM, Michael Vilain wrote: > Seriously, don't like git and the gitflow, find a project where they do > things more to your liking. I do like git and the git work-flow. Seems like github is doing an end-run around several of the key features of git and the git work-flow to keep

Re: GitHub's �pull request� is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/03/2016 08:09 AM, Bernardo Sulzbach wrote: > On Sun, Jan 3, 2016 at 1:05 PM, Michael Torrie wrote: >> kernel development is now exclusively on github. >> > > No it is not. If they have (now) 88 PR is because people don't RTFM. Good to know. -- https://mail.p

Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Michael Torrie
On 01/03/2016 05:51 PM, Random832 wrote: > Just as a general comment, I note there are now at least four mangled > versions of this subject header, and threading is already fragile enough > on this list. I think in the future it would be best to avoid non-ASCII > characters in subject lines. I no

Re: GitHub's “pull request” is proprietary lock-in

2016-01-04 Thread Michael Torrie
On 01/04/2016 03:21 AM, m wrote: > W dniu 03.01.2016 o 05:43, Ben Finney pisze: >> That and other vendor-locked workflow aspects of GitHub makes it a poor >> choice for communities that want to retain the option of control over >> their processes and data. > > I'm also afraid that Github will make

Re: PyFladesk :: create GUI apps by Python and HTML, CSS and Javascript.

2016-01-08 Thread Michael Torrie
On 01/07/2016 08:54 PM, jacob Kruger wrote: > I would definitely like to try out something like this - I am primarily > a web developer, and, partly since am 100% blind, any form of GUI design > is at times an issue for me, whereas I have been working with HTML > markup layouts for almost 20 yea

Re: Strange crash while running a script with a embedded python interpreter

2016-01-08 Thread Michael Torrie
On 01/08/2016 09:18 AM, Rickard Englund wrote: > First, some system info > * Windows 7 (also tested on 8 and 10) > * Python 3.5.1 64bit (previously also tested using several 3.x versions) > (also tested with 32 bit, but with 3.4.2) > * Microsoft Visual Studio 2015 (earlier version of python als

Re: When I need classes?

2016-01-10 Thread Michael Torrie
On 01/10/2016 12:29 AM, Arshpreet Singh wrote: > Hello Friends, I am quite new to OOP(object oriented Programming), I > did some projects with python which includes Data-Analysis, Flask Web > Development and some simple scripts. > > I have only one question which is bothering me most of the time,

Re: When I need classes?

2016-01-11 Thread Michael Torrie
On 01/11/2016 04:45 PM, Travis Griggs wrote: > As a long term OO purist practitioner, I would add to this. > Obviously, you can organize your code any way you want, with or > without classes. You could put all your functions with an odd number > of letters in one class, and all of the even numbered

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Michael Torrie
On 01/13/2016 05:47 PM, Steven D'Aprano wrote: > What of the poor souls who, for whatever reason, can't use NoScript? > > What about those who are so frustrated with trying to get sites to work that > they just Allow All On This Page? I've seen websites that rely on anything > up to forty or fifty

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
On 01/13/2016 06:02 PM, Steven D'Aprano wrote: > Or we're too busy dealing with rising sea levels, crop failures, antibiotic > resistant diseases, chaotic mass migrations, terrorists, wars for control > over resources like water, and the collapse of the corporate state to care > about such little t

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
On 01/13/2016 06:02 PM, Rick Johnson wrote: > In fact, in the years before Python3 arrived, it had enjoyed > a steady ascension from obscurity into mainstream hacker > culture, but now, all that remains is a fractured community, > a fractured code base, and a leader who lost his cushy job > at Goog

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
On 01/13/2016 08:29 PM, Rick Johnson wrote: > Of course. But when you leave things open for speculation, > you enviably create a situation where rumors can start > circulating. GvR is not just any "John Doe" engineer, no, > he's the head of an open source community, and the community > has a right

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Michael Torrie
On 01/16/2016 11:00 AM, William Ray Wing wrote: > It was known at the time. It was certainly known by the companies > that were ripped off, but they were typically small to really small > and couldn’t get traction for their stories in a press that was in > thrall to Microsoft. It was pretty much o

Re: wxpython strange behaviour

2016-01-16 Thread Michael Torrie
On 01/15/2016 05:58 PM, Shiva Upreti wrote: > > What kind of further details do you want? Please tell me and i will try my > best to provide them. As always, post a small but complete example test program (no more than 20 lines of code) that has the problem. Paste it in such a way that one can

Re: how do I put the python on my desktop or even access it

2016-01-17 Thread Michael Torrie
On 01/16/2016 01:11 PM, zack fitzsimons wrote: > > > > > > > I'm assuming based on your empty email that you must be running Windows. Python is a command-line program. First run cmd.exe and then from there you can run python.exe and interact with it in immediate mode. To create and run p

Re: Modify Settings window pop-up

2016-01-17 Thread Michael Torrie
On 01/17/2016 03:54 PM, Dennis Lee Bieber wrote: > On Sun, 17 Jan 2016 16:52:52 -0500, Terry Reedy > declaimed the following: > >> On 1/17/2016 12:13 PM, Arvind Vallabhaneni wrote: >>> >>> [cid:888c5934-3c75-43d8-9e76-59a9dfbef814] >> >> What is this? When I mouse over, Thunderbird just says 'ab

Re: how do I put the python on my desktop or even access it

2016-01-17 Thread Michael Torrie
On 01/17/2016 02:46 PM, eryk sun wrote: > On Sun, Jan 17, 2016 at 9:03 AM, Michael Torrie wrote: >> >> but if it's a text-mode program you must run it from cmd.exe like this: >> >> python \path\to\myprogram.py. > > You only need to run from another console p

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Michael Torrie
On 01/23/2016 07:22 PM, Robert James Liguori wrote: > Thank you so much! Btw, how do I convert back to ISO-8301? Have a look at the documentation for the datetime module. The docs will tell you how you can convert to a string, formatted to your specifications and needs. As always, the documenta

Re: psss...I want to move from Perl to Python

2016-01-28 Thread Michael Torrie
On 01/28/2016 07:34 PM, Chris Angelico wrote: > On Fri, Jan 29, 2016 at 1:06 PM, Paul Rubin wrote: >> Fillmore writes: >>> I look and Python and it looks so much more clean >> >> Yes it is, I forgot everything I knew about Perl shortly after starting >> to use Python. > > https://xkcd.com/35

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Michael Torrie
On 01/30/2016 01:22 AM, Frank Millman wrote: > There are times when I want to execute a SELECT statement, and test for > three possibilities - > - if no rows are returned, the object does not exist > - if one row is returned, the object does exist > - if more that one row is returned,

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Michael Torrie
On 01/30/2016 02:19 PM, Chris Angelico wrote: > Efficiency. That's a fine way of counting actual rows in an actual > table. However, it's massive overkill to perform an additional > pre-query for something that's fundamentally an assertion (this is a > single-row-fetch API like "select into", and i

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Michael Torrie
On 01/30/2016 02:57 PM, Michael Torrie wrote: > SELECT count(some_id_field),field1,field2,field3 FROM wherever WHERE > conditions > > If the first column (or whatever you decide to alias it as) contains a > count, and the rest of the information is still there. If count is 1, &g

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Michael Torrie
On 01/30/2016 03:06 PM, Chris Angelico wrote: > That actually violates the SQL spec. Some servers will accept it, > others won't. (You're not supposed to mix column functions and > non-column functions.) Are you sure? Wikipedia is not always the most accurate place, but they have several clear e

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Michael Torrie
On 01/30/2016 02:19 PM, Chris Angelico wrote: > where the ... is the full original query. In other words, the whole > query has to be run twice - once to assert that there's exactly one > result, and then a second time to get that result. The existing > algorithm ("try to fetch a row - if it fails

Re: psss...I want to move from Perl to Python

2016-01-31 Thread Michael Torrie
On 01/31/2016 03:34 PM, Fillmore wrote: > On 01/30/2016 05:26 AM, wxjmfa...@gmail.com wrote: > >>> Python 2 vs python 3 is anything but "solved". >> >> >> Python 3.5.1 is still suffering from the same buggy >> behaviour as in Python 3.0 . > Can you elaborate? Sad to say jmf is a long-time troll o

Re: Daemon strategy

2016-02-06 Thread Michael Torrie
On 02/06/2016 09:04 AM, paul.hermeneu...@gmail.com wrote: > On Fri, Feb 5, 2016 at 4:10 PM, Ben Finney wrote: >> paul.hermeneu...@gmail.com writes: >> >>> On Fri, Feb 5, 2016 at 11:52 AM, Ben Finney >>> wrote: Since MS Windows lacks those facilities, ‘python-daemon’ can't use them. >>>

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Michael Torrie
On 02/27/2016 11:13 AM, wrong.addres...@gmail.com wrote: > On Saturday, 27 February 2016 18:08:36 UTC+2, Dietmar Schwertberger >> As of today, there's no Python GUI builder comparable to VB 6. > Thanks for stating this clearly. Everyone here has been trying to > show me various ways to do the kind

Re: creating zipfile with symlinks

2016-03-04 Thread Michael Torrie
On 03/04/2016 05:18 AM, Larry Martell wrote: > Unfortunately very slow - around 8 minutes to zip a 7GB dir using the > command line zip vs. 13 seconds with the python zipfile module. And likely Python's zipfile is just giving up and storing the file without compression. What does unzip -v say abo

Re: Pyhon 2.x or 3.x, which is faster?

2016-03-08 Thread Michael Torrie
On 03/07/2016 05:45 PM, Chris Angelico wrote: > On Tue, Mar 8, 2016 at 11:22 AM, BartC wrote: >> >> (Is a byte string the same as a byte array? Is a byte array the same as an >> array.array? If I remove this line from my code, where 'data' has just been >> read from a file: >> >>data=array.arr

Re: Pyhon 2.x or 3.x, which is faster?

2016-03-08 Thread Michael Torrie
On 03/07/2016 11:34 AM, BartC wrote: > (I'm quite pleased with my version: smaller, faster, works on all the > Pythons, supports all 3 colour formats and no decoding bugs that I'm > aware of, and it's the first Python program I've written that does > something useful.) I think you should be com

Re: Pyhon 2.x or 3.x, which is faster?

2016-03-11 Thread Michael Torrie
On 03/11/2016 03:24 PM, BartC wrote: > On 11/03/2016 21:59, Mark Lawrence wrote: >> On 11/03/2016 18:57, BartC wrote: > >> def test(): >> s="" >> for i in range(1000): >> s+="*" >> print (len(s)) >> >> test() > >> The minor snag that you might like to correct with your

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-14 Thread Michael Torrie
On 03/14/2016 08:43 AM, BartC wrote: > But how do you pass 'a' itself? > > Perhaps you can say: > >f('a') > > and f can do some sort of lookup, if it knows the caller's context, for > such a name and retrieve the value that way. But that's rather > heavy-handed, and f can't distinguish bet

Re: How to waste computer memory?

2016-03-18 Thread Michael Torrie
On 03/18/2016 02:26 AM, Jussi Piitulainen wrote: > I think Julia's way of dealing with its strings-as-UTF-8 [2] is more > promising. Indexing is by bytes (1-based in Julia) but the value at a > valid index is the whole UTF-8 character at that point, and an invalid > index raises an exception. This

Re: How to waste computer memory?

2016-03-19 Thread Michael Torrie
On 03/19/2016 02:38 AM, Steven D'Aprano wrote: > On Sat, 19 Mar 2016 01:30 pm, Random832 wrote: > >> On Fri, Mar 18, 2016, at 20:55, Chris Angelico wrote: >>> On Sat, Mar 19, 2016 at 9:03 AM, Marko Rauhamaa wrote: Also, special-casing '\0' and '/' is lame. Why can't I have "Results 1/20

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-22 Thread Michael Torrie
On 03/22/2016 06:59 AM, BartC wrote: > I'm not sure I follow. Your solution to dealing with the scenarios > raised by Steven D'Aprano is to: > > (1) Not bother with exceptions at all inside the function Correct, if your function is not equipped to handle this exceptional circumstance and do the

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-24 Thread Michael Torrie
On 03/21/2016 06:43 AM, BartC wrote: > On 21/03/2016 12:08, Ned Batchelder wrote: >> On Sunday, March 20, 2016 at 9:15:32 PM UTC-4, BartC wrote: >>> >>> A tokeniser along those lines in Python, with most of the bits filled >>> in, is here: >>> >>> http://pastebin.com/dtM8WnFZ >>> >> >> Bart, we get

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-24 Thread Michael Torrie
On 03/24/2016 04:18 PM, Mark Lawrence wrote: > On 24/03/2016 19:54, BartC wrote: >> On 24/03/2016 18:10, Steven D'Aprano wrote: >>> On Fri, 25 Mar 2016 12:01 am, BartC wrote: >> >>> >>> Then those numbers are pointless. >> >> Yes, they would need some adjustment to do this stuff properly. > > Plea

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Michael Torrie
On 03/26/2016 05:37 AM, Ned Batchelder wrote: > [...] > Has anyone ever said to you, "Thanks, Thomas! Lots of people were giving > me answers, but they were all so kind and polite about it, I couldn't > see what they were saying. Finally, your blunt direct manner got > through to me, so now I und

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Michael Torrie
On 03/26/2016 11:49 AM, Michael Torrie wrote: > Well said, Ned, and a good reminder for me, and I suspect all of us, to > considering how we communicate. It's our nature to think problems lie ^^ Sigh. Consider. And proof read. > with everyone else but us (as witne

Re: (test) ? a:b

2014-10-22 Thread Michael Torrie
On 10/22/2014 05:45 AM, Mark Lawrence wrote: >>> without not: >>> j = [j+1, 3][j>=10] >>> with not: >>> j = [3, j+1][not (j>=10)] >>> >> >> Oh it's a trick ! >> thx > > IMHO it's just dreadful. Why people insist on messing around like this > I really don't know, it just drives me nuts. This act

Re: (test) ? a:b

2014-10-25 Thread Michael Torrie
On 10/22/2014 09:46 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> I've seen much MUCH worse... where multiple conditional >> expressions get combined arithmetically, and then the result used >> somewhere... > > In the days of old-school BASIC it was common to > exploit the fact that boolean

Re: (test) ? a:b

2014-10-25 Thread Michael Torrie
On 10/25/2014 07:20 PM, Chris Angelico wrote: > So don't use Python idioms in BASIC. :) Back when I used to write > BASIC code, I'd do explicit comparisons with zero for this sort of > thing... these days, I'd use Python idioms, but I'd also write Python > code :) > > I think it's indicative that

Re: Communicating with a PHP script (and pretending I'm a browser)

2014-11-12 Thread Michael Torrie
On 11/11/2014 10:30 AM, Larry Martell wrote: > They are technically savvy. They are a 100% PHP shop. They have a big, > complicated app that they've been working on for 10 years. No one > there knows python or django. They want to put some new frontends on > their app. I was bought in for another p

Re: Communicating with a PHP script (and pretending I'm a browser)

2014-11-12 Thread Michael Torrie
On 11/12/2014 11:37 AM, Marko Rauhamaa wrote: > Michael Torrie : > >> I've worked in shops before where one person comes in with a new >> language, writes some code, then leaves, leaving us stranded as it >> were. > > Programming languages come and go. If you

Re: Question about installing python and modules on Red Hat Linux 6

2014-11-15 Thread Michael Torrie
On 11/14/2014 08:01 PM, pythonista wrote: > Can anyone provide me with insight as to the scope what the problem could > have been? Well the fact is that RHEL 6 uses Python 2.6 as a core system package. Many system utilities depend on it, so it cannot be replaced with a newer version. You must in

Re: Question about installing python and modules on Red Hat Linux 6

2014-11-15 Thread Michael Torrie
On 11/15/2014 08:15 AM, Steven D'Aprano wrote: > A "fresh linux build" of Red Hat Linux 6? RHL 6 was discontinued in 2000. Yes I know you're making a point about not assuming anything, but the odds are very good that the OP meant RHEL6. And meaning RHEL6, there are some good reasons why the infra

Re: Question about installing python and modules on Red Hat Linux 6

2014-11-15 Thread Michael Torrie
On 11/14/2014 08:01 PM, pythonista wrote: > The scope of the project was to install python 2.7.8 and 4 modules/site > packages on a fresh linux build. I neglected to put the URL for software collections in my reply to you. Here it is. https://www.softwarecollections.org/en/scls/rhscl/python27/

Re: Question about installing python and modules on Red Hat Linux 6

2014-11-15 Thread Michael Torrie
On 11/15/2014 10:13 AM, Michael Torrie wrote: > If it's a package that won't conflict, such as Python 2.4, you can Ahem, that should have been 3.4 -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about installing python and modules on Red Hat Linux 6

2014-11-15 Thread Michael Torrie
On 11/15/2014 06:08 PM, Steven D'Aprano wrote: > Assuming it was RHEL 6, then installing Python 2.7 from source as a separate > application from the system Python should be trivially easy, half an hour's > work. Download the source, untar, run ./configure, make, make altinstall > and you should be

Re: caught in the import web again

2014-11-17 Thread Michael Torrie
On 11/17/2014 03:45 PM, Steven D'Aprano wrote: > Circular dependencies are not just a problem in Python, they are a problem > throughout most of software design. Personally I find that duck typing eliminates a lot of the circular dependency problems. Class A doesn't necessarily have to know abou

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/19/2014 07:53 PM, Juan Christian wrote: > Thanks, it's working using QTimer. The thing is that whenever the program > is going to do something, in my case, draw a new QGroupBox with some > components inside and put it in the Form (I'm using VBoxLayout in the main > form) the program freezes,

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/19/2014 07:53 PM, Juan Christian wrote: > Thanks, it's working using QTimer. The thing is that whenever the program > is going to do something, in my case, draw a new QGroupBox with some > components inside and put it in the Form (I'm using VBoxLayout in the main > form) the program freezes,

Re: python 2.7 and unicode (one more time)

2014-11-20 Thread Michael Torrie
On 11/20/2014 09:32 AM, Peter Otten wrote: > Chris Angelico wrote: > >> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote: >>> I think that you may get a Unicode/Encode/Error when you try to /decode/ >>> a unicode string is more confusing... >> >> Hang on a minute, what does it

Re: Python docs disappointing

2014-11-20 Thread Michael Torrie
On 11/20/2014 08:54 AM, jstnms...@gmail.com wrote: > Perhaps the reason programs are so inelegant, and so user-UNfriendly, > and so bug-infested, is a natural consequence, when a field is > dominated by creatures who know much more than they comprehend, and > much less than they need to? If, I thi

Re: How modules work in Python

2014-11-20 Thread Michael Torrie
On 11/19/2014 02:50 PM, Chris Angelico wrote: > On Thu, Nov 20, 2014 at 6:00 AM, wrote: >> I only started reading this list about a month ago, and from what I've seen, >> being pedantic is pretty much par for the course. > > Usually in a good way. :) And often for good reason. -- https://mail

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 10:57 AM, Juan Christian wrote: > So, I need to study QThreads, do you know any book or video-course that > talks about this matter? I've seen the tutorials that you pointed but I > need a "wider" approach regarding QThreads to really understand it and > apply it to my needs. The docs

Re: Python IDE.

2014-11-20 Thread Michael Torrie
On 11/20/2014 12:01 PM, dvenkatj2ee...@gmail.com wrote: > Can someone suggest a good python IDE. I'm sure Google can reveal many options and opinions on the matter. Personally I don't find IDEs that useful with Python. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 01:25 PM, Juan Christian wrote: > **Back to the list > > So, as I said the PyQt doc is using C o.0 > > Yes, I read the tutorials, I'll google for some books and things related. Okay so I took a long look at the example code that was on stackoverflow and figured it out. It's not qu

Re: How to access Qt components loaded from file?

2014-11-20 Thread Michael Torrie
On 11/20/2014 08:06 PM, Michael Torrie wrote: > anyway I've attached the working example. Just a little caveat. This code is not my original code. I would not do certain things that I just noticed, like these lines: from PyQt4.QtCore import * I would never do that normally, and recomm

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-21 Thread Michael Torrie
On 11/21/2014 11:24 AM, Rick Johnson wrote: > Why am *i* the fool when it's obvious that > the creators of Python were either shortsighted and/or > careless with the designs? The only people who suffer are > those who put their trust in the designer, and not the > designer himself -- something is w

Re: PyWart: "Python's import statement and the history of external dependencies"

2014-11-21 Thread Michael Torrie
On 11/21/2014 01:29 PM, Rick Johnson wrote: > Not personally. But how will we *ever* know if he refuses to > participate in these discussions? Why should he participate in these discussions? Why should you be in charge of said discussions? By the way, Python has more than certainly borne fruit,

Re: GUI toolkit(s) status

2014-11-21 Thread Michael Torrie
On 11/20/2014 02:17 AM, Chris Angelico wrote: > But I agree about the issues with tkinter. So, let's see. Shall we > wait for Tcl/Tk Unicode support? Recommend people switch to PyGTK? To > PyQt? To wxPython? To something else? Personally, I'm quite happy with > GTK2 (though that's with Pike, not Py

Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert

2014-11-22 Thread Michael Torrie
On 11/22/2014 08:54 PM, llanitedave wrote: Well that DID make a difference! I used the %r marker, and the logger line gave me back: > "INFO:Related borehole_id is u'testbh3', of_borehole is 'testbh3'" > > So it looks like I need to change my foreign key string to a unicode > string. I'll be work

Re: Why do I keep getting emails from Dennis?

2014-11-23 Thread Michael Torrie
On 11/23/2014 08:21 PM, Sayth Renshaw wrote: > I keep receiving emails from Dennis and it appears Dennis only on this > list, I am signed up to comp.lang.python and am unsure why I keep getting > Dennis' s emails. If you post to the newsgroup, using your e-mail address as the "from address", when

Re: Python Signal/Slot + QThred code analysis

2014-11-24 Thread Michael Torrie
On 11/24/2014 06:25 AM, Juan Christian wrote: > Oh, and this code I made by myself, I didn't copy. That's why I want you > guys to see if everything is ok. Looks alright. Does it work? -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-25 Thread Michael Torrie
On 11/25/2014 02:36 PM, Juan Christian wrote: > So guys, I had to change to approach, I read that using Qt I can't do > multiple inheritance. So my Outpost class can't be like 'Outpost(QObject, > QThred)'. I had to change the code a bit: > > So, let's see the problems: > > Traceback (most recent

Re: GUI toolkit(s) status

2014-11-26 Thread Michael Torrie
On 11/26/2014 02:40 AM, Dave Cook wrote: > On 2014-11-22, Michael Torrie wrote: > >> I can't speak for wxWidgets, but when I last looked at it years ago it >> fairly reeked of MFC-style GUI programming with event tables instead of >> a nice, flexible signal/callback

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-26 Thread Michael Torrie
On 11/26/2014 02:55 PM, Juan Christian wrote: > On Wed Nov 26 2014 at 1:16:11 AM Michael Torrie wrote: > You're going to have to post a complete, but small, code example, I > think. Working with fragments of code is very difficult if not > impossible to assist with, resulting i

Re: Issues installing Python 2.7

2014-11-26 Thread Michael Torrie
To further explain my terse post from before (from my phone), see below. On 11/26/2014 10:09 AM, billyfurl...@gmail.com wrote: > Now the installation worked fine but shouldn't I see that it's using the > correct version??? > > I also did try to run /opt/python2.7/bin/python2.7 and it give me thi

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-26 Thread Michael Torrie
On 11/26/2014 08:57 PM, Michael Torrie wrote: > On 11/26/2014 02:55 PM, Juan Christian wrote: >> On Wed Nov 26 2014 at 1:16:11 AM Michael Torrie wrote: >> You're going to have to post a complete, but small, code example, I >> think. Working with fragments of cod

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Michael Torrie
On 11/27/2014 04:58 AM, Juan Christian wrote: > What I have in mind is simple (I think), have the Outpost get the data > using QThread, and when it got everything needed emit a signal. So when I > have something like 'var = Outpost('123')', when I get the signal I'll know > that I can call 'var.tra

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Michael Torrie
On 11/27/2014 04:29 PM, Juan Christian wrote: > So, instantly I found one issue, you said that this code won't block the > GUI, only the thread event loop, but if we keep moving the window while > it's open, every time new info is printed the GUI freezes for like 1-2 > seconds. Correct. The threa

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Michael Torrie
On 11/27/2014 04:29 PM, Juan Christian wrote: > Is that right? But I don't think that always calling the site this way is > good for them and for me, sometimes I may not get new users for like 10~15 > minutes, so I would have wasted a lot of calls for nothing. That's why I > only instantiate/call t

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-27 Thread Michael Torrie
On 11/27/2014 04:29 PM, Juan Christian wrote: > Is that right? But I don't think that always calling the site this way is > good for them and for me, sometimes I may not get new users for like 10~15 > minutes, so I would have wasted a lot of calls for nothing. That's why I > only instantiate/call t

Re: Fwd: Python Signal/Slot + QThred code analysis

2014-11-28 Thread Michael Torrie
On 11/28/2014 06:06 AM, Juan Christian wrote: > Which one would be better in performance, having a single 'Worker' to call > all URLs, having inside this worker functions for each stuff, or having 3~5 > different workers doing different stuff. In the end I'll only print the > data when I have them

Re: Iterate over text file, discarding some lines via context manager

2014-11-28 Thread Michael Torrie
On 11/28/2014 08:04 AM, fetchinson . wrote: > Hi all, > > I have a feeling that I should solve this by a context manager but > since I've never used them I'm not sure what the optimal (in the > python sense) solution is. So basically what I do all the time is > this: I'd personally do it with a g

Re: [Python-Dev] Unicode decode exception

2014-11-30 Thread Michael Torrie
On 11/30/2014 09:19 PM, balaji marisetti wrote: > The default encoding is "UTF-8". It works if I do: > > with open("filename", errors="ignore") as f: > > > So I think Python2, by default, ignores all errors whereas Python3 doesn't Do you mean that the file is supposed to be utf-8 but is

Re: Python and GUI development

2014-12-01 Thread Michael Torrie
On 12/01/2014 08:49 PM, Ganesh Pal wrote: > Thanks for the bunch of suggestion , I have decided to go with PYQt for > now : ) If the licensing of PyQt is not appropriate for you (it's GPL only, unless you buy a license), you can use PySide, which is almost a drop-in replacement for it, that's li

Re: Proposed new conditional operator: "or else"

2014-12-02 Thread Michael Torrie
On 12/02/2014 10:18 AM, Roy Smith wrote: > In the process of refactoring some code, I serendipitously created what I > think is an essential new bit of Python syntax. The “or else” statement. I > ended up with: > > sites_string = args.sites or else self.config['sites'] But isn't that

Re: Python handles globals badly.

2014-12-02 Thread Michael Torrie
On 12/02/2014 07:27 PM, Skybuck Flying wrote: > Excuse is: "bad programming style". > > I don't need snot telling me how to program after 20 years of programming > experience. > > This is so far the only thing pissing me off in python. > > Now I have to declare "global" in front of these variab

Re: Python handles globals badly.

2014-12-02 Thread Michael Torrie
On 12/02/2014 09:32 PM, Skybuck Flying wrote: > Some issues I'd like to address to you: > > 1. Structured programming requires more programming time. > 2. Structured programming implies structure which might be less flexible. > 3. Python objects require "self" keyword to be used everywhere, and ot

Re: Python handles globals badly.

2014-12-03 Thread Michael Torrie
On 12/03/2014 08:57 PM, Dennis Lee Bieber wrote: > On Wed, 3 Dec 2014 10:16:18 -0800 (PST), sohcahto...@gmail.com declaimed > the following: > > >> >> I'm surprised other people haven't picked up on how obvious of a troll this >> "Skybuck Flying" guy is. He claims 20 years programming experienc

Re: Python docs disappointing

2014-12-04 Thread Michael Torrie
On 12/04/2014 03:27 AM, Albert van der Horst wrote: > That doesn't help. I'm a very experienced programmer and work in > routinely a dozen languages. Sometimes I do python. I want to do > numeric work. I remember the name numpy. It is important, everybody > knows it, it is all over the place. So I

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-05 Thread Michael Torrie
On 12/05/2014 07:31 PM, Ned Batchelder wrote: > This is a perfect example! The code (with tabs as >--- and leading > spaces as .) is: > > >---if (!list_empty(pending)) > >--->---ret = list_first_entry(pending, struct async_entry, > >--->--->--->---...domain_

Re: Tabs for indentation & Spaces for alignment in Python 3?

2014-12-06 Thread Michael Torrie
On 12/06/2014 01:40 AM, Marko Rauhamaa wrote: > Michael Torrie : > >> In fact a decent editor that is auto-indenting code would, at least in >> C or C++ mode, do that automatically. > > A decent editor frees you from this dilemma entirely: > > (custom-set-varia

<    5   6   7   8   9   10   11   12   13   14   >