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

2014-12-06 Thread Michael Torrie
On 12/06/2014 09:57 AM, Marko Rauhamaa wrote: >> And one of the OP's points is that by using tabs for indent, and >> spaces for alignment, you can have the best of both worlds. > > I certainly doesn't sound that way. Why is that? > >> Programmers can set their tab size to anything they want, an

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

2014-12-06 Thread Michael Torrie
On 12/06/2014 10:12 AM, Simon Ward wrote: > Not every programmer is as conscientious in the first of place, and > that's far easier to get wrong than just agreeing to stick to one > thing. This is why (often more rigid) style guides (or rather > policies) exist. Sure, but in the world of braces l

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-10 Thread Michael Torrie
On 12/10/2014 09:52 PM, iMath wrote: > I think the user interface shouldn't be freezed when using > concurrent.futures.ThreadPoolExecutor here,as it executes > asynchronously , but it doesn't meet my expectations,anyone can > explain why ? any other solutions here to not let user interface > freeze

Re: beautifulsoup VS lxml

2014-12-11 Thread Michael Torrie
On 12/11/2014 07:02 PM, iMath wrote: > > which is more easy and elegant for pulling data out of HTML? Beautiful Soup is specialized for HTML parsing, and it can deal with badly formed HTML, but if I recall correctly BeautifulSoup can use the lxml engine under the hood, so maybe it's the way to g

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-11 Thread Michael Torrie
On 12/11/2014 08:20 PM, iMath wrote: > 在 2014年12月11日星期四UTC+8下午1时25分41秒,Michael Torrie写道: >> On 12/10/2014 09:52 PM, iMath wrote: > "when it comes to I/O and GUIs, asynchronous calls are always better than > threads." > > I cannot grasp your meaning here, IMO, async

Re: encrypt the http request url on the local machine

2014-12-12 Thread Michael Torrie
On 12/12/2014 08:53 AM, iMath wrote: > After some retinking on my question ,I found what I am really want is > not let any other guys using packet analyzer software know the > server name (host name) my software is sending data to . > > so I translate the host name to IP address format, it somewh

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Michael Torrie
On 12/14/2014 07:47 PM, Mark Lawrence wrote: > I didn't realise that Python was so smart. It can indicate a syntax > error at the final 't' in print before it gets to the opening bracket > that is required for the print function in Python 3 (and Python 2 if > you're using "from __future__ impor

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Michael Torrie
On 12/14/2014 10:32 PM, Chris Angelico wrote: > Did you actually test that? > > Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. print("hello") > hello > > Since print is a keyword when not

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-18 Thread Michael Torrie
On 12/18/2014 04:16 AM, Mark Summerfield wrote: > It looks to me that what you are doing is sharing a single core > between your GUI and your processing. Threading isn't usually a good > approach to Python concurrency that is CPU-bound. Except that his code was not CPU-bound to begin with. His re

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-18 Thread Michael Torrie
On 12/18/2014 09:19 AM, Simon Evans wrote: > @Steven D'Aprano, > I input the following to Python 2.7, which got the following:- > from bs4 import BeautifulSoup with open("ecologicalpyramid.html","r") as ecologic

Re: Is there a way to schedule my script?

2014-12-18 Thread Michael Torrie
On 12/17/2014 01:42 PM, Juan Christian wrote: > On Wed Dec 17 2014 at 6:25:39 PM John Gordon wrote: > If you want to solve your problem entirely within Python, look at the > "scheduler" module. (Although even this isn't a complete solution, as you > still have to make sure the program is running i

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-03 Thread Michael Torrie
On 01/03/2015 10:11 AM, André Roberge wrote: > Would you care to elaborate? All the code I have written works > correctly on all the tests I have done. I do have reports from a > user using a Mac with Python 2.7 for which some widgets did not quite > work properly ... but that's all I have heard

Re: Hello World

2015-01-08 Thread Michael Torrie
On 01/08/2015 10:02 AM, Steve Hayes wrote: > On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst) > wrote: > >> I don't trust sudo because it is too complicated. >> (To the point that I removed it from my machine.) >> I do > > How do you do that? > > I avoided Ubuntu bec

Re: PyWart: Poor Documentation Examples

2015-01-11 Thread Michael Torrie
On 01/11/2015 09:04 AM, Grant Edwards wrote: > 3) There are still people who read RR posts? The last post by RR helping someone with a tk problem was very helpful, and rather elucidating, as are most of his post on tk. It was rather refreshing to see several posts like this. I thought perhaps th

