Re: Plotting the integer-and-fraction remainder of a function value modulo 360

2014-04-10 Thread Ben Finney
Kim Plofker writes: > This produces the following error message: Thank you for providing an actual code example (though not one I can run, since it isn't a complete Python program). Particularly, thank you for providing the *actual* error output; this makes it much clearer what is happening. I

Re: How to display chinese character in 65001 in pytohn?

2014-04-10 Thread Terry Reedy
On 4/9/2014 11:19 PM, length power wrote: problem solved.if you enter python by python(command line),the problem can't be solved.if you enter python by cmd ,and input |python|,no problem happen. I have also failed trying to use cp65001. I do not understand the solution you claim. Please be mor

Re: Plotting the integer-and-fraction remainder of a function value modulo 360

2014-04-10 Thread Terry Reedy
On 4/10/2014 1:03 AM, Kim Plofker wrote: Thanks, the % operator is indeed what I want, but I want to use it with a function expression rather than with numbers alone. And that seems to create a type error. Here's an example of what goes wrong: t = var('t') L(t) = t*725.5%360.0 This produces t

Re: threading

2014-04-10 Thread Mark Lawrence
On 10/04/2014 00:53, Roy Smith wrote: Natural language is a wonderfully expressive thing. I open the window, stick my head out, look up at the sky, and say, "Raining". Forget the pronoun, I don't even have a verb. And yet everybody understands exactly what I mean. In the UK you can stay in

Re: CommandLine Option in Python for filtering values from Column

2014-04-10 Thread Mark Lawrence
On 10/04/2014 06:16, balaji marisetti wrote: sys.argv is itself a list. You can directly access the `quality` field as sys.argv[2]. quality = int(sys.argv[2]) However, if you want to use more command line options, then using `argparse` module is better than accessing arguments using

xlrd 0.9.3 released!

2014-04-10 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.3: http://pypi.python.org/pypi/xlrd/0.9.3 This release includes the following changes: - Github issue #49 - Github issue #64 - skip meaningless chunk of 4 zero bytes between two otherwise-valid BIFF records - Github issue #61 - fix up

Re: threading

2014-04-10 Thread Chris Angelico
On Thu, Apr 10, 2014 at 6:23 PM, Mark Lawrence wrote: > On 10/04/2014 00:53, Roy Smith wrote: >> Natural language is a wonderfully expressive thing. I open the window, >> stick my head out, look up at the sky, and say, "Raining". Forget the >> pronoun, I don't even have a verb. And yet everybod

Re: CommandLine Option in Python for filtering values from Column

2014-04-10 Thread balaji marisetti
> An alternative is to grab docopt from pypi, it's awesome :) Some time back, I watched a video about that module but, later, I forgot its name. Thanks for reminding me of that module. On 10 April 2014 13:57, Mark Lawrence wrote: > On 10/04/2014 06:16, balaji marisetti wrote: >> >> sys.argv is it

Re: threading

2014-04-10 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmq2xx_WG2ymCC0NNqisDO=dnnjhnegpid3de+xeiy5...@mail.gmail.com... > On Thu, Apr 10, 2014 at 12:30 AM, Frank Millman > wrote: >> >>> How does one distinguish betwen 'blocking' and 'non-blocking'? Is it either/or, or is it some arbitrary timeo

Re: threading

2014-04-10 Thread Chris Angelico
On Thu, Apr 10, 2014 at 7:17 PM, Frank Millman wrote: > The current version of my program uses HTTP. As I understand it, a client > makes a connection and submits a request. The server processes the request > and returns a result. The connection is then closed. > > In this scenario, does async app

Re: threading

2014-04-10 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmoWaHPZk=DAxbfJ=9ez2aj=4yf2c8wmbryof5vgn6e...@mail.gmail.com... > On Thu, Apr 10, 2014 at 7:17 PM, Frank Millman wrote: >> The current version of my program uses HTTP. As I understand it, a client >> makes a connection and submits a request. The serv

Re: threading

2014-04-10 Thread Chris Angelico
On Thu, Apr 10, 2014 at 9:10 PM, Frank Millman wrote: > You seem to be suggesting that I set the socket to 'non-blocking', use > select() to determine when a client is trying to connect, and then call > 'accept' on it to create a new connection. Right! That's about how it goes. Of course, for pro

Re: threading

2014-04-10 Thread Marko Rauhamaa
"Frank Millman" : > You seem to be suggesting that I set the socket to 'non-blocking', use > select() to determine when a client is trying to connect, and then > call 'accept' on it to create a new connection. Yes. > If so, I understand your point. The main loop changes from 'blocking' > to 'non

Re: Python and Unicode

2014-04-10 Thread wxjmfauth
Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit : > On 09/04/2014 09:07, wxjmfa...@gmail.com wrote: > > > Well, there is a (serious) problem somewhere... > > > > > > jmf > > > > > > > Look in a mirror and you'll see it as it'll be staring you in the face. > > > > -- > > M

Language summit notes

2014-04-10 Thread Steven D'Aprano
Today in Montreal Canada, there was a Language Summit to discuss the future of Python. Some highlights: PyPy is only three bug fixes away from shipping support for Python 3.2! Guido confirms that easing the transition from 2.x to 3.x code is a major priority. Version 2.7 is alive and in good he

Re: Python and Unicode

2014-04-10 Thread Tim Chase
On 2014-04-10 04:47, wxjmfa...@gmail.com wrote: > Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit : > > On 09/04/2014 09:07, wxjmfa...@gmail.com wrote: > > > > > Well, there is a (serious) problem somewhere... > > > jmf > > > > Look in a mirror and you'll see it as it'll be staring

Re: threading

2014-04-10 Thread Roy Smith
In article <87wqexmmuc@elektro.pacujo.net>, Marko Rauhamaa wrote: > * When you wake up from select() (or poll(), epoll()), you should treat >it as a hint. The I/O call (accept()) could still raise >socket.error(EAGAIN). People often misunderstand what select() does. The common mis

Re: threading

2014-04-10 Thread Mark H Harris
On 4/9/14 12:52 PM, Chris Angelico wrote: People with a fear of threaded programming almost certainly never grew up on OS/2. :) I learned about GUI programming thus: Write your synchronous message handler to guarantee that it will return in an absolute maximum of 0.1s, preferably a lot less. If

