Re: Do you like the current design of python.org?

2014-12-10 Thread Ian Kelly
On Tue, Dec 9, 2014 at 10:16 PM, Cameron Simpson wrote: > - the AA menu buttons are all dysfunctional, being purely javascript; it would be better if the menu was styled "display=none" by default, and made visible by javascript With Javascript enabled, the AA menu buttons don't seem to be displa

Re: generating PDF or EPUB, which ?

2014-12-10 Thread dieter
Mohsen Pahlevanzadeh writes: > I need to create an RTL (Right To Left) documentation, with > python.But i don't know which library to use.Which support RTL and > etc. > > If you any experience with pdf generating or EPUB generating please > share me I have used "repor

Re: Python script isn't producing text in data file

2014-12-10 Thread Tim Golden
On 11/12/2014 05:18, Steven D'Aprano wrote: (I think it is funny that the script has a Unix "hash-bang" line at the top of the script, but is written such that it will only work on Windows.) I didn't look at the code, but responding only to your comment... Since the introduction of the PEP397

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: Python script isn't producing text in data file

2014-12-10 Thread Grant Edwards
On 2014-12-11, Ben Finney wrote: > Docfxit writes: > >> Thank you all for the encouragement to make it smaller. > Begin with an empty program, and start constructing the behaviour > from scratch. Ignore anything else you want the program to do; focus > only on *this* behaviour which is confusing

Re: Python script isn't producing text in data file

2014-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2014 20:23:56 -0800, Docfxit wrote: > I don't know enough about Python to figure out how to isolate where the > problem is happening. Ouch! You have my sympathies. Nevertheless, I'm not going to run your code to see what it does. Even if I trusted it, and I don't, I can see that

Re: Python script isn't producing text in data file

2014-12-10 Thread Grant Edwards
On 2014-12-11, Docfxit wrote: > I am happy to paste it into a post. The reason I didn't is because > it's very large. The Python script is 1239 lines long. The example > summary is 105 lines long. The input log is 6810 lines long. > > Are you sure you want me to post all of that here? Or wou

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

2014-12-10 Thread iMath
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 freezed? code is here http://stackoverflow.com/qu

Re: Python script isn't producing text in data file

2014-12-10 Thread Ben Finney
Docfxit writes: > Thank you all for the encouragement to make it smaller. Even if only for the purpose of demonstrating the behaviour that you'd like to discuss. This doesn't necessarily mean changing the actual program you're working on (though it might lead to that as a benefit). > I don't k

Re: Python script isn't producing text in data file

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 3:23 PM, Docfxit wrote: > Thank you all for the encouragement to make it smaller. > I don't know enough about Python to figure out how to isolate where the > problem is happening. > > Maybe it would be best If I could get some help in getting a debugger working > so I can

Re: Python script isn't producing text in data file

2014-12-10 Thread Docfxit
On Wednesday, December 10, 2014 7:55:17 PM UTC-8, Ben Finney wrote: > Docfxit writes: > > > I am happy to paste it into a post. The reason I didn't is because > > it's very large. The Python script is 1239 lines long. > > That's too long to direct us toward, no matter where you put it. > > Yo

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Terry Reedy
On 12/10/2014 3:32 PM, Ian Kelly wrote: So Idle gets it right. At least for static methods of classes, which isn't very surprising. Does it complete a function attribute of a function? >>> def f(): pass >>> f.a='attr' >>> f. as possible completion. Having used Komodo IDE for a number of y

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2014 09:46:55 -0700, Ian Kelly wrote: > I don't particularly have a problem with functions having attributes, > e.g. I think itertools.chain.from_iterable is just peachy. There is a > downside though, which is that making those functions attributes of > another function rather than

Re: Python script isn't producing text in data file

2014-12-10 Thread Ben Finney
Docfxit writes: > I am happy to paste it into a post. The reason I didn't is because > it's very large. The Python script is 1239 lines long. That's too long to direct us toward, no matter where you put it. Your task, then, is to construct a *much* smaller and simpler example that still demon

Re: Python script isn't producing text in data file