Re: lambdak: multi-line lambda implementation in native Python

2015-01-15 Thread Michael Torrie
On 01/15/2015 06:34 PM, Roy Smith wrote: > The ebb and flow of technology has recently brought me someplace I never > thought I'd be. Java-land. And what I've discovered is that factories > are so last year. Apparently builders are the new thing. It's never clear to me whether all these fancy

Re: lambdak: multi-line lambda implementation in native Python

2015-01-16 Thread Michael Torrie
On 01/15/2015 10:29 PM, Ian Kelly wrote: > On Thu, Jan 15, 2015 at 9:00 PM, Chris Angelico wrote: >> My first response was going to be "Well, you can always add another >> layer of indirection to try to solve your problem", but then I went >> and looked up builders on Wikipedia. Now I'm confused.

Re: Hello World

2015-01-17 Thread Michael Torrie
On 01/17/2015 07:51 AM, Albert van der Horst wrote: > In article , > Chris Angelico wrote: > >> >> But sure. If you want to cut out complication, dispense with user >> accounts altogether and run everything as root. That's WAY simpler! > > I didn't except this strawman argument from you. > Of c

Re: Hello World

2015-01-17 Thread Michael Torrie
On 01/17/2015 11:47 AM, Michael Ströder wrote: >> sudo makes administrators careless, lazy and it is not simple at all. > > Admins must have separate accounts with separate credentials for > administrative work and must be careful when using an administrative account. Right. This is not a bad id

Re: Hello World

2015-01-18 Thread Michael Torrie
On 01/17/2015 05:04 PM, Chris Angelico wrote: > Related to that is another reason I've heard: if your password is > figured out by some means other than hash theft [1], there's a maximum > of N days to make use of it. But let's face it, if someone gets hold > of one of your accounts, it won't take

Re: Trees

2015-01-19 Thread Michael Torrie
On 01/19/2015 04:08 PM, Steven D'Aprano wrote: > Zachary Gilmartin wrote: > >> Why aren't there trees in the python standard library? > > Possibly because they aren't needed? Under what circumstances would you use > a tree instead of a list or a dict or combination of both? > > That's not a rhet

Re: What killed Smalltalk could kill Python

2015-01-21 Thread Michael Torrie
On 01/21/2015 04:37 PM, Tim Daneliuk wrote: > On 01/21/2015 10:34 AM, Steven D'Aprano wrote: >> In 2009, Robert Martin gave a talk at RailsConf titled "What Killed >> Smalltalk Could Kill Ruby". (No cheering, that sort of attitude is one of >> the things that killed Smalltalk.) Although Martin disc

Re: HTTP over Asynchronous AF_UNIX Socket in python

2015-01-26 Thread Michael Torrie
On 01/26/2015 06:32 AM, Norah Jones wrote: > Now my problem is the HTTP request which to be sent must go through > AF_UNIX socket. The Python Twisted framework may be of use to you. It's got a very steep learning curve, but it's fairly easy to change the underlying byte transport for any protoco

Re: unicode question

2015-01-28 Thread Michael Torrie
On 01/28/2015 03:17 PM, Albert-Jan Roskam wrote: >> I do not know how complete the support is, but this is copied from 3.4.2, >> which uses tcl/tk 8.6. t = "الحركات" for c in t: print(c) # Prints rightmost char above first >> ا >> ل >> ح >> ر >> ك >> ا >> ت > > Wow, I never knew this w

Re: [OT] fortran lib which provide python like data type

2015-01-30 Thread Michael Torrie
On 01/30/2015 09:27 AM, Rustom Mody wrote: > ... if I restate that in other words it says that sufficiently > complex data structures will be beyond the reach of the standard > RAII infrastructure. > > Of course this only brings up one side of memory-mgmt problems > viz. unreclaimable memory. > >

Re: [OT] fortran lib which provide python like data type

2015-01-30 Thread Michael Torrie
On 01/30/2015 10:31 AM, Rustom Mody wrote: > And what about the grey area between lightweight and heavyweight? That's what the smart pointers are for. > You say just use copy constructors and no pointers. > Can you (ie C++) guarantee that no pointer is ever copied out of > scope of these copy-co

Re: [OT] fortran lib which provide python like data type

2015-01-30 Thread Michael Torrie
On 01/30/2015 04:12 PM, Sturla Molden wrote: > Michael Torrie wrote: > >> Yes I can tell you haven't used C++. Compared to C, I've always found >> memory management in C++ to be quite a lot easier. The main reason is >> that C++ guarantees objects will be