why i have the output of [None, None, None]

2014-04-10 Thread length power
>>> x=['','x1','x2','x3',' '] >>> x ['', 'x1', 'x2', 'x3', ' '] >>> [print("ok") for it in x if it.strip() !=""] ok ok ok [None, None, None] i understand there are three 'ok' in the output,but why i have the output of [None, None, None] -- https://mail.python.org/mailman/listinfo/python-list

Re: why i have the output of [None, None, None]

2014-04-10 Thread Skip Montanaro
The print function in Python 3 returns None. The "ok" output is a side effect. The actual value of evaluating that list comprehension is a list of three None values. Skip On Thu, Apr 10, 2014 at 8:54 AM, length power wrote: x=['','x1','x2','x3',' '] x > ['', 'x1', 'x2', 'x3', ' ']

Re: how to make ["a","b",["c","d"],"e"] into ['a', 'b', 'c', 'd', 'e'] ?

2014-04-10 Thread Boris Borcic
Rustom Mody wrote: def fl1(l): return [y for x in l for y in x] # recursive flatten def fr(l): ... if not isinstance(l,list): return [l] ... return fl1([fr(x) for x in l]) For a short non-recursive procedure - not a function, modifies L in-place but none of its sublists. >>> def flat

Re: why i have the output of [None, None, None]

2014-04-10 Thread Rustom Mody
This is called imperative programming: for it in x: ... if it.strip() != '': ...print ("Ok") This is called functional programming: >>> [y for y in x if y.strip() != ''] ['x1', 'x2', 'x3'] What you have is a confusion: print is imperative comprehension is functional You should not mix

Re: why i have the output of [None, None, None]

2014-04-10 Thread Jussi Piitulainen
length power writes: > >>> x=['','x1','x2','x3',' '] > >>> x > ['', 'x1', 'x2', 'x3', ' '] > >>> [print("ok") for it in x if it.strip() !=""] > ok > ok > ok > [None, None, None] > > i understand there are three 'ok' in the output,but why i have the > output of [None, None, None] It's a list

Re: why i have the output of [None, None, None]