2014-12-10 Thread Docfxit
On Wednesday, December 10, 2014 6:47:17 PM UTC-8, Steven D'Aprano wrote: > On Wed, 10 Dec 2014 15:04:52 -0800, Docfxit wrote: > > > This is the Python Script that I'm having trouble with: > > http://theoffice.la/m/CGPLogSummaryTest.py > > Link is broken: > Steven I'm very sorry. I didn't mean to

Re: When do default parameters get their values set?

2014-12-10 Thread Ben Finney
Rustom Mody writes: > In the FP world referential opaqueness is the name of the devil. Caring about object identity is not the same as referential opacity. > In the more 'real' imperative/OO world there's way too much of it. I'm very glad to be programming in the real world; there is more achi

Re: Python script isn't producing text in data file

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 2:30 PM, Docfxit wrote: > I am happy to paste it into a post. The reason I didn't is because it's very > large. The Python script is 1239 lines long. > The example summary is 105 lines long. > The input log is 6810 lines long. > > Are you sure you want me to post all of

Re: Coercing two numbers without coerce()

2014-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2014 20:27:13 -0200, Luciano Ramalho wrote: > Python 3 dropped the coerce() built-in, but I have a situation where I'd > love to use it. > > I have two numbers A, B and I need to get the value of A coerced to the > type of A+B. This is for a generator function that will produce a s

Re: Python script isn't producing text in data file

2014-12-10 Thread Docfxit
On Wednesday, December 10, 2014 5:45:14 PM UTC-8, Chris Angelico wrote: > On Thu, Dec 11, 2014 at 12:32 PM, wrote: > > On Wednesday, December 10, 2014 3:11:28 PM UTC-8, Chris Angelico wrote: > >> On Thu, Dec 11, 2014 at 10:04 AM, Docfxit wrote: > >> > This is the Python Script that I'm having tr

Re: When do default parameters get their values set?

2014-12-10 Thread Rustom Mody
On Thursday, December 11, 2014 8:45:22 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 10 Dec 2014 18:18:44 -0800, Rustom Mody wrote: > > > > And going the other way -- no defs only lambdas its this: > > > > > f = lambda : (lambda x= {}: x) > f()() is f()() > > False > d = f() > >>

Re: When do default parameters get their values set?

2014-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2014 18:18:44 -0800, Rustom Mody wrote: > And going the other way -- no defs only lambdas its this: > > f = lambda : (lambda x= {}: x) f()() is f()() > False d = f() d() is d() > True > > But I have a different question -- can this be demonstrated

Re: When do default parameters get their values set?

2014-12-10 Thread Rustom Mody
On Thursday, December 11, 2014 8:05:13 AM UTC+5:30, Chris Angelico wrote: > On Thu, Dec 11, 2014 at 1:18 PM, Rustom Mody wrote: > > But I have a different question -- can this be demonstrated without the > > 'is'? > > Because to me 'is' -- equivalently id -- is a code-smell and is like > > explai

Re: Python script isn't producing text in data file

2014-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2014 15:04:52 -0800, Docfxit wrote: > This is the Python Script that I'm having trouble with: > http://theoffice.la/m/CGPLogSummaryTest.py Link is broken: steve@runes:~$ wget http://theoffice.la/m/CGPLogSummaryTest.py --2014-12-11 13:41:26-- http://theoffice.la/m/CGPLogSummaryTes

Re: Python script isn't producing text in data file

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 1:41 PM, Steven D'Aprano wrote: > On Thu, 11 Dec 2014 12:44:51 +1100, Chris Angelico wrote: > >> Agreed. There are ways around some of those problems (eg using wget to >> fetch something, and then looking at it in a text editor - it's hard to >> get pwned through a text edi

Re: Python script isn't producing text in data file

2014-12-10 Thread Steven D'Aprano
On Thu, 11 Dec 2014 12:44:51 +1100, Chris Angelico wrote: > Agreed. There are ways around some of those problems (eg using wget to > fetch something, and then looking at it in a text editor - it's hard to > get pwned through a text editor... though I won't say impossible), but > there are other is

