on django deployment

2012-07-30 Thread Yzr
Hi, guys: which solution is better, concerning memory usage and concurrency when deploying django ? 1) nginx + uWSGI + django 2) nginx + tornado + django thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python a commercial proposition ?

2012-07-30 Thread Steven D'Aprano
On Mon, 30 Jul 2012 21:45:51 -0700, Paul Rubin wrote: > Steven D'Aprano writes: >> And at that level, you aren't going to write your app in Python anyway, >> and not because of the GIL. (These microcontrollers are unlikely to >> have multiple cores -- why the hell does your microwave oven need tw

Re: OT: accessibility (was "Re: simplified Python parsing question")

2012-07-30 Thread Ian Kelly
On Mon, Jul 30, 2012 at 8:54 PM, Tim Chase wrote: > I've tried a similar experiment and am curious on your input device. > Eye-tracking/dwell-clicking? A sip/puff joystick? Of the various > input methods I tried, I found that Dasher[1] was the most > intuitive, had a fairly high input rate and

Re: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Dieter Maurer
Chris Gonnerman writes: > On 07/30/2012 04:20 AM, Dieter Maurer wrote: > ... >> I find it very stupid to see several window scrolls of changes for >> a package but to learn how to install the package, I have to download its >> source... > Not sure I get this. The installation procedure for Polly

Re: Is Python a commercial proposition ?

2012-07-30 Thread Stefan Behnel
Paul Rubin, 31.07.2012 06:45: > A real compiler (PyPy) will help Python performance far more than > multi-core currently can. That's too general a statement to be meaningful. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: py2c - an open source Python to C/C++ is looking for developers

2012-07-30 Thread Stefan Behnel
alex23, 31.07.2012 02:16: > On Jul 31, 2:42 am, MaxTheMouse wrote: >> What is the difference between this and Shedskin? Shedskin being a >> (restricted) python-to-C++ compiler. (http://code.google.com/p/ >> shedskin/) Is the goal to be able to handle any python code or a >> subset? > > There's als

Re: Is Python a commercial proposition ?

2012-07-30 Thread Paul Rubin
Steven D'Aprano writes: > And at that level, you aren't going to write your app in Python anyway, > and not because of the GIL. (These microcontrollers are unlikely to have > multiple cores -- why the hell does your microwave oven need two cores?) http://greenarrays.com ;-) > It seems to me th

Re: ANN: visage (interfaces)

2012-07-30 Thread jwp
On Monday, July 30, 2012 7:09:03 PM UTC-7, Steven D'Aprano wrote: > Do *one* and see if github actually does render it. Then do the rest. Did it for one project. It does render it. =) Naturally, sphinx autodoc links don't work. =( Come-on github, use dat fundin' -- http://mail.python.org/mailman

OT: accessibility (was "Re: simplified Python parsing question")

2012-07-30 Thread Tim Chase
On 07/30/12 21:11, Eric S. Johansson wrote: > the ability for multiple people to work on the same document at > the same time is really important. Can't do that with Word or > Libre office. revision tracking in traditional word processors > are unpleasant to work with especially if your hands a

toggle name, With explanations

2012-07-30 Thread Eric S. Johansson
the wonderful responses I received from people like Lazlo, Paul, and Stephen has given me some ideas about a different approach. First, here's explanation of what I'm doing I'm developing a method which will enable hand disabled developers such as myself to create and manipulate symbols identi

Re: [ANN] New paper published (Volume 7 of The Python Papers) - High-Speed Data Shredding using Python

2012-07-30 Thread Simon Cropper
On 31/07/12 07:36, mauricel...@acm.org wrote: Link: http://ojs.pythonpapers.org/index.php/tpp/article/view/243 Abstract In recent years, backup and restore is a common topic in data storage. However, there’s hardly anybody mention about safe data deletion. Common data destruction methodology

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Steven D'Aprano
On Mon, 30 Jul 2012 19:32:47 +, Prasad, Ramit wrote: >> >> I would suggest you change the theme -- using Firefox 3.6 the page >> >> is very difficult to read. >> > >> > Thanks for the report. Do you mind if I ask why you are using such an >> > old version? >> > (It looks fine with Firefox 14.0

Re: simplified Python parsing question

2012-07-30 Thread Eric S. Johansson
On 7/30/2012 9:54 PM, Steven D'Aprano wrote: On Mon, 30 Jul 2012 11:40:50 -0400, Eric S. Johansson wrote: If you have been reading the papers, you would understand what I'm doing. That is the second time, at least, that you have made a comment like that. Actually, it's probably more like the

Re: ANN: visage (interfaces)

2012-07-30 Thread Steven D'Aprano
On Mon, 30 Jul 2012 18:41:19 -0700, jwp wrote: >> BTW I think if you rename the ReStructured Text docs to .rst github >> will automatically render them. > > Did not know that. Gonna go do a lot of git mv's now. Do *one* and see if github actually does render it. Then do the rest. -- Steven --

Re: Is Python a commercial proposition ?

2012-07-30 Thread Steven D'Aprano
On Mon, 30 Jul 2012 14:09:38 +, Grant Edwards wrote: > On 2012-07-30, Stefan Behnel wrote: > >> Still, you may still get away with the above statement by providing a >> sufficiently narrow definition of "standalone". By my definition, there >> isn't much "standalone" code out there. Most cod

Re: simplified Python parsing question

2012-07-30 Thread Steven D'Aprano
On Mon, 30 Jul 2012 11:40:50 -0400, Eric S. Johansson wrote: > If you have been reading the papers, you would understand what I'm > doing. That is the second time, at least, that you have made a comment like that. Understand that most people are not going to follow links to find out whether or

Re: ANN: visage (interfaces)

2012-07-30 Thread jwp
On Monday, July 30, 2012 6:09:10 PM UTC-7, alex23 wrote: > a side project, so I may have some more concrete feedback soon :) =) > BTW I think if you rename the ReStructured Text docs to .rst github > > will automatically render them. Did not know that. Gonna go do a lot of git mv's now. Thanks

Re: ANN: visage (interfaces)

2012-07-30 Thread alex23
On Jul 30, 3:18 pm, jwp wrote: > What's c.l.py's perspective on managing interfaces and implementations? I've been working with Plone for the past year and have become a big fan of interfaces. I must admit I _do_ like zope.interface's adaptation, but your's looks lighter in a way that could be ha

Re: Is Python a commercial proposition ?

2012-07-30 Thread alex23
On Jul 30, 12:31 pm, Rodrick Brown wrote: > Its still not possible to be a pure Python developer and find gainful > employment today. I have been working as a "pure" Python developer for six+ years now (in that the bulk of my coding is done in Python, with some interface behaviour in JS). On aver

Re: py2c - an open source Python to C/C++ is looking for developers

2012-07-30 Thread alex23
On Jul 31, 2:42 am, MaxTheMouse wrote: > What is the difference between this and Shedskin? Shedskin being a > (restricted) python-to-C++ compiler. (http://code.google.com/p/ > shedskin/) Is the goal to be able to handle any python code or a > subset? There's also Nuitka, which is an unrestricted

Re: Linux shell to python

2012-07-30 Thread Dan Stromberg
On Mon, Jul 30, 2012 at 11:14 PM, Emile van Sebille wrote: > On 7/30/2012 3:56 PM Dan Stromberg said... > > >> On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott > > > And of course you can write list comprehensions on as many lines as >> it take to make the code maintainable. >> >> Sigh, and

Re: Linux shell to python

2012-07-30 Thread Emile van Sebille
On 7/30/2012 3:56 PM Dan Stromberg said... On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott And of course you can write list comprehensions on as many lines as it take to make the code maintainable. Sigh, and I'm also not keen on multi-line list comprehensions, specifically because I thi

Re: Linux shell to python

2012-07-30 Thread Dan Stromberg
On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott wrote: > lspci gets all its information from the files in /sys/bus/pci/devices. > > You can use os.listdir() to list all the files in the folder and then open > the files you want to get the data you need. > Gee, wouldn't it be more portable to parse

Re: Linux shell to python

2012-07-30 Thread Barry Scott
lspci gets all its information from the files in /sys/bus/pci/devices. You can use os.listdir() to list all the files in the folder and then open the files you want to get the data you need. And of course you can write list comprehensions on as many lines as it take to make the code maintainable.

[ANN] New paper published (Volume 7 of The Python Papers) - Designing and Testing PyZMQ Applications

2012-07-30 Thread mauricel...@acm.org
Link: http://ojs.pythonpapers.org/index.php/tpp/article/view/242 Abstract PyZMQ is a powerful and easy-to-use network layer. While ZeroMQ and PyZMQ are quite well documented and good introductory tutorials exist, no best-practice guide on how to design and especially to test larger or more comp

[ANN] New paper published (Volume 7 of The Python Papers) - High-Speed Data Shredding using Python

2012-07-30 Thread mauricel...@acm.org
Link: http://ojs.pythonpapers.org/index.php/tpp/article/view/243 Abstract In recent years, backup and restore is a common topic in data storage. However, there’s hardly anybody mention about safe data deletion. Common data destruction methodology requires the wipe operation to fill the disk wit

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Roy Smith
In article , Grant Edwards wrote: > I imagine that VAXes running Unix went extinct in the wild long before > VAXes running VMS. Of course they did. VMS is all about vendor lock-in. People who continue to run VAXen don't do so because they're wedded to the hardware. They do so because they'

RE: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Prasad, Ramit
> >> I would suggest you change the theme -- using Firefox 3.6 the page is > >> very difficult to read. > > > > Thanks for the report. Do you mind if I ask why you are using such an > > old version? > > (It looks fine with Firefox 14.0.1) > > > That version works for me -- I don't like upgrading

RE: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Prasad, Ramit
> > However, personally, I am not interested in all the details (typically > > found in "CHANGES.txt") but some (often implicit) information is > > sufficient for me: something like "major API change", "minor bug > > fixes". Thus, think carefully what you put on the overview page. > I see your poi

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Ethan Furman
Pedro Kroger wrote: On Jul 30, 2012, at 3:33 PM, Ethan Furman > wrote: Pedro Kroger wrote: Pyknon is a simple music library for Python hackers. Sounds cool. How is 'Pyknon' pronounced? I pronounce it similarly as google translate does: So the 'k' is pronounc

RE: Is Python a commercial proposition ?

2012-07-30 Thread Prasad, Ramit
> I work in financials and the majority of our apps are developed in C++ > and Java yet all the tools that startup, deploy and conduct rigorous > unit testing are implemented in Python or Shell scripts that wrap > Python scripts. > > Python definitely has its place in the enterprise however not so

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Pedro Kroger
On Jul 30, 2012, at 3:33 PM, Ethan Furman wrote: > Pedro Kroger wrote: >> Pyknon is a simple music library for Python hackers. > > Sounds cool. How is 'Pyknon' pronounced? I pronounce it similarly as google translate does: http://translate.google.com/#English|English|Pyknon It's a musical G

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Ethan Furman
Pedro Kroger wrote: Pyknon is a simple music library for Python hackers. Sounds cool. How is 'Pyknon' pronounced? It's available on PyPI and its homepage is http://kroger.github.com/pyknon/ I would suggest you change the theme -- using Firefox 3.6 the page is very difficult to read. ~E

[ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Pedro Kroger
Pyknon is a simple music library for Python hackers. With Pyknon you can generate Midi files quickly and reason about musical proprieties. It works with Python 2.7 and 3.2. Pyknon is very simple to use, here's a basic example to create 4 notes and save into a MIDI file:: from pyknon.genmidi i

Re: Is Python a commercial proposition ?

2012-07-30 Thread Emile van Sebille
On 7/29/2012 5:12 PM Rodrick Brown said... Until the GIL is fixed I doubt anyone will seriously look at Python as an option for large enterprise standalone application development. See openERP -- http://www.openerp.com/ -- they've been actively converting SAP accounts and have recently absorbe

RE: simplified Python parsing question

2012-07-30 Thread Paul van der Linden
Another possibility is to use the ast module of python: http://docs.python.org/library/ast.html The only problem with that module, is that everything you parse must be correct, otherwise it throws an exception, I don't know if that's a problem for your project?   -Original message- From

RE: Linux shell to python

2012-07-30 Thread Paul van der Linden
You can do this with one subprocess.Popen and some python commands. The alternative is to pipe some subprocess.Popen commands together. Or for the quick way out (but I think you better stick with bash scripting then): http://pypi.python.org/pypi/sarge/ Don't know about it's stability/ubs/etc, n

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Dan Stromberg
On Mon, Jul 30, 2012 at 12:44 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > I wish to extract the bit fields from a Python float, call it x. First I > cast the float to 8-bytes: > > s = struct.pack('=d', x) > i = struct.unpack('=q', s)[0] > > Then I extract the bit fields fr

Re: py2c - an open source Python to C/C++ is looking for developers

2012-07-30 Thread MaxTheMouse
On Jul 30, 7:27 am, maniandra...@gmail.com wrote: > I created py2c (http://code.google.com/p/py2c)- an open source Python to > C/C++ translator! > py2c is looking for developers! > To join create a posting in the py2c-discuss Google Group or email me! > Thanks > PS:I hope this is the appropiate gr

Re: Is Python a commercial proposition ?

2012-07-30 Thread rusi
On Jul 29, 9:01 pm, lipska the kat wrote: > Pythoners > > Firstly, thanks to those on the tutor list who answered my questions. > > I'm trying to understand where Python fits into the set of commonly > available, commercially used languages of the moment. > > My most recent experience is with Java

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Mark Dickinson
On Monday, July 30, 2012 3:16:05 PM UTC+1, Grant Edwards wrote: > The last ones I worked on that where the FP format wasn't IEEE were > > the DEC VAX and TI's line if 32-bit floating-point DSPs. I don't > > think Python runs on the latter, but it might on the former. For current hardware, there

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Grant Edwards
On 2012-07-30, Mark Lawrence wrote: > On 30/07/2012 15:16, Grant Edwards wrote: >> On 2012-07-30, Steven D'Aprano wrote: >> >>> 1) Are there any known implementations or platforms where Python floats >>> are not C doubles? If so, what are they? >> >> And the question you didn't ask: are there any

Re: simplified Python parsing question

2012-07-30 Thread Eric S. Johansson
On 7/30/2012 10:59 AM, Laszlo Nagy wrote: yeah the problem is also little more complicated than simple parsing of Python code. For example, one example (from the white paper) *meat space blowback = Friends and family [well-meaning attempt] *could that be parsed by the tools you mention?

Re: py2c - an open source Python to C/C++ is looking for developers

2012-07-30 Thread andrea crotti
2012/7/30 : > I created py2c ( http://code.google.com/p/py2c )- an open source Python to > C/C++ translator! > py2c is looking for developers! > To join create a posting in the py2c-discuss Google Group or email me! > Thanks > PS:I hope this is the appropiate group for this message. > -- > http:/

CfP: 5th International Workshop on Multi-Core Computing Systems (MuCoCoS)

2012-07-30 Thread SP
*** Paper submission deadline: September 9, 2012 *** 5th International Workshop on Multi-Core Computing Systems (MuCoCoS) 2012 Focus: Performance Portability a

Re: simplified Python parsing question

2012-07-30 Thread Laszlo Nagy
yeah the problem is also little more complicated than simple parsing of Python code. For example, one example (from the white paper) *meat space blowback = Friends and family [well-meaning attempt] *could that be parsed by the tools you mention? It is not valid Python code. Pygments is ab

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Mark Lawrence
On 30/07/2012 15:16, Grant Edwards wrote: On 2012-07-30, Steven D'Aprano wrote: 1) Are there any known implementations or platforms where Python floats are not C doubles? If so, what are they? And the question you didn't ask: are there any platforms where a C double isn't IEEE-754? The last

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Roy Smith
In article , Grant Edwards wrote: > The last ones I worked on that where the FP format wasn't IEEE were > the DEC VAX According to http://en.wikipedia.org/wiki/Vax#History, the last VAX was produced 7 years ago. I'm sure there's still more than a few chugging away in corporate data centers

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Grant Edwards
On 2012-07-30, Steven D'Aprano wrote: > 1) Are there any known implementations or platforms where Python floats > are not C doubles? If so, what are they? And the question you didn't ask: are there any platforms where a C double isn't IEEE-754? The last ones I worked on that where the FP forma

Re: Is Python a commercial proposition ?

2012-07-30 Thread Grant Edwards
On 2012-07-30, Stefan Behnel wrote: > Still, you may still get away with the above statement by providing a > sufficiently narrow definition of "standalone". By my definition, there > isn't much "standalone" code out there. Most code I know interfaces with a > couple of external tools, libraries

Re: Is Python a commercial proposition ?

2012-07-30 Thread lipska the kat
On 30/07/12 14:06, Roy Smith wrote: In article, Chris Angelico wrote: Python's an excellent glue language, but it's also fine for huge applications. Yes, it can't multithread across cores if you use CPython and are CPU-bound. That's actually a pretty specific limitation, and taking out any c

py2c - an open source Python to C/C++ is looking for developers

2012-07-30 Thread maniandram01
I created py2c ( http://code.google.com/p/py2c )- an open source Python to C/C++ translator! py2c is looking for developers! To join create a posting in the py2c-discuss Google Group or email me! Thanks PS:I hope this is the appropiate group for this message. -- http://mail.python.org/mailman/lis

Re: Is Python a commercial proposition ?

2012-07-30 Thread Roy Smith
In article , Chris Angelico wrote: > Python's an excellent glue language, but it's also fine for huge > applications. Yes, it can't multithread across cores if you use > CPython and are CPU-bound. That's actually a pretty specific > limitation, and taking out any component of that eliminates the

Re: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Chris Gonnerman
On 07/29/2012 11:00 PM, Ben Finney wrote: Your post is showing up as a reply to a thread about IEEE-784 floats, because you created your message as a reply. Consequently, it's rather confusing why you suddenly start talking about PollyReports. If you want to attract attention to an unrelated to

Re: [Python] Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Chris Gonnerman
On 07/30/2012 04:20 AM, Dieter Maurer wrote: "CHANGES.txt" is not automatically presented. If necessary, you must integrate it into the "long description". However, personally, I am not interested in all the details (typically found in "CHANGES.txt") but some (often implicit) information is suff

Re: Linux shell to python

2012-07-30 Thread Philipp Hagemeister
On 07/30/2012 01:31 PM, Jürgen A. Erhard wrote: > On Mon, Jul 30, 2012 at 12:35:38PM +0200, Philipp Hagemeister wrote: >> import subprocess >> [ l.partition(' ')[0] # or l[:7], if you want to copy it verbatim >> for l in subprocess.check_output(['lspci']).splitlines() >> if 'Q' in l and is

Re: Linux shell to python

2012-07-30 Thread Peter Otten
Vikas Kumar Choudhary wrote: > let me know if someone has tried to implement (grep and PIPE) shell > commands in python `lspci | grep Q | grep "$isp_str1" | grep "$isp_str2" > | cut -c1-7' > > I tried to use python subprocess and OS.Popen modules. subprocess is the way to go. > I was trying

Re: Linux shell to python

2012-07-30 Thread Jürgen A . Erhard
On Mon, Jul 30, 2012 at 12:35:38PM +0200, Philipp Hagemeister wrote: > On 07/30/2012 09:05 AM, Vikas Kumar Choudhary wrote: > > `lspci | grep Q | grep "$isp_str1" | grep "$isp_str2" | cut -c1-7' > > The rough Python equivalent would be > > import subprocess > [ l.partition(' ')[0] # or l[:7

Re: Python Error

2012-07-30 Thread Duncan Booth
Jürgen A. Erhard wrote: > Peter's right, but instead of a print before the line, put a > try/except around it, like > >try: > set1 = set(list1) >except TypeError: > print list1 > raise > > This way, only the *actual* error triggers any output. With a general > print b

Re: Linux shell to python

2012-07-30 Thread 张少华
you can use commands.getstatusoutput(command), the shell command special charactor (like "$ and so on )should be escaped! 在 2012年7月30日星期一UTC+8下午3时40分04秒,Chris Angelico写道: > On Mon, Jul 30, 2012 at 5:05 PM, Vikas Kumar Choudhary > > wrote: > > > > > > I was trying porting from bash shell to

Re: Is Python a commercial proposition ?

2012-07-30 Thread Tim Chase
On 07/29/12 21:31, Rodrick Brown wrote: > Its still not possible to be a pure Python developer and find > gainful employment today. I'm not sure where you get your facts, but unless you define "pure" in a super-narrow way, it's just flat-out wrong. I've been employed doing primarily Python for th

Re: Linux shell to python

2012-07-30 Thread Philipp Hagemeister
On 07/30/2012 09:05 AM, Vikas Kumar Choudhary wrote: > `lspci | grep Q | grep "$isp_str1" | grep "$isp_str2" | cut -c1-7' The rough Python equivalent would be import subprocess [ l.partition(' ')[0] # or l[:7], if you want to copy it verbatim for l in subprocess.check_output(['lspci']).sp

Re: simplified Python parsing question

2012-07-30 Thread Eric S. Johansson
On 7/30/2012 5:25 AM, Laszlo Nagy wrote: Did you try to use pygments? http://pygments.org/docs/api/ thanks, I'll take a look. I would first tokenize the code, then divide it by statement keywords. Finally, you just need to find expression/assignment statements in the remaining sections.

Re: newbie: write content in a file (server-side)

2012-07-30 Thread Thomas Kaufmann
Am Sonntag, 29. Juli 2012 16:16:01 UTC+2 schrieb Thomas Kaufmann: > Hi, > > > > I send from a client file content to my server (as bytes). So far so good. > > The server receives this content complete. Ok. Then I want to write this > content to a new file. It works too. But in the new file are

Re: newbie: write content in a file (server-side)

2012-07-30 Thread Thomas Kaufmann
Am Sonntag, 29. Juli 2012 17:16:11 UTC+2 schrieb Peter Otten: > Thomas Kaufmann wrote: > > > > > I send from a client file content to my server (as bytes). So far so good. > > > The server receives this content complete. Ok. Then I want to write this > > > content to a new file. It works too.

Re: simplified Python parsing question

2012-07-30 Thread Laszlo Nagy
I appreciate the help because I believe that once this is working, it'll make a significant difference in the ability for disabled programmers to write code again as well as be able to integrate within existing development team and their naming conventions. Did you try to use pygments? htt

Re: PyPI question, or, maybe I'm just stupid

2012-07-30 Thread Dieter Maurer
Chris Gonnerman writes: > I've been making some minor updates to the PollyReports module I > announced a while back, and I've noticed that when I upload it to > PyPI, my changelog (CHANGES.txt) doesn't appear to be integrated into > the site at all. Do I have to put the changes into the README,

Re: simplified Python parsing question

2012-07-30 Thread Dieter Maurer
"Eric S. Johansson" writes: > When you are sitting on or in a name, you look to the left or look to > the right what would you see that would tell you that you have gone > past the end of that name. For example > > a = b + c > > if you are sitting on a, the boundaries are beginning of line and =,

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Mark Dickinson
On Monday, July 30, 2012 1:44:04 AM UTC+1, Steven D'Aprano wrote: > 1) Are there any known implementations or platforms where Python floats > are not C doubles? If so, what are they? Well, IronPython is presumably using .NET Doubles, while Jython will be using Java Doubles---in either case, that

Re: Is Python a commercial proposition ?

2012-07-30 Thread Chris Angelico
On Mon, Jul 30, 2012 at 4:07 PM, Stefan Behnel wrote: > Still, you may still get away with the above statement by providing a > sufficiently narrow definition of "standalone". By my definition, there > isn't much "standalone" code out there. Most code I know interfaces with a > couple of external

Re: Linux shell to python

2012-07-30 Thread Chris Angelico
On Mon, Jul 30, 2012 at 5:05 PM, Vikas Kumar Choudhary wrote: > > I was trying porting from bash shell to python. > > let me know if someone has tried to implement (grep and PIPE) shell commands > in python `lspci | grep Q | grep "$isp_str1" | grep "$isp_str2" | cut -c1-7' Welcome! While it's

Linux shell to python

2012-07-30 Thread Vikas Kumar Choudhary
Dear friends, I just joined the group. I was trying porting from bash shell to python. let me know if someone has tried to implement (grep and PIPE)  shell commands in python `lspci | grep Q | grep  "$isp_str1" | grep "$isp_str2" | cut -c1-7'   I tried to use python subprocess and OS.Popen modul

Re: Extracting bit fields from an IEEE-784 float

2012-07-30 Thread Ulrich Eckhardt
Am 30.07.2012 02:44, schrieb Steven D'Aprano: I wish to extract the bit fields from a Python float, call it x. First I cast the float to 8-bytes: s = struct.pack('=d', x) i = struct.unpack('=q', s)[0] Then I extract the bit fields from the int, e.g. to grab the sign bit: (i & 0x800