2014-04-10 Thread Johannes Schneider
because thats the return value of [...] print retuns None. On 10.04.2014 15:54, length power wrote: >>> x=['','x1','x2','x3',' '] >>> x ['', 'x1', 'x2', 'x3', ' '] >>> [print("ok") for it in x if it.strip() !=""] ok ok ok [None, None, None] i understand there are three 'ok' in the output

Re: how to make ["a","b",["c","d"],"e"] into ['a', 'b', 'c', 'd', 'e'] ?

2014-04-10 Thread Boris Borcic
Boris Borcic wrote: Rustom Mody wrote: def fl1(l): return [y for x in l for y in x] # recursive flatten def fr(l): ... if not isinstance(l,list): return [l] ... return fl1([fr(x) for x in l]) For a short non-recursive procedure - not a function, modifies L in-place but none of its su

Re: threading

2014-04-10 Thread Sturla Molden
Marko Rauhamaa wrote: > Other points: > > * When you wake up from select() (or poll(), epoll()), you should treat >it as a hint. The I/O call (accept()) could still raise >socket.error(EAGAIN). > > * The connections returned from accept() have to be individually >registered with s

Re: threading

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 1:24 AM, Sturla Molden wrote: > And exactly how is getting all of this correct any easier than just using > threads and blocking i/o? For a start, nearly everything Marko just posted should be dealt with by your library. I don't know Python's asyncio as it's very new and I

Teaching python to non-programmers

2014-04-10 Thread Lalitha Prasad K
Dear List Recently I was requested to teach python to a group of students of GIS (Geographic Information Systems). Their knowledge of programming is zero. The objective is to enable them to write plug-ins for GIS software like QGIS and ArcGIS. It would require them to learn, besides core python, P

Re: threading

2014-04-10 Thread Marko Rauhamaa
Sturla Molden : > And exactly how is getting all of this correct any easier than just > using threads and blocking i/o? > > I'd like to see the programmer who can get all of this correct, but > has no idea how to use a queue og mutex without deadlocking. My personal experience is that it is easie

Re: threading

2014-04-10 Thread Marko Rauhamaa
Chris Angelico : > For a start, nearly everything Marko just posted should be dealt with > by your library. Let's not kid ourselves: it is hard to get any reactive system right. > I don't know Python's asyncio as it's very new and I haven't yet found > an excuse to use it, but with Pike, I just

Re: threading

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 2:25 AM, Marko Rauhamaa wrote: >> I don't know Python's asyncio as it's very new and I haven't yet found >> an excuse to use it, but with Pike, I just engage backend mode, set >> callbacks on the appropriate socket/file/port objects, and let things >> happen perfectly. > >

Re: how to make ["a","b",["c","d"],"e"] into ['a', 'b', 'c', 'd', 'e'] ?

2014-04-10 Thread pete . bee . emm
I've been using compiler.ast.flatten, but I have comments indicating it will need be replaced if/when I move to Python 3. I don't pollute my code base with flatten, I just call my own version in my utility library that is currently redirecting to flatten. flatten works equally well with tuples

Re: Teaching python to non-programmers

2014-04-10 Thread pete . bee . emm
Don't underestimate the value of morale. Python is a scripting language. You don't need to teach them very much python to get something working, and you can always revisit the initial code and refactor it for better coding hygiene. Someday they might have jobs, and be required to learn things i

Re: why i have the output of [None, None, None]

2014-04-10 Thread Terry Reedy
On 4/10/2014 9:54 AM, length power wrote: >>> x=['','x1','x2','x3',' '] >>> x ['', 'x1', 'x2', 'x3', ' '] >>> [print("ok") for it in x if it.strip() !=""] Don't use comprehensions for side effects. To get what you want, just write normal code. for it in x: if it.strip() != '': p

Re: threading

2014-04-10 Thread Rustom Mody
On Thursday, April 10, 2014 10:38:49 PM UTC+5:30, Chris Angelico wrote: > On Fri, Apr 11, 2014 at 2:25 AM, Marko Rauhamaa wrote: > >> I don't know Python's asyncio as it's very new and I haven't yet found > >> an excuse to use it, but with Pike, I just engage backend mode, set > >> callbacks on the

so module loading fails