Re: When do default parameters get their values set?

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 1:18 PM, Rustom Mody wrote: > But I have a different question -- can this be demonstrated without the 'is'? > Because to me 'is' -- equivalently id -- is a code-smell and is like > explaining funny behavior by showing the dis -- like > $ gcc -S ... > -- output. > > It can a

Re: When do default parameters get their values set?

2014-12-10 Thread Rustom Mody
On Thursday, December 11, 2014 12:09:10 AM UTC+5:30, rand...@fastmail.us wrote: > On Tue, Dec 9, 2014, at 21:44, Rustom Mody wrote: > > Nice example -- thanks. > > Elaborates the why of this gotcha -- a def(inition) is imperative. > > From a semantic pov very clean. > > From an expectation pov alwa

Re: Python script isn't producing text in data file

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 12:32 PM, wrote: > On Wednesday, December 10, 2014 3:11:28 PM UTC-8, Chris Angelico wrote: >> On Thu, Dec 11, 2014 at 10:04 AM, Docfxit wrote: >> > This is the Python Script that I'm having trouble with: >> > http://theoffice.la/m/CGPLogSummaryTest.py >> > >> > If I haven

Re: Python script isn't producing text in data file

2014-12-10 Thread sohcahtoa82
On Wednesday, December 10, 2014 3:11:28 PM UTC-8, Chris Angelico wrote: > On Thu, Dec 11, 2014 at 10:04 AM, Docfxit wrote: > > This is the Python Script that I'm having trouble with: > > http://theoffice.la/m/CGPLogSummaryTest.py > > > > If I haven't provided enough information please let me know.

Re: Python script isn't producing text in data file

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 10:04 AM, Docfxit wrote: > This is the Python Script that I'm having trouble with: > http://theoffice.la/m/CGPLogSummaryTest.py > > If I haven't provided enough information please let me know. It'd be better to include the code in the body of your email. You never know whe

Re: Python script isn't producing text in data file

2014-12-10 Thread Docfxit
On Wednesday, December 10, 2014 3:05:07 PM UTC-8, Docfxit wrote: > I have a Python script that runs with no errors but it doesn't produce the > output it should in a text file. I can't figure out why. Is this the correct > forum to post this in or can someone suggest a more appropriate forum? >

Python script isn't producing text in data file

2014-12-10 Thread Docfxit
I have a Python script that runs with no errors but it doesn't produce the output it should in a text file. I can't figure out why. Is this the correct forum to post this in or can someone suggest a more appropriate forum? The script selects all files from the day before the script is run. So

[RELEASE] Python 2.7.9

2014-12-10 Thread Benjamin Peterson
It is my pleasure to announce the release of Python 2.7.9, a new bugfix release in the Python 2.7 series. Despite technically being a maintenance release, Python 2.7.9 includes several majors changes from 2.7.8: - The "ensurepip" module has been backported to Python 2.7 - Python 3's ssl module has

Re: Coercing two numbers without coerce()

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 9:27 AM, Luciano Ramalho wrote: > I know I can do type(A+B)(A), or A+B-B, but both alternatives are ugly > and perform needless arithmetic. > > What do you suggest, now that the coerce() built-in is not available? I would suggest just doing the arithmetic :) That's guarant

Coercing two numbers without coerce()

2014-12-10 Thread Luciano Ramalho
Python 3 dropped the coerce() built-in, but I have a situation where I'd love to use it. I have two numbers A, B and I need to get the value of A coerced to the type of A+B. This is for a generator function that will produce a series similar to what itertools.count does. I know I can do type(A+B)

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 9:04 AM, Bruno Cauet wrote: > I hesitated a while before deciding not to include it! Apart from python > core development what would be the reasons to work mostly on this version ? > I'll fix the omission right ahead. My main reason is that I'm running Debian Wheezy here (

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 3:59 AM, Bruno Cauet wrote: > Here's the url: http://goo.gl/forms/tDTcm8UzB3 > I'll publish the results around the end of the year. On "Which versions do you use?", 3.5 is not included. My primary Python 3 build on here is a 3.5 built from trunk. :) ChrisA -- https://mai

Re: How to detect that a function argument is the default one

