Re: Help understanding the decisions *behind* python? - immutable objects

2009-07-27 Thread John Nagle
Steven D'Aprano wrote: On Sun, 26 Jul 2009 11:24:48 -0700, John Nagle wrote: An interesting issue is Python objects, which are always mutable. A "dict" of Python objects is allowed, but doesn't consider the contents of the objects, just their identity (address). Only built-in types are imm

Problem in PyArg_ParseTuple on python 2.5.2 with AIX

2009-07-27 Thread abhi
Hi, I am facing a problem using PyArg_ParseTuple() in my C-API extension. Here is a small repro of the function: static PyObject *parsetuple_test(PyObject *self, PyObject *args) { SQLUSMALLINT param_no = 0; PyObject *py_obj = NULL; if (!PyArg_ParseTuple(args, "Oi", &py

open a file in python

2009-07-27 Thread jayshree
pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() Please tell me how to open a file placed in any directory or in same directory. After opening this file i want to use the contain (public key ) for encryption thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: web page retrieve problems

2009-07-27 Thread Alex
On Jul 26, 8:57 am, golu wrote: > the following function retrieves pages from the web and saves them in > a specified dir. i want to extract the respective filenames from the > urls e.g the page code.google.com shud be saved as code-google.htm  or > something similar. can u suggest me a way to do

Re: open a file in python

2009-07-27 Thread Kushal Kumaran
On Mon, Jul 27, 2009 at 12:58 PM, jayshree wrote: > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() > > Please tell me how to open a file placed in any directory or in same > directory. > > After opening this file i want to use the contain (public key ) for > encryption > Does the code

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Piet van Oostrum
> Dotan Cohen (DC) wrote: >DC> Referring to this article: >DC> >http://math-blog.com/2009/07/20/complex-algorithm-research-and-development-harder-than-many-think/ >DC> The author, who is specifically looking for math-related functions, writes: >DC> """ >DC> The dream algorithm R&D tool woul

[no subject]

2009-07-27 Thread 9372966370
(Re: urllib2.URLError: error using twill with python) how can i change url/http://... - Sent by a Cricket mobile device - -- http://mail.python.org/mailman/listinfo/python-list

[no subject]

2009-07-27 Thread 9372966370
(Re: urllib2.URLError: error using twill with python) - Sent by a Cricket mobile device - -- http://mail.python.org/mailman/listinfo/python-list

SEC doc parsing

2009-07-27 Thread Michael Boldin
I am looking for any parsing routines (written in python), for Security Exchange Commision (SEC) documents. These documents are on the SEC's EDGAR system (at ftp://ftp.sec.gov ) and I am especially interested in insider trading files known as Forms 3,4 and 5. _

Re: invoke method on many instances

2009-07-27 Thread Aahz
In article , Gabriel Genellina wrote: > >Ok, if you insist... > >NLMPI = Ni La Más Puta Idea. >IHNFI = I Have No Fucking Idea. Thanks! -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote produ

Re: how can a child thread notify a parent thread its status?

2009-07-27 Thread davidj411
could i see an example of this maybe? -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-27 Thread greg
Bearophile wrote: Was this link, shown by William, not enough? http://hg.flibuste.net/libre/games/cheval/file/46797c3a5136/chevalx.pyx#l1 Yes, sorry, I posted too soon. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Computation/E-mail Expert opinions?

2009-07-27 Thread Diez B. Roggisch
scribio_vide schrieb: MAIL From: From: "tommy02" To: "MeAmI" Subject: I AM LOOKING FORWARD TO YOUR ANSWER ON THIS ISSUE Date: Fri, 24 Jul 09 11:52:27 Pacific Daylight Time MIME-Version: 1.0 Content-Type: multipart/mixed;boundary= " =_NextPart_000_008C_8F228C8E.684AAFEA" X-Priority: 3 X-MSM

Re: How can I get the line number ?

2009-07-27 Thread kk
Maxim, Thank you so much. I will try right now. -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding method from one class to another class or to instance of another class

2009-07-27 Thread marekw2143
Thanks for your responses. im_func is all I need. I considered subclassing, wchih is more easy to extend, but I needed some quick way to add a method to another class. Regards, Marek -- http://mail.python.org/mailman/listinfo/python-list

Re: Itext for Python

2009-07-27 Thread S.Selvam
On Sun, Jul 26, 2009 at 11:52 PM, Santhosh Kumar wrote: > Hi all, One of my cousin suggested me to do a IText > PDF converter for python. Actually I heard that there is > no separate IText converter either we have to go for jython or GCJ with > wrapper. Instead of wrapping, my plan is t

Re: How do I generate dia diagrams from python source code?

2009-07-27 Thread Vesa Köppä
Qauzzix wrote: Greetings. Since I have been using dia to make my UML diagrams. I also found an util named dia2code that generates python code from dia diagram. Now that I have that option I really want to find a way to generate dia diagram from existing code and/or maintain my diagrams. I have

Re: Globalize all variables in function without knowing names.

2009-07-27 Thread Tom
> Dictionaries are fundamental to Python and very useful. Not learning > about them before starting to write code is like not learning about the > accelerator pedal before starting to drive a car. Heh, I just looked at the actual tutorial for Dictionaries and I have to say they are very useful. Ba

Re: If Scheme is so good why MIT drops it?

2009-07-27 Thread Hendrik van Rooyen
On Sunday 26 July 2009 21:26:46 David Robinow wrote: > > I'm a mediocre programmer. Does this mean I should switch to PHP? I have searched, but I can find nothing about this mediocre language. Could you tell us more? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: missing 'xor' Boolean operator

2009-07-27 Thread Mark Dickinson
On Jul 27, 1:53 am, "Delaney, Timothy (Tim)" wrote: > Mark Dickinson wrote: > >> Since the 'and' and 'or' already return objects (and objects > >> evaluate to true or false), then 'xor' should behave likewise, IMO. > >> I expect that would be the case if it were ever added to the > >> language. >

Re: Problem in PyArg_ParseTuple on python 2.5.2 with AIX

2009-07-27 Thread John Machin
On Jul 27, 5:11 pm, abhi wrote: > Hi, >     I am facing a problem using PyArg_ParseTuple() in my C-API > extension. Here is a small repro of the function: > > static PyObject *parsetuple_test(PyObject *self, PyObject *args) > { >         SQLUSMALLINT param_no = 0; Sorry, my crystal ball is on the

Re: open a file in python

2009-07-27 Thread jayshree
On Jul 27, 1:09 pm, Kushal Kumaran wrote: > On Mon, Jul 27, 2009 at 12:58 PM, jayshree wrote: > > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() > > > Please tell me how to open a file placed in any directory or in same > > directory. > > > After opening this file i want to use the co

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Mohammad Tayseer
You can generate binaries using py2exe, and you can create UI using Tkinter (which is very easy) or wxPython (which have GUI builders) Mohammad Tayseer http://spellcoder.com/blogs/tayseer From: Piet van Oostrum To: python-list@python.org Sent: Monday, July

Re: open a file in python

2009-07-27 Thread Diez B. Roggisch
jayshree wrote: > On Jul 27, 1:09 pm, Kushal Kumaran > wrote: >> On Mon, Jul 27, 2009 at 12:58 PM, jayshree >> wrote: >> > pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() >> >> > Please tell me how to open a file placed in any directory or in same >> > directory. >> >> > After opening

Call function from another class

2009-07-27 Thread Lars
Hi I'm trying to make an simple image viewer in wxPython and rotate an image with a slider. The code at Pastebin is striped down at bit. The class Frame(wx.Frame) is the main window, the function "def CreateMenuBar" (l. 39) creates a menu, where the function "def onRotate (self,event):" (l. 43) is

_msi.Record object has no attribute 'GetString'

2009-07-27 Thread ++imanshu
The documentation (http://docs.python.org/library/msilib.html#record- objects) for msilib mentions the GetString() method on Record objects. However, the following snippet :- db = msilib.OpenDatabase(os.path.join(root, file), msilib.MSIDBOPEN_READONLY) view = db.OpenView('SELECT * FROM Property')

Re: Call function from another class

2009-07-27 Thread Diez B. Roggisch
Lars wrote: > Hi > I'm trying to make an simple image viewer in wxPython and rotate an > image with a slider. The code at Pastebin is striped down at bit. The > class Frame(wx.Frame) is the main window, the function "def > CreateMenuBar" (l. 39) creates a menu, where the function "def onRotate > (

Re: Problem in PyArg_ParseTuple on python 2.5.2 with AIX

2009-07-27 Thread abhi
On Jul 27, 2:25 pm, John Machin wrote: > On Jul 27, 5:11 pm, abhi wrote: > > > Hi, > >     I am facing a problem using PyArg_ParseTuple() in my C-API > > extension. Here is a small repro of the function: > > > static PyObject *parsetuple_test(PyObject *self, PyObject *args) > > { > >         SQLU

Re: RSA cryptography between Python and Java

2009-07-27 Thread Piet van Oostrum
> Paul Rubin (PR) wrote: >PR> Rob Knop writes: >>> Are there any python libraries that will take a public key in this >>> format and do RSA encoding on it? >PR> Try www.trevp.com/tlslite I have looked into tlslite and found no easy way to do this. Maybe I over

Free hosting for open source Python projects

2009-07-27 Thread Sean Kemplay
Hi All, If anyone is looking for somewhere to host their Python project / modules etc. for free, please get in touch with me. There of course are some restraints on disk space and bandwidth but they should be sufficient for most projects. Your project must be open source. You will have access

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-27 Thread William Dode
On 27-07-2009, Bearophile wrote: > William Dode': >> I updated the script (python, c and java) with your unrolled version >> + somes litle thinks. > [...] >> c 1.85s >> gcj 2.15s >> java 2.8s >> python2.5 + psyco 3.1s >> unladen-2009Q2 145s (2m45) >> python2.5 254s (4m14s) >> python3.1 300s (5m) >>

Re: mmap 2GB allocation limit on Win XP, 32-bits, Python 2.5.4

2009-07-27 Thread Dave Angel
(forwarding this message, as the reply was off-list) Kim Hansen wrote: 2009/7/24 Dave Angel : It's not a question of how much disk space there is, but how much virtual space 32 bits can address. 2**32 is about 4 gig, and Windows XP reserves about half of that for system use. Presumably a 64

quickly looping over a 2D array?

2009-07-27 Thread Martin
Hi, I am new to python and I was wondering if there was a way to speed up the way I index 2D arrays when I need to check two arrays simultaneously? My current implementations is (using numpy) something like the following... for i in range(numrows): for j in range(numcols): if array_1

Re: RSA cryptography between Python and Java

2009-07-27 Thread Michael Ströder
Piet van Oostrum wrote: > Please note that the text to be encrypted must be smaller than the key > size (at least 11 bytes smaller). You shouldn't encrypt large data with > RSA anyway: it is too slow. Normally you would encrypt a session key > with RSA and encrypt the data with the session key usin

Re: quickly looping over a 2D array?

2009-07-27 Thread Peter Otten
Martin wrote: > I am new to python and I was wondering if there was a way to speed up > the way I index 2D arrays when I need to check two arrays > simultaneously? My current implementations is (using numpy) something > like the following... > > for i in range(numrows): > for j in range(numco

Re: Call function from another class

2009-07-27 Thread Lars
> If I'm not mistaken, in "doRotate" you should be able to refer to the > to-be-closed dialog via > self.frameRotate > > Now if you change the "sliderUpdate"-code to store that angle instead of > just letting it fall out of scope, you could access that value through > frameRotate: > > def sliderUpd

Re: mmap 2GB allocation limit on Win XP, 32-bits, Python 2.5.4

2009-07-27 Thread Slaunger
On 27 Jul., 13:21, Dave Angel wrote: > (forwarding this message, as the reply was off-list) > > > > Kim Hansen wrote: > > 2009/7/24 Dave Angel : > > >> It's not a question of how much disk space there is, but how much virtual > >> space 32 bits can address.  2**32 is about 4 gig, and Windows XP re

Re: open a file in python

2009-07-27 Thread Piet van Oostrum
> jayshree (j) wrote: >j> pk = open('/home/jayshree/my_key.public.pem' , 'rb').read() By the way, a PEM file is a text file, no reason to open it in binary mode. Just replace the 'rb' with 'r' or leave it out. -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Privat

Re: ANN: psyco V2

2009-07-27 Thread Eduardo Lenz
Em Qui 16 Jul 2009, às 19:48:18, Christian Tismer escreveu: > Announcing Psyco V2 source release > -- > > This is the long awaited announcement of Psyco V2. > > Psyco V2 is a continuation of the well-known psyco project, > which was called finished and was dis-contin

Re: If Scheme is so good why MIT drops it?

2009-07-27 Thread David Robinow
On 7/26/09, MRAB wrote: > David Robinow wrote: > > > This doesn't mean they're on the same level - in fact, if you read > carefully > > > you'll see my original post said as much: python attracted average > > > programmers; php attracted mediocre programmers and even some > > > non-programmers, wh

ANN: python-ldap-2.3.9

2009-07-27 Thread Michael Ströder
Find a new release of python-ldap: http://www.python-ldap.org/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processin

Re: RSA cryptography between Python and Java

2009-07-27 Thread Piet van Oostrum
> Michael Ströder (MS) wrote: >MS> Piet van Oostrum wrote: >>> Please note that the text to be encrypted must be smaller than the key >>> size (at least 11 bytes smaller). You shouldn't encrypt large data with >>> RSA anyway: it is too slow. Normally you would encrypt a session key >>> with R

wave.setparams((2, 2, 44100, 44100 * 2 * 10, "NONE", "not compressed")) became more than 30secs

2009-07-27 Thread '2+
thanx to rob .. who gave me an example of how to use the WAVE lib now am on my way to use it as simple as i can i wrote an oil.py the instance of which will behave like an oscillator which constantly generates 7 different wave forms (non fixed) i thought this code might produce 10secs of wave file

Re: quickly looping over a 2D array?

2009-07-27 Thread Martin
On Jul 27, 12:42 pm, Peter Otten <__pete...@web.de> wrote: > Martin wrote: > > I am new to python and I was wondering if there was a way to speed up > > the way I index 2D arrays when I need to check two arrays > > simultaneously? My current implementations is (using numpy) something > > like the f

Convert raw binary file to ascii

2009-07-27 Thread r2
I have a memory dump from a machine I am trying to analyze. I can view the file in a hex editor to see text strings in the binary code. I don't see a way to save these ascii representations of the binary, so I went digging into Python to see if there were any modules to help. I found one I think m

Re: Help understanding the decisions *behind* python? - immutable objects

2009-07-27 Thread Benjamin Kaplan
On Sun, Jul 26, 2009 at 2:24 PM, John Nagle wrote: > Beni Cherniavsky wrote: >> >> On Jul 22, 9:36 am, Hendrik van Rooyen >> wrote: >>> >>> On Tuesday 21 July 2009 15:49:59 Inky 788 wrote: >>> My guess is that it was probably for optimization reasons long ago. I've never heard a *good* r

Particle research opens door for new technology

2009-07-27 Thread Rashid Ali Soomro
Big uses for small particles will be explored at the annual Particle Technology Research Centre Conference at The University of Western Ontario July 9 and 10.more http://0nanotechnology0.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: quickly looping over a 2D array?

2009-07-27 Thread Peter Otten
Martin wrote: > On Jul 27, 12:42 pm, Peter Otten <__pete...@web.de> wrote: >> Martin wrote: >> > I am new to python and I was wondering if there was a way to speed up >> > the way I index 2D arrays when I need to check two arrays >> > simultaneously? My current implementations is (using numpy) som

Re: quickly looping over a 2D array?

2009-07-27 Thread Martin
On Jul 27, 1:46 pm, Peter Otten <__pete...@web.de> wrote: > Martin wrote: > > On Jul 27, 12:42 pm, Peter Otten <__pete...@web.de> wrote: > >> Martin wrote: > >> > I am new to python and I was wondering if there was a way to speed up > >> > the way I index 2D arrays when I need to check two arrays >

Re: Convert raw binary file to ascii

2009-07-27 Thread Peter Otten
r2 wrote: > I have a memory dump from a machine I am trying to analyze. I can view > the file in a hex editor to see text strings in the binary code. I > don't see a way to save these ascii representations of the binary, so > I went digging into Python to see if there were any modules to help. >

Testoob: How do you use testoob.collector_from_globals / collector_from_modules?

2009-07-27 Thread Harry Ebbers
Hi, For a project I'm creating unittests using testoob. When all tests are in a single file there is no problem if __name__ == '__main__': testoob.main() does the trick as usual. But for a number of python-applications they have asked me to group unittests in different files, based on commo

Re: quickly looping over a 2D array?

2009-07-27 Thread Peter Otten
Martin wrote: > On Jul 27, 1:46 pm, Peter Otten <__pete...@web.de> wrote: >> Martin wrote: >> > On Jul 27, 12:42 pm, Peter Otten <__pete...@web.de> wrote: >> >> Martin wrote: >> >> > I am new to python and I was wondering if there was a way to speed >> >> > up the way I index 2D arrays when I need

Re: Distinguishing active generators from exhausted ones

2009-07-27 Thread Michal Kwiatkowski
On Jul 27, 1:56 am, a...@pythoncraft.com (Aahz) wrote: > >> Upon a cursory look, after a generator 'gen' is exhausted (meaning > >> gen.next() has raised StopIteration), it seems that gen.gi_frame will be > >> None. > > >Only in Python 2.5 or higher though. I need to support Python 2.3 and > >2.4 a

Re: Problem in PyArg_ParseTuple on python 2.5.2 with AIX

2009-07-27 Thread John Machin
On Jul 27, 8:49 pm, abhi wrote: > On Jul 27, 2:25 pm, John Machin wrote: > > > > > On Jul 27, 5:11 pm, abhi wrote: > > > > Hi, > > >     I am facing a problem using PyArg_ParseTuple() in my C-API > > > extension. Here is a small repro of the function: > > > > static PyObject *parsetuple_test(PyO

Re: quickly looping over a 2D array?

2009-07-27 Thread Martin
On Jul 27, 2:17 pm, Peter Otten <__pete...@web.de> wrote: > Martin wrote: > > On Jul 27, 1:46 pm, Peter Otten <__pete...@web.de> wrote: > >> Martin wrote: > >> > On Jul 27, 12:42 pm, Peter Otten <__pete...@web.de> wrote: > >> >> Martin wrote: > >> >> > I am new to python and I was wondering if ther

iText for Python

2009-07-27 Thread santhoshvkumar
Hi all, One of my cousin suggested me to do a IText PDF converter for python. Actually I heard that there is no separate IText converter either we have to go for jython or GCJ with wrapper. Instead of wrapping, my plan is to create a separate module with Python and I am thinking of doin

Re: Override a method but inherit the docstring

2009-07-27 Thread Jean-Michel Pichavant
Ben Finney wrote: Howdy all, The following is a common idiom:: class FooGonk(object): def frobnicate(self): """ Frobnicate this gonk. """ basic_implementation(self.wobble) class BarGonk(FooGonk): def frobnicate(self): special_implemen

Re: Convert raw binary file to ascii

2009-07-27 Thread Grant Edwards
On 2009-07-27, r2 wrote: > I have a memory dump from a machine I am trying to analyze. I can view > the file in a hex editor to see text strings in the binary code. I > don't see a way to save these ascii representations of the binary, $ strings memdump.binary >memdump.strings $ hexdump -C memd

Re: How to comment constant values?

2009-07-27 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Mon, 27 Jul 2009 00:47:08 +0200, Diez B. Roggisch wrote: Only modules, classes, and functions/methods can have docstrings associated with them. For anything else, you have to use comments; or you can mention them in the docstrings of related things. While th

Re: python function for retrieving key and encryption

2009-07-27 Thread Piet van Oostrum
> jayshree (j) wrote: >j> import M2Crypto >j> from M2Crypto import RSA,SSL >j> def encrypt(): >j> pk = open('my_key.public.pem', 'rb').read() >j> rsa = M2Crypto.RSA.load_pub_key(pk) #return a M2Crypto.RSA.RSA_pub >j> object. >j> plaintext = 4545479545655576767767686688782344 >j>

Wrapping prstat on Solaris

2009-07-27 Thread skip
At work we currently use top to monitor ongoing system utilization on our Solaris systems. As time has moved on though, use of top has become problematic. Our admins want us to switch to prstat, Sun's top-like command. It works fine however doesn't emit a timestamp at each display interval, so i

Re: iText for Python

2009-07-27 Thread Simon Brunning
2009/7/27 santhoshvkumar : >           One of my cousin  suggested me to do a IText PDF converter > for python. Actually I heard that there is no separate IText converter > either we have to go for jython or GCJ with wrapper. Instead of > wrapping, my plan is to create a separate module with Python

Re: Form/Template Fill-in the blanks

2009-07-27 Thread Aahz
In article <4b77a992-370d-4879-88a0-fdd6a23f7...@p10g2000prm.googlegroups.com>, allan wrote: > >My initial thought was to use: >1. .ini files to declare the EDI configuration > >INI file configuration: >* A "root" INI file indicates other INI files that define each segment >of the EDI document. >

Re: Script runs manually, but cron fails

2009-07-27 Thread Bryan
On Jul 24, 2:11 pm, Bryan wrote: > I have a backup script that runs fine when I run it manually from the > command line.  When I run it with cron, the script stops running at > random points in the source code. > > The script calls rsync with the subprocess module, which in turn uses > ssh to back

Re: Itext for Python

2009-07-27 Thread Kushal Kumaran
On Mon, Jul 27, 2009 at 2:23 PM, S.Selvam wrote: > > > On Sun, Jul 26, 2009 at 11:52 PM, Santhosh Kumar > wrote: >> >> Hi all, >>            One of my cousin  suggested me to do a IText PDF converter for >> python. Actually I heard that there is no separate IText converter either we >> have to go

Re: Script runs manually, but cron fails

2009-07-27 Thread J Kenneth King
Bryan writes: > I have a backup script that runs fine when I run it manually from the > command line. When I run it with cron, the script stops running at > random points in the source code. > > The script calls rsync with the subprocess module, which in turn uses > ssh to backup files from a bo

Re: Distinguishing active generators from exhausted ones

2009-07-27 Thread Aahz
In article <1c8ae01e-2e9c-497c-9f8d-408f56f9c...@g31g2000yqc.googlegroups.com>, Michal Kwiatkowski wrote: >On Jul 27, 1:56 am, a...@pythoncraft.com (Aahz) wrote: Upon a cursory look, after a generator 'gen' is exhausted (meaning gen.next() has raised StopIteration), it seems that gen.gi

Re: pyc files not automatically compiled on import

2009-07-27 Thread Aahz
In article , Baz Walter wrote: > >i thought that python automatically compiled pyc files after a module is >successfully imported. what could prevent this happening? Looks like you got your problem fixed, but for the record, not having write permission on a directory also causes this. It's eve

Re: If Scheme is so good why MIT drops it?

2009-07-27 Thread Aahz
In article , Hendrik van Rooyen wrote: >On Sunday 26 July 2009 21:26:46 David Robinow wrote: >> >> I'm a mediocre programmer. Does this mean I should switch to PHP? > >I have searched, but I can find nothing about this mediocre language. > >Could you tell us more? :-P (For anyone who is confus

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Ethan Furman
[corrected top posting] Mohammad Tayseer wrote: *From:* Piet van Oostrum *To:* python-list@python.org *Sent:* Monday, July 27, 2009 11:18:20 AM *Subject:* Re: Looking for a dream language: sounds like Python to me. > Dotan Cohen mailto:dotanco...@gmail.com>> (DC) wrote: >DC> Referring

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Dotan Cohen
> Creating binaries is not the same as creating /fast, efficient/ binaries. >  Py2Exe bundles it all together, but does not make it any faster. > How inefficient is py2exe. I was under the impression that it's really not that bad. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il --

Re: quickly looping over a 2D array?

2009-07-27 Thread Peter Otten
Martin wrote: > The statement works now, but it doesn't give the same results as my > original logic, strangely!? > > in my logic: > > data = np.zeros((numrows, numcols), dtype = np.uint8, order ='C') > > for i in range(numrows): > for j in range(numcols): > if band3[i,j] == 255 or

Re: If Scheme is so good why MIT drops it?

2009-07-27 Thread David Smith
Aahz wrote: > In article , > Hendrik van Rooyen wrote: >> On Sunday 26 July 2009 21:26:46 David Robinow wrote: >>> I'm a mediocre programmer. Does this mean I should switch to PHP? >> I have searched, but I can find nothing about this mediocre language. >> >> Could you tell us more? > > :-P >

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Jean-Paul Calderone
On Mon, 27 Jul 2009 18:12:09 +0300, Dotan Cohen wrote: Creating binaries is not the same as creating /fast, efficient/ binaries.  Py2Exe bundles it all together, but does not make it any faster. How inefficient is py2exe. I was under the impression that it's really not that bad. py2exe doe

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread David Cournapeau
On Tue, Jul 28, 2009 at 12:12 AM, Dotan Cohen wrote: >> Creating binaries is not the same as creating /fast, efficient/ binaries. >>  Py2Exe bundles it all together, but does not make it any faster. >> > > How inefficient is py2exe. It is neither efficient or inefficient: it is just a distribution

CRLF Newlines and libc

2009-07-27 Thread Eric
I am working on the subprocess.Popen module for Google Summer of Code. Right now, I am having difficulty trying to work out how to deal with my '\n' newlines being converted to '\r\n' newlines when reading from a pipe on windows; see this blog post (http://subdev.blogspot.com/ 2009/07/stdout.html)

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Grant Edwards
On 2009-07-27, Dotan Cohen wrote: >> Creating binaries is not the same as creating /fast, efficient/ binaries. >> ??Py2Exe bundles it all together, but does not make it any faster. > > How inefficient is py2exe. [Assuming that was a question.] py2exe just bundles up the files needed to run the p

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Dotan Cohen
> It is neither efficient or inefficient: it is just a distribution > tool, to deploy python software in a form familiar to most windows > users. It does not make it any faster than running the software under > a python prompt. > > As much as I like python for scientific programming, I would say >

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread David Cournapeau
On Tue, Jul 28, 2009 at 12:28 AM, Dotan Cohen wrote: >> It is neither efficient or inefficient: it is just a distribution >> tool, to deploy python software in a form familiar to most windows >> users. It does not make it any faster than running the software under >> a python prompt. >> >> As much

Re: exceptions.TypeError an integer is required

2009-07-27 Thread jakecjacobson
On Jul 24, 3:11 pm, Steven D'Aprano wrote: > On Fri, 24 Jul 2009 11:24:58 -0700, jakecjacobson wrote: > > I am trying to do a post to a REST API over HTTPS and requires the > > script to pass a cert to the server.  I am getting "exceptions.TypeError > > an integer is required" error and can't find

bad certificate error

2009-07-27 Thread jakecjacobson
Hi, I am getting the following error when doing a post to REST API, Enter PEM pass phrase: Traceback (most recent call last): File "./ices_catalog_feeder.py", line 193, in ? main(sys.argv[1]) File "./ices_catalog_feeder.py", line 60, in main post2Catalog(catalog_host, catalog_port, ca

Re: quickly looping over a 2D array?

2009-07-27 Thread Martin
On Jul 27, 4:12 pm, Peter Otten <__pete...@web.de> wrote: > Martin wrote: > > The statement works now, but it doesn't give the same results as my > > original logic, strangely!? > > > in my logic: > > > data = np.zeros((numrows, numcols), dtype = np.uint8, order ='C') > > > for i in range(numrows):

Re: [python-win32] subprocess and stdout

2009-07-27 Thread Dave Angel
(This message was top-posted, and sent off-list. So I'm copying it back to the list, with my response at the end) Chris Chapman wrote: Thanks Dave. You know after trying your suggestion on the command prompt it doesn't as a matter of fact. Not sure why I didn't just try that in windows to

Re: quickly looping over a 2D array?

2009-07-27 Thread Robert Kern
On 2009-07-27 06:24, Martin wrote: Hi, I am new to python and I was wondering if there was a way to speed up the way I index 2D arrays when I need to check two arrays simultaneously? My current implementations is (using numpy) something like the following... for i in range(numrows): for j

New implementation of re module

2009-07-27 Thread MRAB
Hi all, I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. I'm interested in how fast it is ge

Using easy_install, reduncant?

2009-07-27 Thread ray
I am working on a Trac installation. I am new to Python. To install packages, it is suggested to use setuptools. I have not understood the directions. I execute ez_install.py. Then I attempt to execute easy_install.py setuptools-0.6c9-py2.6.egg. There response that setuptools is already the ac

Re: Using easy_install, reduncant?

2009-07-27 Thread John Nagle
ray wrote: I am working on a Trac installation. I am new to Python. To install packages, it is suggested to use setuptools. I have not understood the directions. I execute ez_install.py. Then I attempt to execute easy_install.py setuptools-0.6c9-py2.6.egg. There response that setuptools is a

Re: Using easy_install, reduncant?

2009-07-27 Thread Diez B. Roggisch
John Nagle wrote: > ray wrote: >> I am working on a Trac installation. I am new to Python. To install >> packages, it is suggested to use setuptools. I have not understood >> the directions. >> >> I execute ez_install.py. >> >> Then I attempt to execute easy_install.py setuptools-0.6c9-py2.6.

M2Crypto hangs on this URL

2009-07-27 Thread John Nagle
There's something strange about this URL: "https://sagar310.pontins.com/sraep/"; It hangs Firefox 2; there's no short timeout, the web page just gets stuck in initial load for about ten minutes. Then "The connection to sagar310.pontins.com was interrupted while the page was loading." It hangs

ioctl on socket

2009-07-27 Thread jacopo mondi
Is there a reason why there is no ioctl interface for socket either then for windows platform? It's technical issues or what else?? thank in advance jacopo -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert raw binary file to ascii

2009-07-27 Thread r2
On Jul 27, 9:06 am, Peter Otten <__pete...@web.de> wrote: > r2 wrote: > > I have a memory dump from a machine I am trying to analyze. I can view > > the file in a hex editor to see text strings in the binary code. I > > don't see a way to save these ascii representations of the binary, so > > I wen

Re: Convert raw binary file to ascii

2009-07-27 Thread r2
On Jul 27, 10:11 am, Grant Edwards wrote: > On 2009-07-27, r2 wrote: > > > I have a memory dump from a machine I am trying to analyze. I can view > > the file in a hex editor to see text strings in the binary code. I > > don't see a way to save these ascii representations of the binary, > > $ str

initializing with empty list as default causes freaky problems

2009-07-27 Thread Reckoner
Hi, Observe the following: In [202]: class Foo(): .: def __init__(self,h=[]): .: self.h=h .: .: In [203]: f=Foo() In [204]: g=Foo() In [205]: g.h Out[205]: [] In [206]: f.h Out[206]: [] In [207]: f.h.append(10) In [208]: f.h Out[208]: [10] In [209]:

Re: initializing with empty list as default causes freaky problems

2009-07-27 Thread MRAB
Reckoner wrote: Hi, X-Antispam: NO; Spamcatcher 5.2.1. Score 50 Observe the following: In [202]: class Foo(): .: def __init__(self,h=[]): .: self.h=h .: .: In [203]: f=Foo() In [204]: g=Foo() In [205]: g.h Out[205]: [] In [206]: f.h Out[206]: [] In [

Re: Convert raw binary file to ascii

2009-07-27 Thread Peter Otten
r2 wrote: > On Jul 27, 9:06 am, Peter Otten <__pete...@web.de> wrote: >> r2 wrote: >> > I have a memory dump from a machine I am trying to analyze. I can view >> > the file in a hex editor to see text strings in the binary code. I >> > don't see a way to save these ascii representations of the bin

Re: M2Crypto hangs on this URL

2009-07-27 Thread John Nagle
John Nagle wrote: There's something strange about this URL: "https://sagar310.pontins.com/sraep/"; It hangs Firefox 2; there's no short timeout, the web page just gets stuck in initial load for about ten minutes. Then "The connection to sagar310.pontins.com was interrupted while the page was

Re: CRLF Newlines and libc

2009-07-27 Thread Gabriel Genellina
En Mon, 27 Jul 2009 12:21:29 -0300, Eric escribió: I am working on the subprocess.Popen module for Google Summer of Code. Right now, I am having difficulty trying to work out how to deal with my '\n' newlines being converted to '\r\n' newlines when reading from a pipe on windows; see this blog

Re: bad certificate error

2009-07-27 Thread Gabriel Genellina
En Mon, 27 Jul 2009 12:57:40 -0300, jakecjacobson escribió: I was wondering if this is due to the server having a invalid server cert? If I go to this server in my browser, I get a "This server tried to identify itself with invalid information". Is there a way to ignore this issue with Pyth

where do I put resources (images, audio files) when I wrote Python program?

2009-07-27 Thread Piotrek
Hello, I write a Python program. It will contain some images (in .png format), some audio files (as .ogg) etc. Now I think where should my installer put these files and how should I access them. What is the normal Python way of doing that? I think about puting these files in /usr/share/myprogram a

Re: bad certificate error

2009-07-27 Thread jakecjacobson
On Jul 27, 2:23 pm, "Gabriel Genellina" wrote: > En Mon, 27 Jul 2009 12:57:40 -0300, jakecjacobson   > escribió: > > > I was wondering if this is due to the server having a invalid server > > cert?  If I go to this server in my browser, I get a "This server > > tried to identify itself with inval

  1   2   >