2014-04-10 Thread Eddy Ilg
Hi, I am trying to get PyQt5 to work. I already posted on their list but with no luck and since the question is rather general I am reposting it here: I built my own module "Entity.so". Trying to import it yields the following error: Python 3.4.0 (default, Apr 8 2014, 22:02:32) [GCC 4.6.

Re: Teaching python to non-programmers

2014-04-10 Thread Rustom Mody
On Thursday, April 10, 2014 9:24:48 PM UTC+5:30, Lalitha Prasad K wrote: > Dear List > > Recently I was requested to teach python to a group of students of GIS > (Geographic Information Systems). Their knowledge of programming is zero. The > objective is to enable them to write plug-ins for GIS

Re: Teaching python to non-programmers

2014-04-10 Thread Mark Lawrence
On 10/04/2014 18:53, pete.bee@gmail.com wrote: Don't underestimate the value of morale. Python is a scripting language. You don't need to teach them very much python to get something working, and you can always revisit the initial code and refactor it for better coding hygiene. Someday the

Re: Method(s) called by square brackets, slice objects

2014-04-10 Thread John Ladasky
Thanks to both Ethan and Steven for their replies. Steven: I was trying to use the interpreter and wasn't getting results that I understood -- because I didn't know that __getslice__ was simply gone in Python 3. I implemented a __getslice__ method in my subclass that never got called. Ethan: I

Sorted Containers

2014-04-10 Thread Mark Lawrence
I've just chanced upon this and thought it might be of interest to some of you, haven't tried it myself http://www.grantjenks.com/docs/sortedcontainers/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is

Re: threading

2014-04-10 Thread Marko Rauhamaa
Rustom Mody : > Marco (and evidently Chris) are in the CP camp whereas Sturla is in > the PP camp. Its just the 'data-structures (and algorithms)' is now > replaced by 'concurrency' > > Both these viewpoints assume that the status quo of current > (mainstream) language support for concurrency is a

Re: imaplib: how to specify SSL/TLS protocol version?

2014-04-10 Thread Antoine Pitrou
Grant Edwards invalid.invalid> writes: > > Experiments show that when calling ssl.wrap_socket() I have to specify > ssl_version=PROTOCOL_TLSv1 to avoid the above error. > > How do I tell imaplib to use TLS1 instead of SSL3? Use Python 3 and pass the ssl_context parameter to IMAP_SSL: https://do

Re: threading

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 1:14:01 AM UTC+5:30, Marko Rauhamaa wrote: > > > Seriously, Erlang (and Go) have nice tools for managing state machines > and concurrency. However, Python (and C) are perfectly suitable for > clear asynchronous programming idioms. I'm happy that asyncio is > happening

ANN: eGenix pyOpenSSL Distribution 0.13.3.1.0.1.7

2014-04-10 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.3.1.0.1.7 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface fo

Re: threading

2014-04-10 Thread Marko Rauhamaa
Rustom Mody : > What you are saying is that what the OS is doing, you can do better. > Analogous to said C programmer saying that what (data structures) the > python programmer can make he can do better. I'm sorry, but I don't quite follow you there. I see the regular multithreaded approach as

Re: Teaching python to non-programmers

2014-04-10 Thread pete . bee . emm
> > Just awesome, not only do we have double line spacing and single line > > paragraphs, we've also got top posting, oh boy am I a happy bunny :) > > I'll leave someone3 else to explain, I just can't be bothered. > > Do you get paid to be a jerk, or is it just for yuks? If the latter, yo

Re: Yet Another Switch-Case Syntax Proposal

2014-04-10 Thread Lucas Malor
On 6 April 2014 20:07, Chris Angelico rosuav-at-gmail.com |python-list@python.org| wrote: > Here's a simpler form of the proposal, which might cover what you > need. It's basically a short-hand if/elif tree. > > case expression comp_op expression: > suite > case [comp_op] expression: > su

Re: Unpacking U-Boot image file

2014-04-10 Thread Rhodri James
On Wed, 09 Apr 2014 18:18:56 +0100, Rustom Mody wrote: On Wednesday, April 9, 2014 9:36:40 PM UTC+5:30, trewio wrote: How to extract files from U-Boot image file, LZMA-compressed? Is there a Python script that can do this properly? For lzma theres this (recent) python library https://docs

Re: Method(s) called by square brackets, slice objects

2014-04-10 Thread Terry Reedy
On 4/10/2014 2:52 PM, John Ladasky wrote: Thanks to both Ethan and Steven for their replies. Steven: I was trying to use the interpreter and wasn't getting results that I understood -- because I didn't know that __getslice__ was simply gone in Python 3. I implemented a __getslice__ method in

Re: Teaching python to non-programmers

2014-04-10 Thread Rhodri James
On Thu, 10 Apr 2014 21:52:53 +0100, wrote: Just awesome, not only do we have double line spacing and single line paragraphs, we've also got top posting, oh boy am I a happy bunny :) I'll leave someone3 else to explain, I just can't be bothered. Do you get paid to be a jerk, or is it ju

module version number support for semver.org

2014-04-10 Thread Jörn Hees
Hi, what do you think about officially supporting Semantic Versioning? ( http://semver.org ) Semantic Versioning has gained a lot of attention in other programming languages. Even though not officially supported, many python libraries use it as well (just search the pypi listing for things like "

the logical operation confused me

2014-04-10 Thread length power
>>> "ok" or "not ok" 'ok' >>> "ok" and "not ok" 'not ok' >>> why "ok" or "not ok" output "ok" , "ok" and "not ok" output "not ok" ? -- https://mail.python.org/mailman/listinfo/python-list

Re: the logical operation confused me

2014-04-10 Thread Terry Reedy
On 4/10/2014 7:02 PM, length power wrote: >>> "ok" or "not ok" 'ok' >>> "ok" and "not ok" 'not ok' >>> why "ok" or "not ok" output "ok" , "ok" and "not ok" output "not ok" ? This is explained in our fine manual. https://docs.python.org/2/reference/expressions.html#boolean-operations -- T

Re: the logical operation confused me

2014-04-10 Thread Gary Herron
On 04/10/2014 04:02 PM, length power wrote: >>> "ok" or "not ok" 'ok' >>> "ok" and "not ok" 'not ok' >>> why "ok" or "not ok" output "ok" , "ok" and "not ok" output "not ok" ? You are probably confusing yourself with the string "not ok". That string, and any other non-empty string is co

Re: the logical operation confused me

2014-04-10 Thread Denis McMahon
On Fri, 11 Apr 2014 07:02:33 +0800, length power wrote: "ok" or "not ok" > 'ok' "ok" and "not ok" > 'not ok' > why "ok" or "not ok" output "ok" , "ok" and "not ok" output "not ok" ? I believe that: [ (falsey condition) or ]* (first truthy condition) or (any condition) [ or

Re: module version number support for semver.org

2014-04-10 Thread Terry Reedy
On 4/10/2014 6:45 PM, Jörn Hees wrote: what do you think about officially supporting Semantic Versioning? (http://semver.org ) It is a nice fantasy. Under "Why...?" the author, Tom Preston-Werner, says "A simple example will demonstrate how Semantic Versioning can make dependency hell a thi

Re: Language summit notes

2014-04-10 Thread Ben Finney
Steven D'Aprano writes: > Today in Montreal Canada, there was a Language Summit to discuss the > future of Python. Some highlights: […] > More in this email thread here: > https://mail.python.org/pipermail/python-dev/2014-April/133873.html Thanks very much for this! Core development is importa

Re: threading

2014-04-10 Thread Sturla Molden
On 10/04/14 21:44, Marko Rauhamaa wrote: I'm happy that asyncio is happening after all these long years. It would be nice if it supported edge-triggered wakeups, but I suppose that isn't supported in all operating systems. I have an issue with the use of coroutines. I think they are to evil. W

Re: threading

2014-04-10 Thread Sturla Molden
On 11/04/14 01:51, Sturla Molden wrote: I have an issue with the use of coroutines. I think they are to evil. When a man like David Beazley says this https://twitter.com/dabeaz/status/440214755764994048 there is something crazy going on. And why did Python get this Tulip beast, instead

Re: threading

2014-04-10 Thread Terry Reedy
On 4/10/2014 7:51 PM, Sturla Molden wrote: On 10/04/14 21:44, Marko Rauhamaa wrote: I'm happy that asyncio is happening after all these long years. It would be nice if it supported edge-triggered wakeups, but I suppose that isn't supported in all operating systems. I have an issue with the use

python obfuscate

2014-04-10 Thread Wesley
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 product is deployed on Linux bed. Thanks. Wesley

Re: python obfuscate

2014-04-10 Thread Ben Finney
Wesley writes: > Hi all, > Does python has any good obfuscate? Define “good obfuscate”. What is your goal? If it is to hide your program's secrets from others, then obfuscation isn't going to help: no matter how good it is, it still needs to be readable by the runtime on the machine. Moreove

Re: python obfuscate

2014-04-10 Thread Tobiah
On 4/10/2014 6: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? Does that

Re: python obfuscate

2014-04-10 Thread Wesley
pyc has weakness: 1. easy to decompile 2. python version related, e.g. pyc from py2.5 cannot be used to py2.7 bed 在 2014年4月11日星期五UTC+8上午9时48分04秒,Tobiah写道: > On 4/10/2014 6:29 PM, Wesley wrote: > > > Hi all, Does python has any good obfuscate? > > > > > > Currently our company wanna release

Re: python obfuscate

2014-04-10 Thread Wesley
Umm, just wanna make all .py files not human readable. Or, maybe need a tool like zend in php. 在 2014年4月11日星期五UTC+8上午9时41分11秒,Ben Finney写道: > Wesley writes: > > > > > Hi all, > > > Does python has any good obfuscate? > > > > Define “good obfuscate”. What is your goal? > > > > If it i

Re: python obfuscate

2014-04-10 Thread Ian Kelly
On Thu, Apr 10, 2014 at 7:48 PM, Tobiah wrote: > On 4/10/2014 6: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

Re: python obfuscate

2014-04-10 Thread Ian Kelly
On Thu, Apr 10, 2014 at 8:17 PM, Wesley wrote: > Umm, just wanna make all .py files not human readable. > > Or, maybe need a tool like zend in php. The only reliable way to prevent a customer from reverse-engineering your software is to not give them the software. For example, instead of giving

Re: python obfuscate

2014-04-10 Thread Ben Finney
Wesley writes: > Umm, just wanna make all .py files not human readable. (Please don't top-post; instead, use interleaved replies https://en.wikipedia.org/wiki/Posting_style#Interleaved_style> to make the conversation legible.) You want the code not readable by which humans? Any code which is re

Re: Teaching python to non-programmers

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 4:10:22 AM UTC+5:30, Rhodri James wrote: > Sorry your post was the straw to break the camel's back this week, but it > is a complete pain to the rest of us. I have more than once considered > getting my reader to automatically discard anything with > "@googlegroups.

Ostracising bad actors (was: Teaching python to non-programmers)

2014-04-10 Thread Ben Finney
"Rhodri James" writes: > Sorry your post was the straw to break the camel's back this week, but > it is a complete pain to the rest of us. I have more than once > considered getting my reader to automatically discard anything with > "@googlegroups.com" in the message ID just to reduce the aggrava

Re: Unpacking U-Boot image file

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 3:31:50 AM UTC+5:30, Rhodri James wrote: > On Wed, 09 Apr 2014 18:18:56 +0100, Rustom Mody > > After that.. whats the U-boot format? > > The Fine Manual (http://www.denx.de/wiki/view/DULG/UBootImages) isn't very > forthcoming, sadly; > > "U-Boot operates on "image" f

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 1:17 PM, Rustom Mody wrote: > There are cultures -- far more pervasive than USENET in 2014 -- where > top posting is the norm, eg > - Gmail makes top posting the norm. Compare the figures of gmail and Usenet > users > - Corporate cultures more or less require top posting -

Re: Teaching python to non-programmers

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 9:29:00 AM UTC+5:30, Chris Angelico wrote: > On Fri, Apr 11, 2014 at 1:17 PM, Rustom Mody wrote: > > > There are cultures -- far more pervasive than USENET in 2014 -- where > > top posting is the norm, eg > > > - Gmail makes top posting the norm. Compare the figures of g

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 2:37 PM, Rustom Mody wrote: > Right. Its true that when I was at a fairly large corporate, I was not told: > "Please always top post!" > > What I was very gently and super politely told was: > "Please dont delete mail context" Then you were told that by someone who does no

Re: threading

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 2:14:42 AM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody: > > > What you are saying is that what the OS is doing, you can do better. > > Analogous to said C programmer saying that what (data structures) the > > python programmer can make he can do better. > > > > I'm s

Re: Teaching python to non-programmers

2014-04-10 Thread Paul Rudin
Chris Angelico writes: > On Fri, Apr 11, 2014 at 2:37 PM, Rustom Mody wrote: >> Right. Its true that when I was at a fairly large corporate, I was not told: >> "Please always top post!" >> >> What I was very gently and super politely told was: >> "Please dont delete mail context" > > Then you we

Re: threading

2014-04-10 Thread Steven D'Aprano
On Fri, 11 Apr 2014 01:51:41 +0200, Sturla Molden wrote: > On 10/04/14 21:44, Marko Rauhamaa wrote: >> I'm happy that asyncio is >> happening after all these long years. It would be nice if it supported >> edge-triggered wakeups, but I suppose that isn't supported in all >> operating systems. > >

Re: Teaching python to non-programmers

2014-04-10 Thread Ian Kelly
On Thu, Apr 10, 2014 at 11:11 PM, Chris Angelico wrote: > On Fri, Apr 11, 2014 at 2:37 PM, Rustom Mody wrote: >> Right. Its true that when I was at a fairly large corporate, I was not told: >> "Please always top post!" >> >> What I was very gently and super politely told was: >> "Please dont dele

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 3:34 PM, Paul Rudin wrote: > Chris Angelico writes: > >> On Fri, Apr 11, 2014 at 2:37 PM, Rustom Mody wrote: >>> What I was very gently and super politely told was: >>> "Please dont delete mail context" >> >> Then you were told that by someone who does not understand emai

Re: Teaching python to non-programmers

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 10:41:26 AM UTC+5:30, Chris Angelico wrote: > On Fri, Apr 11, 2014 at 2:37 PM, Rustom Mody wrote: > > Right. Its true that when I was at a fairly large corporate, I was not told: > > "Please always top post!" > > > > What I was very gently and super politely told was: > >

Re: python obfuscate

2014-04-10 Thread Mark Lawrence
On 11/04/2014 04:12, Ben Finney wrote: Wesley writes: Umm, just wanna make all .py files not human readable. (Please don't top-post; instead, use interleaved replies https://en.wikipedia.org/wiki/Posting_style#Interleaved_style> to make the conversation legible.) Further would you please

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 3:39 PM, Ian Kelly wrote: > That depends on what the mail is being used for. For instance there's > a difference between mail-as-dialogue and mail-as-business-process. > In the former it is normal, even polite, to prune as the topic evolves > and past quotations become les

Re: Teaching python to non-programmers

2014-04-10 Thread Rustom Mody
On Friday, April 11, 2014 11:12:14 AM UTC+5:30, Rustom Mody wrote: > On Friday, April 11, 2014 10:41:26 AM UTC+5:30, Chris Angelico wrote: > > Also unhelpful is to suggest that norms should, simply *because* they > > are the prevailing practice, be maintained. Even if everyone else on > > python-li

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 3:42 PM, Rustom Mody wrote: > People whose familiarity with religion is limited to the Judeo-Christian > tradition are inclined to the view (usually implicit) that > "being religious" == "belief in God" > However there are religions where belief in God is irreligious -- Jai

Re: python obfuscate

2014-04-10 Thread Joshua Landau
On 11 April 2014 02:29, Wesley wrote: > Does python has any good obfuscate? Most other people on the list will point out why such a thing is mostly pointless and you don't really need it. However, if this really is your major blocker to using Python, I suggest compiling with Cython. There are

Re: Teaching python to non-programmers

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 3:54 PM, Rustom Mody wrote: > Just to make it clear: > 1. I have no objection to the python list culture. > As I said I tend to follow it in places where it is not the norm and get > chided for it > [For the record on other groups which are exclusively GG/gmail based

Re: python obfuscate

2014-04-10 Thread Chris Angelico
On Fri, Apr 11, 2014 at 4:00 PM, Joshua Landau wrote: > But I do warn that it's adding another abstracting step that > doesn't improve - it probably harms - the overall usability of the > product. Further, a determined hacker can circumvent it, much as they > can circumvent everything else. I had

Re: so module loading fails

2014-04-10 Thread dieter
Eddy Ilg writes: > ... > > Checking the symbols of Entity.so gives: > # nm Entity.so | grep PyInit_Entity > 1e5c t PyInit_Entity When I remember right, "t" means a "local" (aka "static") symbol - you need instead a "global" symbol (identified by "T"). -- https://mail.python.org/ma