2014-12-10 Thread ast
"Chris Angelico" a écrit dans le message de news:mailman.16814.1418228205.18130.python-l...@python.org... On Thu, Dec 11, 2014 at 3:10 AM, Jean-Michel Pichavant wrote: - Original Message - From: "ast" But there's an issue with that solution: self.mass being computed during the i

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Ian Kelly
On Wed, Dec 10, 2014 at 10:48 AM, Terry Reedy wrote: >> Likewise the generated help for the help() function, >> unless care is taken to explicitly mention the existence of those >> functions in either the doc string for the module > > > help(it.chain) lists > | from_iterable(...) from builtins.t

Re: seeking a framework to automate router configurations

2014-12-10 Thread ercintorun
18 Aralık 2013 Çarşamba 04:40:20 UTC+2 tarihinde Frank Cui yazdı: > Hi Pythoners, > > > I'm looking for a tool or framework in which I can do a slight modification > to achieve the following task: > > > "Asynchronously reset a large number of cisco routers back to their original > configurati

Python Script to convert firewall rules

2014-12-10 Thread Kashif Rana
Hello Experts I am network engineer and not expert in programming. I would like to make one python script to convert juniper netscreen firewall configuration into juniper SRX firewall configuration. Sample is below. I would appreciate if anybody can give me the high level steps to start with.

Re: When do default parameters get their values set?

2014-12-10 Thread random832
On Tue, Dec 9, 2014, at 21:44, Rustom Mody wrote: > Nice example -- thanks. > Elaborates the why of this gotcha -- a def(inition) is imperative. > From a semantic pov very clean. > From an expectation pov always surprising. Of course, I used a lambda for this. The equivalent without would be: def

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Terry Reedy
On 12/10/2014 11:46 AM, Ian Kelly wrote: I don't particularly have a problem with functions having attributes, e.g. I think itertools.chain.from_iterable is just peachy. There is a downside though, which is that making those functions attributes of another function rather than of the module It

Re: How to detect that a function argument is the default one

2014-12-10 Thread Jussi Piitulainen
Jean-Michel Pichavant writes: > If you like one-liners, > > def __init__(self, center=(0,0), radius=10, mass=None): > self.center = center > self.radius = radius > self.mass = (mass is None and radius**2) or mass That's not a one-liner. That's a one-liner: def __init__(self, center=

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-10 Thread Nathaniel Smith
On 10 Dec 2014 17:16, "Ian Cordasco" wrote: > > On Wed, Dec 10, 2014 at 11:10 AM, Donald Stufft wrote: > > > > On Dec 10, 2014, at 11:59 AM, Bruno Cauet wrote: > > > > Hi all, > > Last year a survey was conducted on python 2 and 3 usage. > > Here is the 2014 edition, slightly updated (from 9 to

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-10 Thread Ian Cordasco
On Wed, Dec 10, 2014 at 11:10 AM, Donald Stufft wrote: > > On Dec 10, 2014, at 11:59 AM, Bruno Cauet wrote: > > Hi all, > Last year a survey was conducted on python 2 and 3 usage. > Here is the 2014 edition, slightly updated (from 9 to 11 questions). > It should not take you more than 1 minute to

Getting errors from Imaplib - reloaded

2014-12-10 Thread Beatrix Willius from Moth Software
Hi, thanks to your help I can get traceback errors for the imaplib. But what about accessing direct imap errors? In the following part of my script I can't select the not-deleted mails for some reason. But how do I access the error? The debugger goes to the exception line but OSError.strerror d

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-10 Thread Donald Stufft
> On Dec 10, 2014, at 11:59 AM, Bruno Cauet wrote: > > Hi all, > Last year a survey was conducted on python 2 and 3 usage. > Here is the 2014 edition, slightly updated (from 9 to 11 questions). > It should not take you more than 1 minute to fill. I would be pleased if you > took that time. > >

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Ian Kelly
On Wed, Dec 10, 2014 at 2:24 AM, Steven D'Aprano wrote: > > Example: In the statistics module in Python 3.4, I added a `median` > function to calculate the median by the traditional schoolbook algorithm. > But that's only one out of a number of ways to calculate medium, and > inspired by similar s

Python 2/3 compatibility code that reads like English!

2014-12-10 Thread Chris Angelico
So you have a string of text, either a Unicode string in Python 3, or a byte string that's meant to be UTF-8. Most of the way through, you're working with the native string type, for compatibility with other sections of code. But then you want to be certain you're working with a Unicode string...

Re: How to detect that a function argument is the default one

2014-12-10 Thread Marko Rauhamaa
Skip Montanaro : > On Wed, Dec 10, 2014 at 9:14 AM, ast wrote: >> I have the idea to write: >> >> def __init__(center=(0,0), radius=10, mass=None)): >> >>if mass == None:self.mass = radius**2 >>else: >>self.mass = mass >> >> but maybe Python provides something clever. > >

Re: How to detect that a function argument is the default one

2014-12-10 Thread Ian Kelly
On Wed, Dec 10, 2014 at 9:10 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > If you like one-liners, > > def __init__(self, center=(0,0), radius=10, mass=None): > self.center = center > self.radius = radius > self.mass = (mass is None and radius**2) or mass If mass is None

Re: How to detect that a function argument is the default one

2014-12-10 Thread Ned Batchelder
On 12/10/14 11:10 AM, Jean-Michel Pichavant wrote: self.mass = (mass is None and radius**2) or mass When will this idiom die? We've had actual if-expressions for a while now: self.mass = radius**2 if mass is None else mass -- Ned Batchelder, http://nedbatchelder.com -- https://mail

Re: How to detect that a function argument is the default one

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 3:10 AM, Jean-Michel Pichavant wrote: > - Original Message - >> From: "ast" >> I have the idea to write: >> >> def __init__(center=(0,0), radius=10, mass=None)): >> >> if mass == None: >> self.mass = radius**2 >> else: >> self.mass = mass >