Re: [OT] fortran lib which provide python like data type

2015-01-30 Thread Michael Torrie
On 01/30/2015 04:50 PM, Steven D'Aprano wrote: > Oh great. So if the average application creates a hundred thousand pointers > of the course of a session, you'll only have a thousand or so seg faults > and leaks. > > Well, that certainly explains this: > > https://access.redhat.com/articles/13322

Re: [OT] fortran lib which provide python like data type

2015-02-01 Thread Michael Torrie
On 02/01/2015 12:12 PM, Marko Rauhamaa wrote: > Christian Gollwitzer : > >> Am 01.02.15 um 08:58 schrieb Marko Rauhamaa: >>> Qt gave up on C++ when it comes to callbacks ("signals") and went for >>> an apocryphal metacompiler. >> >> Yes, but only because C++ compilers were not good enough when QT

Re: [OT] fortran lib which provide python like data type

2015-02-01 Thread Michael Torrie
On 02/01/2015 12:12 PM, Marko Rauhamaa wrote: > So please implement this small piece of Python code in C++ so we can > compare the idioms: So I though I might just for kicks code up a C++ version. In doing so, I realized that idomatically, this particular example would not really use callbacks in

Re: [OT] fortran lib which provide python like data type

2015-02-01 Thread Michael Torrie
On 02/01/2015 05:50 PM, Michael Torrie wrote: > Honestly with the C++ standard library implementing std::function and > std::bind macros, idiomatically it would look very much similar to the > Python code you showed. Make that templates, not macros. -- https://mail.python.org/mailman

Re: [OT] fortran lib which provide python like data type

2015-02-02 Thread Michael Torrie
On 02/02/2015 12:39 AM, Marko Rauhamaa wrote: > Michael Torrie : > >> http://en.cppreference.com/w/cpp/utility/functional/function >> >> Thus if we were to shoehorn your example into C++, the result would be >> idiomatically very similar to what you have in your Pyth

Re: [OT] fortran lib which provide python like data type

2015-02-02 Thread Michael Torrie
On 02/02/2015 10:57 AM, Marko Rauhamaa wrote: > I really don't understand why you are taking all of this so personally. > We are just discussing different aspects of different programming > languages. Fair enough. You raise good points. I am not taking it personally; your emails, lacking emotiona

Re: Downloading videos (in flash applications) using python

2015-02-02 Thread Michael Torrie
On 02/02/2015 12:30 PM, Gabriel Ferreira wrote: > Hi Paul, I presume the stream operator doesn't want to prevent me > from downloading or recording the videos. I just wanna know more > about some lib that could be used to deal with Flash Player > Applications... Or possibly, anything that could lea

Re: Downloading videos (in flash applications) using python

2015-02-02 Thread Michael Torrie
On 02/02/2015 04:21 PM, Gabriel Ferreira wrote: > The problem is that this particular website uses a flash player > application do broadcast the live images of the urban areas. I'm not > too familiar with Flash Applications. I don't know how to deal with > them using Python. I was wondering if some

Re: Ghost vulnerability

2015-02-03 Thread Michael Torrie
On 02/03/2015 04:19 AM, Steven D'Aprano wrote: > Anssi Saari wrote: > >> Rustom Mody writes: >> >>> How many people (actually machines) out here are vulnerable? >>> >>> > http://security.stackexchange.com/questions/80210/ghost-bug-is-there-a-simple-way-to-test-if-my-system-is-secure >>> >>> shows

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2015-02-04 Thread Michael Torrie
On 02/04/2015 05:19 PM, sohcahto...@gmail.com wrote: > They can take your computer and it doesn't matter if you've got your files on > Dropbox. > >> "My dog ate my USB stick." >> >> :-) > > I never used a USB stick for school work. > > At this point, I'm probably sounding like a shill for Dropb

Re: function inclusion problem

2015-02-10 Thread Michael Torrie
On 02/10/2015 04:38 PM, vlyamt...@gmail.com wrote: > I defined function Fatalln in "mydef.py" and it works fine if i call it from > "mydef.py", but when i try to call it from "test.py" in the same folder: > import mydef > ... > Fatalln "my test" > i have NameError: name 'Fatalln' is not defined >

Re: Python Worst Practices

2015-02-25 Thread Michael Torrie
On 02/25/2015 04:45 PM, Ben Finney wrote: > Mark Lawrence writes: > >> http://www.slideshare.net/pydanny/python-worst-practices > > Slideshare requires runing untrusted code in my browser, just to view > the slides. > > Can someone direct us to a URL where the document can be downloaded > anony