Re: How to detect that a function argument is the default one

2014-12-10 Thread Jean-Michel Pichavant
- Original Message - > From: "ast" > I have the idea to write: > > def __init__(center=(0,0), radius=10, mass=None)): > > if mass == None: > self.mass = radius**2 > else: > self.mass = mass > > but maybe Python provides something clever. > > Thx If you like on

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Ian Kelly
On Wed, Dec 10, 2014 at 9:01 AM, Ian Kelly wrote: > This also seems perfectly natural: > > def len(iterable): > return sum(1 for item in iterable) > > My observation is that seems strange to me that one standard sequence operation should be supported for arbitrary iterators and the other not.

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Ian Kelly
On Wed, Dec 10, 2014 at 1:21 AM, Peter Otten <__pete...@web.de> wrote: > > Ian Kelly wrote: > > Huh, I wasn't even aware that membership tests worked on iterables with no > > __contains__ method. Seems odd to me that 'x in y' should be supported but > > not 'len(y)'. > > To me > > def contains(iter

Re: encrypt the http request url on the local machine

2014-12-10 Thread Chris Angelico
On Thu, Dec 11, 2014 at 12:48 AM, iMath wrote: > 在 2014年12月9日星期二UTC+8下午2时58分36秒,iMath写道: >> my software on the local machine needs to send http request to a specific >> web server , is there any way to protect the http request url from being >> found by Packet analyzer software like Wireshark an

Re: How to detect that a function argument is the default one

2014-12-10 Thread ast
"Skip Montanaro" a écrit dans le message de news:mailman.16809.1418225382.18130.python-l...@python.org... On Wed, Dec 10, 2014 at 9:14 AM, ast wrote: thx -- https://mail.python.org/mailman/listinfo/python-list

Re: How to detect that a function argument is the default one

2014-12-10 Thread Skip Montanaro
On Wed, Dec 10, 2014 at 9:14 AM, ast wrote: > I have the idea to write: > > def __init__(center=(0,0), radius=10, mass=None)): > >if mass == None:self.mass = radius**2 >else: >self.mass = mass > > but maybe Python provides something clever. This is almost the correct idio

How to detect that a function argument is the default one