Re: Python Worst Practices

2015-02-25 Thread Michael Torrie
On 02/25/2015 09:08 PM, Ben Finney wrote: > Michael Torrie writes: > >> On 02/25/2015 04:45 PM, Ben Finney wrote: >>> Can someone direct us to a URL where the document can be downloaded >>> anonymously for offline viewing? >> >> Ahh, so you're ref

Re: Python Worst Practices

2015-02-25 Thread Michael Torrie
On 02/25/2015 10:21 PM, Ben Finney wrote: > document we're talking about, with many pages. I don't > want to sit navigating in my browser to read it, when it's certainly in > a form that could just be presented for download and viewed in a program > of my choice, while offline. > >> > I certainly

Re: Top down Python

2014-02-12 Thread Michael Torrie
On 02/12/2014 09:40 AM, John Allsup wrote: > I've realised that the best way to do this is to use a web browser for > the graphical front end: high end graphics are simply not a necessity > here, so one does not need to leave the confines of the browser. Thus > we need a simple server script.

Re: Wait... WHAT?

2014-02-12 Thread Michael Torrie
On 02/12/2014 01:21 PM, eneskri...@gmail.com wrote: > I think of it as a bit strange. Should I report it as a bug? I was trying to incorporate a save/load, and this happened. What happened? I'm not seeing any exception information. I do see code that doesn't quite make sense. > def save():

Re: singleton ... again

2014-02-12 Thread Michael Torrie
On 02/11/2014 09:34 PM, Asaf Las wrote: > playing a bit with subject. > > pros and cons of this approach? did i create bicycle again? :-) I always thought sticking an object in a module is the simplest form of singleton. -- https://mail.python.org/mailman/listinfo/python-list

Re: Wait... WHAT?

2014-02-13 Thread Michael Torrie
On 02/13/2014 10:46 AM, eneskri...@gmail.com wrote: > Can we please revert back to the original problem? > def save(): > target = open ("save.swroc", 'w') > target.write([counter, loop, number_of_competitors, competitors]) ^ Have you tried to run th

Re: Import order question

2014-02-18 Thread Michael Torrie
On 02/17/2014 06:01 AM, Nagy László Zsolt wrote: > I have a class hierarchy like this: > > Widget <- VisualWidget <- BsWidget > > and then BsWidget has many descendants: Desktop, Row, Column, Navbar etc. > > Widgets can have children. They are stored in a tree. In order to manage > the order of

Re: is there a package similar to SHINY in R for python ...

2014-02-21 Thread Michael Torrie
On 02/21/2014 07:57 PM, Dennis Lee Bieber wrote: > On Fri, 21 Feb 2014 15:28:55 -0800 (PST), anujg1...@gmail.com declaimed the > following: > >> I want to have textboxes, sliders, and buttons in the web browser that >> change the data visualization just like shiny does in R. >> >> Is there someth

Re: is there a package similar to SHINY in R for python ...

2014-02-22 Thread Michael Torrie
On 02/22/2014 12:04 PM, Dennis Lee Bieber wrote: > Except he did state "... in the web browser ...", so I responded on > that side... You're right of course. Sorry about that. I kind of wondered why he was asking when R does the job. > > Apparently "shiny" is rather new... It isn't

Re: Mac vs. Linux for Python Development

2014-02-24 Thread Michael Torrie
On 02/23/2014 01:43 AM, twiz wrote: > I've been developing with python recreationally for a while on Ubuntu > but will soon be transitioning to full-time python development. I > have the option of using a Mac or Ubuntu environment and I'd like to > hear any thoughts on the pros and cons of each. S

Re: Mac vs. Linux for Python Development

2014-02-24 Thread Michael Torrie
On 02/24/2014 10:34 AM, Michael Torrie wrote: > I know a lot of Mac developers that love the Sublime text editor. And > if you combine it with https://github.com/lunixbochs/actualvim, it's > even better. Sublime is actually on all platforms, and lots of people

Re: [OT] Can global variable be passed into Python function?

2014-02-24 Thread Michael Torrie
On 02/24/2014 11:05 AM, j.e.ha...@gmail.com wrote: > typedef struct { > int value; > } Number; > > Number *o; > o = malloc(sizeof(*o)); > o->value=3; > printf("o<%p>, o->value<%p>\n", o, &o->value); > > o<0x9fe5008>, o->value<0x9fe5008> > > Is the compiler borked? Why would you think

Re: Can global variable be passed into Python function?