2014-12-10 Thread ast
Hello Here is what I would like to implement class Circle: def __init__(center=(0,0), radius=10, mass=1)): self.center = center self.radius = radius if "mass is the default one": <- self.mass = radius**2 else: self.mass = mass I

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Steven D'Aprano
Shiyao Ma wrote: > Thanks guys. > > I was only aware of a limited iterables which themselves are iterators, > e.g., the generator. > > Seems like its really a pitfall. Any glossary, list on the iterables that > *might* exhaust themselves? Iterables include: - iterators - sequences (e.g. lists,

Re: encrypt the http request url on the local machine

2014-12-10 Thread iMath
在 2014年12月9日星期二UTC+8下午2时58分36秒,iMath写道: > my software on the local machine needs to send http request to a specific web > server , is there any way to protect the http request url from being found by > Packet analyzer software like Wireshark and fiddler. The sever is not mine, > so I can do noth

Call for speakers for the first PyCon Belarus

2014-12-10 Thread Alina Dolgikh
Hi, everyone! I represent Belarusian Python community and professionally is the IT-events manager. Our community has regular monthly meet-ups for 70-100 persons and we are going to develop it further. We are planning to make the first Belarusian PyCon on the 31st of January and looking for speake

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Marko Rauhamaa
Steven D'Aprano : > I've noticed this deep-seated conservatism in Python programmers > before. Parts of the language are deeply under-utilised, because there > are simple idioms that people refuse to use because they're > "confusing" even though they are a trivial generalisation of things > that w

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Peter Otten
Shiyao Ma wrote: > Thanks guys. > > I was only aware of a limited iterables which themselves are iterators, > e.g., the generator. > > Seems like its really a pitfall. Any glossary, list on the iterables that > *might* exhaust themselves? Usually the test iterable is iter(iterable) returns Tr

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Shiyao Ma
Thanks guys. I was only aware of a limited iterables which themselves are iterators, e.g., the generator. Seems like its really a pitfall. Any glossary, list on the iterables that *might* exhaust themselves? Regards. -- https://mail.python.org/mailman/listinfo/python-list

Re: Solution to a problem,write terminal output to file

2014-12-10 Thread Robert Clove
I think i didn't explained well Two programs client and server in c. to run client strace -c ./client to run server strace -c ./server After a minute i want to send client SIGINT signal and capture the terminal output in a file. If i use os.system and press ctrl+c signal from keyboard i get the o

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Chris Angelico
On Wed, Dec 10, 2014 at 8:24 PM, Steven D'Aprano wrote: > And if anyone has got the impression that I'm calling you a dummy because > you don't see it my way, I'm not. I'm calling you nekulturny and somebody > who can't recognise elegant code when it's staring you right in the > face :-P I love i

Re: Python Iterables struggling using map() built-in

2014-12-10 Thread Steven D'Aprano
On Tue, 09 Dec 2014 21:44:54 -0500, Roy Smith wrote: > In article <54878f8a$0$13010$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > >> I really think you guys are trying too hard to make this function seem >> more complicated than it is. If you find it so hard to understand a >>

Re: Nested loops is strangely slow, totally at a loss.

2014-12-10 Thread Peter Otten
Ian Kelly wrote: > On Tue, Dec 9, 2014 at 11:30 PM, Chris Angelico wrote: >> Are you sure it isn't? Your 'space' is an iterable cubic >> cross-product. Your first loop checks (0,0,0) which is the first >> element returned, and is thus fast... but it also *consumes* that >> first element. The next

generating PDF or EPUB, which ?

2014-12-10 Thread Mohsen Pahlevanzadeh
Dear all, I need to create an RTL (Right To Left) documentation, with python.But i don't know which library to use.Which support RTL and etc. If you any experience with pdf generating or EPUB generating please share me --Regards Mohsen -

NUMPY Installation Win7 Intel MKL

2014-12-10 Thread wolosonovich
Hello! Hopefully some of you can help me out. I am having the hardest time installing Numpy using the Intel MKL library. I've read the Intel article on their site, but it doesn't specifically address Windows, so I suspect the directions get me close, but when it comes to this sort of thing, eve