2014-02-28 Thread Michael Torrie
On 02/28/2014 01:46 AM, Ben Finney wrote: > Steven D'Aprano writes: > >> On Fri, 28 Feb 2014 09:43:58 +0200, Marko Rauhamaa wrote: >>>class Connection: >>>IDLE = "IDLE" >> [...] >>>CONNECTED = "CONNECTED" >> [...] >>>def disconnect(self): >>>... >>>

Re: Can global variable be passed into Python function?

2014-03-01 Thread Michael Torrie
On 03/01/2014 04:28 AM, Marko Rauhamaa wrote: > Ben Finney : > >> Use ‘==’, since that's all that matters for getting a value that will >> work fine. > > You are telling me to use '==' if I choose string objects and 'is' if I > choose some other objects. No, '==' works fine no matter what object

Re: Can global variable be passed into Python function?

2014-03-01 Thread Michael Torrie
On 03/01/2014 10:29 AM, Marko Rauhamaa wrote: > Michael Torrie : > >> No, '==' works fine no matter what objects you assign to your state >> variables. > > Well, it doesn't since > >>>> a = float("nan") >>>> a

Re: Can global variable be passed into Python function?

2014-03-02 Thread Michael Torrie
On 03/02/2014 03:07 AM, Chris Angelico wrote: > import os type(os.POSIX_FADV_RANDOM) > > > So use ==. If it's later changed and you have to instead use 'is', you > can change your code. I don't see why == wouldn't continue to work if os.POSIX_FADV_RANDOM became an object of a differen

Re: Can global variable be passed into Python function?

2014-03-02 Thread Michael Torrie
On 03/02/2014 02:03 PM, Marko Rauhamaa wrote: > Michael Torrie : > >> I don't see why == wouldn't continue to work if os.POSIX_FADV_RANDOM >> became an object of a different type. > > It probably would. > > If one were begging for trouble, one *could* d

Re: Boxes of O's

2014-03-02 Thread Michael Torrie
On 03/02/2014 07:43 AM, genius...@gmail.com wrote: > I agree with you and really appreciate your experience. But what I > was looking for is clues. Thank you anyway Not sure what you mean. Chris certainly offered you clues to solving this problem. Certainly he pointed you in the right direction t

Re: Geezer learns python

2014-03-04 Thread Michael Torrie
On 03/04/2014 04:03 PM, notbob wrote: > I'm trying to learn python. I'm doing it via Zed Shaw's Learn Python > the Hard Way. Sure enough, 16 lessons in and I've run aground. Is it > OK for a painfully stupid ol' fart to ask painfully stupid noob > questions, here? I'm a long time usenet fan and

Re: Ternary operator associativity

2014-03-06 Thread Michael Torrie
On 03/06/2014 04:34 AM, candide wrote: > According to the official documentation, the ternary operator has > left-to-right associativity : > > --- > Operators in the same box group left to right (except for comparisons, > including tests, which all have the same precedence and ch

Re: running python 2 vs 3

2014-03-20 Thread Michael Torrie
On 03/20/2014 11:10 AM, notbob wrote: > On 2014-03-20, Zachary Ware wrote: > >> If you're specifying the interpreter in your command (by calling >> "python .py", etc), the shebang won't mean anything >> anyway. > > DOH! > > I was following you, fine, until that last sentence. Then how should

Re: CentOS 6.5 / SPEC file

2014-03-27 Thread Michael Torrie
On 03/27/2014 02:02 PM, Devin wrote: > RPM build errors: > error: Bad exit status from /var/tmp/rpm-tmp.yqWO6C (%install) > line 71: buildprereq is deprecated: BuildPrereq: expat-devel > line 72: buildprereq is deprecated: BuildPrereq: db4-devel > line 73: buildprereq is deprecated: Bui

Re: CentOS 6.5 / SPEC file

2014-03-27 Thread Michael Torrie
On 03/27/2014 03:26 PM, Michael Torrie wrote: > On 03/27/2014 02:02 PM, Devin wrote: >> RPM build errors: >> error: Bad exit status from /var/tmp/rpm-tmp.yqWO6C (%install) >> line 71: buildprereq is deprecated: BuildPrereq: expat-devel >> line 72: buildprereq

Re: Keyboard standards

2014-03-29 Thread Michael Torrie
On 03/29/2014 01:27 PM, Larry Hudson wrote: > On 03/28/2014 09:26 PM, Mark H Harris wrote: >> >> PS Thunderbird puts *both* the list and the news group addys in the to: >> header field on >> reply-to-list. ~nice, huh. > > Must be the way YOU set it up. MY Thunderbird (currently version 24.4.

Re: Examples of modern GUI python programms

2014-03-30 Thread Michael Torrie
On 03/30/2014 05:16 PM, D. Xenakis wrote: > What i need is to develop an android looking program (entirelly in > python) for windows, but dunno if this is possible (most propably > is), and which tool between those would help me most: tkinter - > wxpython - pyqt - pygtk . > > Any examples and sugg

Re: Yet Another Switch-Case Syntax Proposal

2014-04-06 Thread Michael Torrie
On 04/06/2014 12:07 PM, Chris Angelico wrote: > This has a slight oddity of parsing (in that an expression can > normally have a comparison in it); if you really want to use the > result of a comparison inside a case block, you'd have to parenthesize > it. But it's easy enough to explain to a human

Re: python obfuscate

2014-04-11 Thread Michael Torrie
On 04/10/2014 07:29 PM, Wesley wrote: > Hi all, Does python has any good obfuscate? > > Currently our company wanna release one product developed by python > to our customer. But dont's wanna others see the py code. > > I googled for a while but mostly just say using pyc. Any better one? > > Our

Re: Why Python 3?

2014-04-19 Thread Michael Torrie
On 04/18/2014 10:49 PM, Andrew Berg wrote: > Python 3 is not the future; it is the present. If you're developing > an application, just use Python 3.4 and don't look back unless you > absolutely positively *need* one of the big libraries that doesn't > fully support Python 3 yet. Depends on what

Re: Why Python 3?

2014-04-20 Thread Michael Torrie
On 04/20/2014 02:47 AM, Ian Foote wrote: >> Depends on what OS you want to be running on. I don't know of any >> currently-supported Enterprise distributions (long-term support) >> that ship with Python 3.4. > > I don't know if you'd count it as an "Enterprise" distribution, but > ubuntu 14.04 (

Re: Why Python 3?

2014-04-20 Thread Michael Torrie
On 04/20/2014 12:02 PM, Bernd Waterkamp wrote: > Michael Torrie schrieb: > >> For example, RHEL 6 is Red Hat's most current enterprise distribution and >> it does not yet even ship Python 2.7, to say nothing of Python 3. RHEL >> 7 has python 2.7 as the default sys

Re: Unicode in Python

2014-05-01 Thread Michael Torrie
Can't help but feed the troll... forgive me. On 04/28/2014 02:57 AM, wxjmfa...@gmail.com wrote: > Python 2.7 + cp1252: > - Solid and coherent system (nothing to do with the Euro). Except that cp1252 is not unicode. Perhaps some subset of unicode can be encoded into bytes using cp1252. But if it

Re: Unicode 7

2014-05-02 Thread Michael Torrie
On 05/02/2014 10:50 AM, Rustom Mody wrote: > Python just barfs: > fine = 1 > File "", line 1 > fine = 1 > ^ > SyntaxError: invalid syntax > > The point of that example is to show that unicode gives all kind of > "Aaah! Gotcha!!" opportunities that just dont exist in the old wor

Re: Glade on Windows using Python

2014-05-04 Thread Michael Torrie
On 05/04/2014 01:51 PM, mbg1...@planetmail.com wrote: > So...it turns out that Glade support for Python 2.7 is pretty difficult. > I ended up rewriting the whole thing using Tkinter and ttk.Treeview. > It would have been good to reuse the Glade XML...less code, better looking, > etc. etc. Both Gt

Re: Pass variable by reference

2014-05-06 Thread Michael Torrie
On 05/05/2014 06:39 PM, Satish Muthali wrote: > I want to nuke /var/lib/postgresql/9.3.4/main/data , however > programatically I want it to be as: /var/lib/postgresql/ pgversion>/main/data > > Any help is appreciated. Not sure really. But if you want to pass a some data around that can be manip

Re: The “does Python have variables?” debate

2014-05-08 Thread Michael Torrie
On 05/08/2014 07:18 AM, Steven D'Aprano wrote: > Nobody has suggested flogging anyone, not even figuratively. Unless you > believe that correcting a misapprehension, no matter how gently it is > done, is a flogging, I don't see how you draw the conclusion that Ben is > talking about flogging any

Re: trailing underscores naming convention_

2014-05-09 Thread Michael Torrie
On 05/08/2014 11:49 PM, Metallicow wrote: > I guess to be more clear here is a small code snippet that shows what > is happening more readably. Hence the underscores question. In a case like this I'd probably prefer to number the methods rather than add underscores to the end of the names. My cur

Re: Loading modules from files through C++

2014-05-19 Thread Michael Torrie
On 05/17/2014 08:01 AM, Stefan Behnel wrote: > please avoid top-posting. Trimming quoted material where appropriate is always welcome too! -- https://mail.python.org/mailman/listinfo/python-list

Re: All-numeric script names and import

2014-05-23 Thread Michael Torrie
On 05/23/2014 03:28 AM, Chris Angelico wrote: > On Fri, May 23, 2014 at 7:22 PM, Wolfgang Maier > wrote: >> I see, so what you should propose then is a change to import, so that when >> it can't find a module it will try to import an alternative that's >> pronounced the same way. Then you could si

Re: Windows automatic rebooting due to faulty code

2014-05-23 Thread Michael Torrie
On 05/23/2014 09:26 AM, Ronak Dhakan wrote: > Even I am surprised, python errors should stay in python. But I am > sure that the reboot is triggered exactly when I run some faulty > code. And usually I change the code after reboot, so I haven't > checked whether the same code is able to repeat the

Re: OT: This Swift thing

2014-06-03 Thread Michael Torrie
On 06/03/2014 03:01 PM, Chris Angelico wrote: > On Wed, Jun 4, 2014 at 6:43 AM, Sturla Molden wrote: >> A Python with static typing would have been far better, IMHO. It seems they >> have created a Python-JavaScript bastard with random mix of features. >> Unfortunately they retained the curly brac

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Michael Torrie
On 06/04/2014 12:50 AM, wxjmfa...@gmail.com wrote: > Like many, you are not understanding unicode because > you do not understand the coding of characters. If that is true, then I'm sure a well-written paragraph or two can set him straight. You continually berate people for not understanding unic

Re: OT: This Swift thing

2014-06-04 Thread Michael Torrie
On 06/03/2014 03:49 PM, Mark H Harris wrote: > I have been engaged in a minor flame debate (locally) over block > delimiters (or lack thereof) which I'm loosing. Locally, people hate > python's indentation block delimiting, and wish python would adopt curly > braces. Yeah people do have strong

Re: Python script help

2013-08-04 Thread Michael Torrie
On 08/02/2013 03:46 AM, cool1...@gmail.com wrote: > I do know some Python programming, I just dont know enough to put > together the various scripts I need...I would really really > appreciate if some one can help me with that... Seems like your first task, then, is to become proficient at python

Re: Python Basic Doubt

2013-08-10 Thread Michael Torrie
On 08/10/2013 09:09 PM, Krishnan Shankar wrote: > i.e. Is this code possible > > if a is False: > print 'Yes' > if b is False: > print 'No' > > Because i recommended this should not be done. But my colleagues say it is > correct. You are probably correct in your believe that this idiom

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-11 Thread Michael Torrie
On 08/11/2013 09:34 AM, MRAB wrote: > If twitter counts characters, not codepoints, you could then ask > whether it passes the codepoints through as given. If it does, then you > experiment to see how much data you could send encoded as a sequence of > combining codepoints. (You might want to check

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-12 Thread Michael Torrie
On 08/11/2013 11:54 PM, Gregory Ewing wrote: > Michael Torrie wrote: >> I've always wondered if the 160 character limit or whatever it is is a >> hard limit in their system, or if it's just a variable they could tweak >> if they felt like it. > > Isn't it

Re: Am I not seeing the Error?

2013-08-13 Thread Michael Torrie
On 08/13/2013 04:31 AM, Devyn Collier Johnson wrote: > For me, this style is easier to read. I have tried the "typical" style, > but I find this one to be easier. One thing I do know is that your style makes it very hard to find errors, even when the parser flags them. And the fact that you post

Re: c# async, await

2013-08-22 Thread Michael Torrie
On 08/22/2013 05:29 AM, Neal Becker wrote: > So my son is now spending his days on c# and .net. He's enthusiastic about > async and await, and said to me last evening, "I don't think python has > anything > like that". I'm not terribly knowledgeable myself regarding async > programming > (si

Re: python interface to iMacros

2013-08-24 Thread Michael Torrie
On 08/23/2013 09:13 AM, inq1ltd wrote: > Python help, > > I am running iMacros from linux/firefox > and doing most of what I want. > > But, there are times when I want to do > something of the net and then back > to the iMacros script. > > Are there any projects out there > that will conne

Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too)

2013-08-24 Thread Michael Torrie
#Linux, #Python? This this hash tag stuff is getting out of hand, don't you think? -- http://mail.python.org/mailman/listinfo/python-list

Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too)

2013-08-24 Thread Michael Torrie
On 08/24/2013 10:06 PM, Benjamin Kaplan wrote: > On Sat, Aug 24, 2013 at 7:08 PM, Michael Torrie wrote: >> #Linux, #Python? This this hash tag stuff is getting out of hand, don't >> you think? > > Didn't you hear? In an effort to redefine itself for the mode

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-08-31 Thread Michael Torrie
On 08/31/2013 10:51 PM, anntzer@gmail.com wrote: > It is the call to gethostbyname_ex that is very slow. The call to > gethostname is quick (and returns the same string as > /usr/bin/hostname). What gethostbyname_ex and /usr/bin/hostname do are very different things. gethostbyname_ex does a

Re: file handling issues

2013-09-06 Thread Michael Torrie
On 09/06/2013 09:05 PM, Leo Carnovale wrote: > Ah and one other thing! What is this crypto algorithm you speak of? I > desperately need some sort of encryption as at the moment anyone can > simply open the text file and change the numbers to numbers that > work! Where can I learn more about it? Th

Re: Can I trust downloading Python?

2013-09-07 Thread Michael Torrie
On 09/07/2013 07:17 PM, Aaron Martin wrote: > Hi, I am thinking about getting a software but it requires python, so that > brought up a few questions. Is it safe do download python, and does it come > with spam or advertisements? If it doesn't then should I get the latest > version? I mostly want t

Re: Help - Python syntax - repeats script through subordinate folders

2013-09-07 Thread Michael Torrie
On 09/07/2013 09:09 PM, BlueFielder wrote: > I 'think' I did as you instructed …. but that too failed. :( > > > CiMac:ddd camforx$ find -type d -execdir bash -c 'cd {}; python > ./fxp2aupreset.py ./ aumu Alb3 LinP vstdata' \; > find: illegal option -- t > usage: find [-H | -L | -P] [-EXdsx] [-f

Re: Can I trust downloading Python?

2013-09-09 Thread Michael Torrie
On 09/09/2013 05:02 AM, Anthony Papillion wrote: > But (and this is stepping into *really* paranoid territory here. But > maybe not beyond the realm of possibility) it would not be so hard to > compromise compilers at the chip level. If the NSA were to strike an > agreement with, say, Intel so that

Re: Chardet, file, ... and the Flexible String Representation

2013-09-09 Thread Michael Torrie
On 09/09/2013 08:28 AM, wxjmfa...@gmail.com wrote: > Comment: Such differences never happen with utf. But with utf, slicing strings is O(n) (well that's a simplification as someone showed an algorithm that is log n), whereas a fixed-width encoding (Latin-1, UCS-2, UCS-4) is O(1). Do you understan

Re: Can I trust downloading Python?

2013-09-09 Thread Michael Torrie
On 09/09/2013 10:40 AM, William Ray Wing wrote: > I think that is pretty far fetched. It requires recognition that a > compiler is being compiled. I'd be REALLY surprised if there were a > unique sequence of hardware instructions that was common across every > possible compiler (current and futur

Re: Monitor key presses in Python?

2013-09-09 Thread Michael Torrie
On 09/09/2013 11:39 AM, eamonn...@gmail.com wrote: > Is there a way to detect if the user presses a key in Python that > works on most OS's? I've only seen 1 method, and that only works in > Python 2.6 and less. If you get the key, can you store it in a > variable? > > Also, is there a way to cre

Re: Python TUI that will work on DOS/Windows and Unix/Linux

2013-09-10 Thread Michael Torrie
On 09/04/2013 05:41 AM, James Harris wrote: > Naturally, all of these are centred on curses. I have been reading up on it > and must say that the whole curses approach seems rather antiquated. I > appreciate the suggestions and they may be what I need to do but from what I > have seen of curses

Re: Python GUI?

2013-09-11 Thread Michael Torrie
On 09/11/2013 02:55 PM, eamonn...@gmail.com wrote: > PyQT -- You have a GUI designer, so I'm not going to count that What do you mean? Gtk has a GUI designer too. what of it? > I, personally, really like wxPython, but I also really like Tkinter. > I've messed with PyGTK, but I'd choose wxPython

Re: Python GUI?

2013-09-12 Thread Michael Torrie
On 09/12/2013 10:03 AM, eamonn...@gmail.com wrote: > I didn't realise GTK has a GUI designer too :( > > I don't like it when you can D&D to position things. I don't > understand why someone wouldn't want to write the positioning code, > and have fun with the debugging. That's the best part about w

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