Re: Immutable and Mutable Types

2008-03-16 Thread Dan Bishop
Bernard Lim wrote: > Hi, > > I'm reading the Python Reference Manual in order to gain a better > understanding > of Python under the hood. > > On the last paragraph of 3.1, there is a statement on immutable and mutable > types as such: > > > Depending on implementation, for immutable types, opera

writing to a binary file without intervening spaces

2008-03-16 Thread Larry
Dear all, I need to write integer values to a binary file that will be read by another application, specifically ENVI. I want to write these values without intervening spaces between values. For example: My data is a = [23, 45, 56, 255]. My desire output is: 234556255, of course in binary file rep

Re: Pycon disappointment

2008-03-16 Thread Kay Schluehr
On 16 Mrz., 21:52, Bruce Eckel <[EMAIL PROTECTED]> wrote: > On Mar 16, 2:48 pm, Pete Forde <[EMAIL PROTECTED]> wrote: > > > My friends and I decided to stage a grassroots Ruby conference this > > summer; it will have no paid sponsors for exactly this reason. We're > > trying to change up the typica

Immutable and Mutable Types

2008-03-16 Thread Bernard Lim
Hi, I'm reading the Python Reference Manual in order to gain a better understanding of Python under the hood. On the last paragraph of 3.1, there is a statement on immutable and mutable types as such: Depending on implementation, for immutable types, operations that compute new values may or

String To List

2008-03-16 Thread Girish
I have a string a = "['xyz', 'abc']".. I would like to convert it to a list with elements 'xyz' and 'abc'. Is there any simple solution for this?? Thanks for the help... -- http://mail.python.org/mailman/listinfo/python-list

Re: About reading Python code

2008-03-16 Thread Stargaming
On Sun, 16 Mar 2008 20:54:01 -0700, WaterWalk wrote: > Hello. I wonder what's the effective way of figuring out how a piece of > python code works. If your Python code is well-written, it should be easy figuring out what it means by just reading it. For more complex programs, of course, this me

Re: Pycon disappointment

2008-03-16 Thread Stephan Deibel
On Mar 16, 6:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: > But it gets worse. The lightning talks, traditionally the best, newest > and edgiest part of the conference, were also sold like commercial air > time. Vendors were guaranteed first pick on lightning talk slots, and > we in the audience,

Re: Py2exe and Multi Treading problem.

2008-03-16 Thread Farsheed Ashouri
On Mar 12, 10:35 pm, Thin Myrna <[EMAIL PROTECTED]> wrote: > Farsheed Ashouri wrote: > > NO it dont work. If I remove threading part, it works like a charm. > > Any Idea? > > Of course it does then. Try to join the thread or do something else to > prevent the non-threading part to exit prematurely.

Re: Python and 3D

2008-03-16 Thread Kevin MacPhail
On Sat, Mar 15, 2008 at 2:09 PM, Eric von Horst <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking for Python modules that allow you to manipulate 3D > objects, more specifically Alias Wavefront .OBJ objects. > Also, a module that would allow you to vizualize these models and > rotate them etc.. >

finding euclidean distance,better code?

2008-03-16 Thread [EMAIL PROTECTED]
hello while trying to write a function that processes some numpy arrays and calculate euclidean distance ,i ended up with this code (though i used numpy ,i believe my problem has more to do with python coding style..so am posting it here) ... # i am using these numpy.ndarrays to do the calculation

Re: About reading Python code

2008-03-16 Thread WaterWalk
On Mar 17, 11:54 am, WaterWalk <[EMAIL PROTECTED]> wrote: > Hello. I wonder what's the effective way of figuring out how a piece > of python code works. With C I often find it very useful to be able to > run the code in step mode and set breakpoints in a debugger so I can > watch how the it execute

About reading Python code

2008-03-16 Thread WaterWalk
Hello. I wonder what's the effective way of figuring out how a piece of python code works. With C I often find it very useful to be able to run the code in step mode and set breakpoints in a debugger so I can watch how the it executes, how the data change and how the code jumps from one function to

Re: File system in TreeWidget

2008-03-16 Thread Yusniel
On Mar 16, 11:39 pm, Yusniel <[EMAIL PROTECTED]> wrote: > Hi friends. How can I do a Tree Widget with all directories and files > given path parameter or a tree generated with the function > os.walk(). Sorry for my bad english. Sorry. I am using PyQt4. -- http://mail.python.org/mailman/listinfo

File system in TreeWidget

2008-03-16 Thread Yusniel
Hi friends. How can I do a Tree Widget with all directories and files given path parameter or a tree generated with the function os.walk(). Sorry for my bad english. -- http://mail.python.org/mailman/listinfo/python-list

Re: Code to send RSS news by Sendmail

2008-03-16 Thread member thudfoo
On 3/15/08, Ulysse <[EMAIL PROTECTED]> wrote: > Hello, > > I'm searching a code which allow you to parse each item in the RSS > feed, get the news page of each item, convert it to text and send it > by mail. > > Do you know if it exists ? > > Thanks > > -- > http://mail.python.org/mailman/lis

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Carl Banks
On Mar 16, 10:49 pm, Brian Jones <[EMAIL PROTECTED]> wrote: > On Mar 16, 8:09 pm, [EMAIL PROTECTED] (Aahz) wrote: > > > If you did not like the programming this year (aside from the sponsor > > talks) and you did not participate in organizing PyCon or in delivering > > presentations, it is YOUR FA

pass float array(list) parameter to C

2008-03-16 Thread zaley
In my program, python is communicated with C use ctypes . I can't find a better way to pass float array(list) parameter to C function. Can someone give me a help? -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Brian Jones
On Mar 16, 8:09 pm, [EMAIL PROTECTED] (Aahz) wrote: > If you did not like the programming this year (aside from the sponsor > talks) and you did not participate in organizing PyCon or in delivering > presentations, it is YOUR FAULT. PERIOD. EXCLAMATION POINT! I find this insulting, inexcusable,

Re: replace string in a file

2008-03-16 Thread sturlamolden
On 15 Mar, 21:54, Unknown <[EMAIL PROTECTED]> wrote: > I was expecting to replace the old value (serial) with the new one > (todayVal). Instead, this code *adds* another line below the one found... > > How can I just replace it? A file is a stream of bytes, not a list of lines. You can't just rep

psyco class question

2008-03-16 Thread Magdoll
I can't find a psyco mailing list that I can directly ask to (so point me to it if there is one), so I'm posting it here. I know very little about how types and classes work in python and this is probably why I'm having trouble. I wrote a class inheriting pysco.classes, and the class structure is

Re: replace string in a file

2008-03-16 Thread Unknown
Le Sat, 15 Mar 2008 16:55:45 -0700, joep a écrit : > you can also use standard module fileinput.input with ''inplace'' option > which backs up original file automatically. > > from python help for fileinput: > > Optional in-place filtering: if the keyword argument inplace=1 is passed > to input(

Re: Using threads in python is safe ?

2008-03-16 Thread Benjamin
On Mar 16, 3:40 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 15 Mar 2008 11:57:44 -0200, Deepak Rokade <[EMAIL PROTECTED]> > escribi�: > > > I want to use therads in my application. Going through the docs , I read > > about GIL. > > Now I am confused whether using threads in python

Re: Convert int to float

2008-03-16 Thread Bryan Olson
sturlamolden wrote: > Guido van Brakel wrote: > >>> def gem(a): >>> g = sum(a) / len(a) >>> return g > >> It now gives a int, but i would like to see floats. How can integrate >> that into the function? > > You get an int because you are doing integer division. Cast one int to > float. >

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread BJörn Lindqvist
On Mon, Mar 17, 2008 at 12:32 AM, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 17 Mar, 01:09, [EMAIL PROTECTED] (Aahz) wrote: > > > > PyCon is what YOU make of it. If you want to change PyCon, propose a > > presentation or join the conference committee (concom) -- the latter only > > requires s

Re: os.path.isdir question

2008-03-16 Thread Benjamin
On Mar 16, 2:27 pm, MRAB <[EMAIL PROTECTED]> wrote: > On Mar 16, 2:27 am, Benjamin <[EMAIL PROTECTED]> wrote: > > > On Mar 15, 8:12 pm, lampshade <[EMAIL PROTECTED]> wrote:> Hello, > > > > I'm having some problems with os.path.isdir I think it is something > > > simple that I'm overlooking. > > >

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Aahz
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Aahz) writes: >> >> I would like to encourage anyone who was at PyCon but has not >> provided formal feedback to use the following URLs: > >For those who don't like to follow opaque munged URLs from services

Re: Converting a string to the most probable type

2008-03-16 Thread castironpi
> > > The trick in the case of when you do not want to guess, or the choices > > > grow too much, is to ask the user to tell you in what format they want > > > it and format according to their wishes. > > > > Neatly avoids too much guessing and isn't much extra to add. > > > The plot is about under

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Ben Finney
[EMAIL PROTECTED] (Aahz) writes: > I would like to encourage anyone who was at PyCon but has not > provided formal feedback to use the following URLs: For those who don't like to follow opaque munged URLs from services that give no indication where you'll end up, here are the actual URLs you'll a

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Paul Boddie
On 17 Mar, 01:09, [EMAIL PROTECTED] (Aahz) wrote: > > PyCon is what YOU make of it. If you want to change PyCon, propose a > presentation or join the conference committee (concom) -- the latter only > requires signing up for the pycon-organizers mailing list. > > This doesn't mean that we are unin

stdout custom

2008-03-16 Thread castironpi
The code should have extra colons. >>> class ThreadedOut: ... def __init__( self, old ): ... self._old= old ... def write( self, s ): ... self._old.write( ':' ) ... return self._old.write( s ) ... def flush( self ): ... self._old.flush()

Re: Pycon disappointment

2008-03-16 Thread Michael Wieher
well, like, at least he left a free copy of his book on the web, that was kinda decent. 2008/3/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > On Mar 16, 2:43 pm, Robert Hicks <[EMAIL PROTECTED]> wrote: > > On Mar 16, 12:38 pm, [EMAIL PROTECTED] wrote: > > > > > On Mar 16, 6:10 am, Bruce Eckel <[EM

PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-16 Thread Aahz
[warning: rant ahead] [[ Before starting my rant, I would like to encourage anyone who was at PyCon but has not provided formal feedback to use the following URLs: For the conference: http://tinyurl.com/2ara8u For the tutorials: http://tinyurl.com/2ew2pc ]] In article <[EMAIL PROTECTED]>, fuman

Re: Pycon disappointment

2008-03-16 Thread lbonafide
On Mar 16, 2:43 pm, Robert Hicks <[EMAIL PROTECTED]> wrote: > On Mar 16, 12:38 pm, [EMAIL PROTECTED] wrote: > > > On Mar 16, 6:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: > > > > I think a lot of people have been caught up in the idea that we need > > > to commercialize Python, and ride some kind

Re: Socket Performance

2008-03-16 Thread castironpi
On Mar 16, 1:29 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 15 Mar 2008 20:08:05 -0200, <[EMAIL PROTECTED]> escribi�: > > > > > > > On Mar 15, 8:18 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >> > Newbie question:  Can you write to the 'file-like obje

Re: Advantage of the array module over lists?

2008-03-16 Thread Diez B. Roggisch
sturlamolden schrieb: > On 13 Mar, 20:40, Tobiah <[EMAIL PROTECTED]> wrote: >> I checked out the array module today. It claims that >> arrays are 'efficient'. I figured that this must mean >> that they are faster than lists, but this doesn't seem >> to be the case: >> >> one.py #

Re: Basics of Python,learning

2008-03-16 Thread Gabriel Genellina
En Sun, 16 Mar 2008 14:25:26 -0200, Guido van Brakel <[EMAIL PROTECTED]> escribi�: > Why is this not working,and how can I correct it? I guess you want to: a) read a single line containing many numbers separated by white space b) convert them to a list of floating point numbers c) print their m

Re: BitVector read-from-file Question

2008-03-16 Thread Gabriel Genellina
En Mon, 10 Mar 2008 14:06:07 -0200, Michael Wieher <[EMAIL PROTECTED]> escribi�: > I'm trying to read in data from large binary files using BitVector > (thanks > btw, for whoever mentioned it on the list, its nice) > > I'll be reading the data in as requested by the user, in (relatively) > s

RE: Python for BlackBerry

2008-03-16 Thread Sandipan Gangopadhyay
I checked; BlackBerry is not on Symbian. They provide a Java Dev Envt (whatever that may mean). Does that mean, we can try and implement JPython/Jython on it? Thanks. Sandipan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Driscoll Sent: Sunday, Marc

Re: Pycon disappointment

2008-03-16 Thread Alaric Haag
In article <[EMAIL PROTECTED]>, Bruce Eckel <[EMAIL PROTECTED]> wrote: > If the following seems unnecessarily harsh, it was even more harsh for . As a relative noob to the Python world, (and lurker to the list :) ) I can't speak to differences from previous years. However, my impressions

Re: Types, Cython, program readability

2008-03-16 Thread Jeff Schwab
Ben Finney wrote: > sturlamolden <[EMAIL PROTECTED]> writes: > >> If you don't know how to install a C compiler like Microsoft Visual >> Studio, you should not be programming computers anyway. > > Utter elitist nonsense. > > Programming should be made easier, and I see Python as a very good > la

Re: Types, Cython, program readability

2008-03-16 Thread Ben Finney
sturlamolden <[EMAIL PROTECTED]> writes: > If you don't know how to install a C compiler like Microsoft Visual > Studio, you should not be programming computers anyway. Utter elitist nonsense. Programming should be made easier, and I see Python as a very good language for making programming easi

Re: Weight Problem

2008-03-16 Thread Gabriel Genellina
En Sat, 15 Mar 2008 18:57:36 -0200, Ravi Kumar <[EMAIL PROTECTED]> escribi�: > An Interesting problem, > """ > A man has only 4 bricks of different weights, lies between 1-40KG, > Also, the total weights of Brick A, B, C, D (ie A+B+C+D) is 40KG. > The man uses that brick to calculate every possibl

Re: Pycon disappointment

2008-03-16 Thread Bruce Eckel
On Mar 16, 2:48 pm, Pete Forde <[EMAIL PROTECTED]> wrote: > My friends and I decided to stage a grassroots Ruby conference this > summer; it will have no paid sponsors for exactly this reason. We're > trying to change up the typical format as well: it's a single-track > event, no "keynotes", no sch

Re: Pycon disappointment

2008-03-16 Thread Bill Mill
Tom Moertel organized a Perl conference with an interesting sponsorship policy, that may be worth considering. He posted about it on the reddit thread about this clp thread: http://reddit.com/info/6c9l6/comments/c03gli2 . (Disclaimer: I have no idea if that would work for pycon at all or in part,

Re: Using threads in python is safe ?

2008-03-16 Thread Gabriel Genellina
En Sat, 15 Mar 2008 11:57:44 -0200, Deepak Rokade <[EMAIL PROTECTED]> escribi�: > I want to use therads in my application. Going through the docs , I read > about GIL. > Now I am confused whether using threads in python is safe or not. > > One thing I know that if I am accessing global variables

Re: Pycon disappointment

2008-03-16 Thread Pete Forde
> I know what the argument for the results of Pycon 2008 will be: we > needed the money. My answer: it's not worth it. If this is what you > have to do to grow the conference, then don't. If the choice is > between selling my experience to vendors and reducing the size of the > conference, then cut

Which way to access Scintilla

2008-03-16 Thread Alex
There are several ways to use Scintilla in Python, the ones described at http://scintilla.sourceforge.net/ScintillaRelated.html are: -through wxPython -pyscintilla is the original Python binding for Scintilla's default GTK 1.x class. Includes some additional support, such as nativ

Re: Pycon disappointment

2008-03-16 Thread Robert Hicks
On Mar 16, 12:38 pm, [EMAIL PROTECTED] wrote: > On Mar 16, 6:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: > > > I think a lot of people have been caught up in the idea that we need > > to commercialize Python, and ride some kind of wave of publicity the > > way that Java and C# and Rails seem to h

Re: Creating a file with $SIZE

2008-03-16 Thread Gabriel Genellina
En Wed, 12 Mar 2008 09:37:58 -0200, k.i.n.g. <[EMAIL PROTECTED]> escribi�: > We use dd command in Linux to create a file with of required size. In > similar way, on windows I would like to use python to take the size of > the file( 50MB, 1GB ) as input from user and create a uncompressed > file

Re: os.path.isdir question

2008-03-16 Thread MRAB
On Mar 16, 2:27 am, Benjamin <[EMAIL PROTECTED]> wrote: > On Mar 15, 8:12 pm, lampshade <[EMAIL PROTECTED]> wrote:> Hello, > > > I'm having some problems with os.path.isdir I think it is something > > simple that I'm overlooking. > > > #!/usr/bin/python > > import os > > > my_path = os.path.expan

Re: Advantage of the array module over lists?

2008-03-16 Thread sturlamolden
On 13 Mar, 20:40, Tobiah <[EMAIL PROTECTED]> wrote: > I checked out the array module today. It claims that > arrays are 'efficient'. I figured that this must mean > that they are faster than lists, but this doesn't seem > to be the case: > > one.py ## > import array >

Re: When file-like objects aren't file-like enough for Windows

2008-03-16 Thread Tim Golden
William McBrine wrote: > Now, I have a similar problem with subprocess.Popen... The code that > works in Linux looks like this: > > source = urllib.urlopen(url) > child = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=source) > try: > shutil.copyfileobj(child.stdout, self

Re: Socket Performance

2008-03-16 Thread Gabriel Genellina
En Sat, 15 Mar 2008 20:08:05 -0200, <[EMAIL PROTECTED]> escribi�: > On Mar 15, 8:18 am, Bryan Olson <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > Newbie question:  Can you write to the 'file-like object' a pickle, >> > and receive it intact-- as one string with nothing else? >> >> Ye

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread jasonwiener
Completely helped! Working as expected now. Thanks. You really got me out of a bind! J. On Mar 16, 10:23 am, "Martin Blume" <[EMAIL PROTECTED]> wrote: > "jasonwiener" schrieb > > > I am having a VERY odd problem with unpacking right now. > > I'm reading data from a binary file and then using a

Re: Converting a string to the most probable type

2008-03-16 Thread Lie
On Mar 11, 4:15 am, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 11, 3:19 am, [EMAIL PROTECTED] wrote: > > > The trick in the case of when you do not want to guess, or the choices > > grow too much, is to ask the user to tell you in what format they want > > it and format according to their wish

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread Martin Blume
"sturlamolden" schrieb > > > This seems to imply that the Mac, although running now > > on Intel processors, is still big-endian. > > Or maybe the struct module thinks big-endian is native > to all Macs? It could be a bug. > Dunno, I'm on thin ice here. Never used a Mac. Maybe the underlying

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread Michael Wieher
you can specifify which encoding when you unpack the struct, so just try them till it works, or read the specs on the mac.. i find it quicker to try, there's only 4-5 2008/3/16, sturlamolden <[EMAIL PROTECTED]>: > > On 16 Mar, 18:23, "Martin Blume" <[EMAIL PROTECTED]> wrote: > > > This seems to im

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread sturlamolden
On 16 Mar, 18:23, "Martin Blume" <[EMAIL PROTECTED]> wrote: > This seems to imply that the Mac, although running now on Intel > processors, is still big-endian. Or maybe the struct module thinks big-endian is native to all Macs? It could be a bug. -- http://mail.python.org/mailman/listinfo/p

Re: Basics of Python,learning

2008-03-16 Thread sturlamolden
On 16 Mar, 17:25, Guido van Brakel <[EMAIL PROTECTED]> wrote: > Why is this not working,and how can I correct it? [code skipped] There is no way of correcting that. Delete it and start over. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread Martin Blume
"jasonwiener" schrieb > > I am having a VERY odd problem with unpacking right now. > I'm reading data from a binary file and then using a very > simple struct.unpack to get a long. Works fine on my MacBook, > but when I push it to a Linux box,it acts differently and > ends up pewking. > [...]

Re: Types, Cython, program readability

2008-03-16 Thread sturlamolden
On 16 Mar, 18:10, sturlamolden <[EMAIL PROTECTED]> wrote: > You don't click on compiled Python C extensions. You call it from your > Python code. By the way, disttools will invoke Pyrex and the C compiler, and produce the binary .pyd-file you can access from Python. It's not rocket science (not e

Re: Types, Cython, program readability

2008-03-16 Thread sturlamolden
On 16 Mar, 16:58, [EMAIL PROTECTED] wrote: > I think lot of Win users (computational biologists?), even people that > know how to write good Python code, don't even know how to install a C > compiler. If you don't know how to install a C compiler like Microsoft Visual Studio, you should not be pr

Re: Strange problem with structs Linux vs. Mac

2008-03-16 Thread Michael Wieher
try twiddling the unpack prefix, they're probably stored in different binary formats on the disk... on the struct helppage, is a list of prefixes, can be like unpack('=HI',data) unpack('@HI',data) etc... find out which one works on each machine 2008/3/16, jasonwiener <[EMAIL PROTECTED]>: > > H

Strange problem with structs Linux vs. Mac

2008-03-16 Thread jasonwiener
Hi- I am having a VERY odd problem with unpacking right now. I'm reading data from a binary file and then using a very simple struct.unpack to get a long. Works fine on my MacBook, but when I push it to a Linux box,it acts differently and ends up pewking. here's the code snippet:

Re: Spaces in path name

2008-03-16 Thread joep
One more try (using popen instead of call is not necessary for these cases, but I want to see the behavior of popen): shell=True and executable and at least one argument with spaces does not work: -

Re: Spaces in path name

2008-03-16 Thread Tim Golden
Tim Golden wrote: > Well I've got a patch ready to go (which basically just > wraps a shell=True command line with an *extra* pair of > double-quotes, the same as you do for an os.system call). > I'll try to put some time into the subprocess docs as well, > at least as far as a Win32-how-do-I on my

Re: Basics of Python,learning

2008-03-16 Thread D'Arcy J.M. Cain
On Sun, 16 Mar 2008 17:25:26 +0100 Guido van Brakel <[EMAIL PROTECTED]> wrote: > Hello > > Why is this not working,and how can I correct it? What are you expecting it to do? For one thing, you are acting on a variable 'a' but it is never defined. The only objects that you have is z, y, b and th

Re: Pycon disappointment

2008-03-16 Thread lbonafide
On Mar 16, 6:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: > I think a lot of people have been caught up in the idea that we need > to commercialize Python, and ride some kind of wave of publicity the > way that Java and C# and Rails seem to have done. This coming from someone who caught the Java

Re: Basics of Python,learning

2008-03-16 Thread Mensanator
On Mar 16, 11:25 am, Guido van Brakel <[EMAIL PROTECTED]> wrote: > Hello > > Why is this not working, Why is _what_ not working? > and how can I correct it? Start over. > > > > > > > #!/usr/bin/env python > > #coding=utf-8 > > > z = raw_input ('Give numbers') > > y = z.split() > > b=[] > > > fo

When file-like objects aren't file-like enough for Windows

2008-03-16 Thread William McBrine
This is proving to be a recurring problem for me. First, I used the save() method of a Python Imaging Library "Image" object to write directly to the "wfile" of a BaseHTTPRequestHandler- derived class: pic.save(self.wfile, 'JPEG') Worked great in Linux, barfed in Windows. I had to do this

Basics of Python,learning

2008-03-16 Thread Guido van Brakel
Hello Why is this not working,and how can I correct it? > #!/usr/bin/env python > #coding=utf-8 > > z = raw_input ('Give numbers') > y = z.split() > b=[] > > for i in y: > b.append(float(i)) > > def b(min,max,gem) > x=min(a) > x=gem(a) > x=max(a) > return a > > print

Re: Spaces in path name

2008-03-16 Thread Tim Golden
joep wrote: > > Tim Golden wrote: >> Tim Golden wrote: >>> What I haven't investigated yet is whether the additional flags >>> your example is passing (shell=True etc.) cause the main Popen >>> mechanism to take a different path. >> Sure enough, passing shell=True -- which is probably quite >> a r

Re: Pycon disappointment

2008-03-16 Thread fumanchu
On Mar 16, 7:18 am, [EMAIL PROTECTED] (Aahz) wrote: > Bruce Eckel <[EMAIL PROTECTED]> wrote: > > If the following seems unnecessarily harsh, it was even more harsh for > > me to discover that the time and money I had spent to get to my > > favorite conference had been sold to vendors, presenting m

Re: Types, Cython, program readability

2008-03-16 Thread bearophileHUGS
Tim Golden: > I'm not entirely sure why you think Pyrex should "contain a compiler". I think lot of Win users (computational biologists?), even people that know how to write good Python code, don't even know how to install a C compiler. >I'm fairly sure it's fine with MingW< (In the past?) I th

Re: Pycon disappointment

2008-03-16 Thread Jacob Kaplan-Moss
On Mar 16, 6:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: > But it gets worse. The lightning talks, traditionally the best, newest > and edgiest part of the conference, were also sold like commercial air > time. Thanks for being harsh here, Bruce. I've been responsible for organizing the lightnin

Re: Pycon disappointment

2008-03-16 Thread Jacob Kaplan-Moss
On Mar 16, 9:59 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > This isn't new though. Last year (my only other PyCon) all the > sponsors gave lightning talks. The difference is that there were more > sponsors this year I guess... The difference (from my POV as the guy who helped plan and run the lightn

Re: Types, Cython, program readability

2008-03-16 Thread Stefan Behnel
sturlamolden wrote: > On 16 Mar, 15:32, [EMAIL PROTECTED] wrote: >> It seems the development of Cython is going very well, quite >> differently from the dead-looking Pyrex. Hopefully Cython will become >> more user-friendly too (Pyrex is far from being user-friendly for >> Windows users, it doesn't

Re: Spaces in path name

2008-03-16 Thread joep
Tim Golden wrote: > Tim Golden wrote: > > What I haven't investigated yet is whether the additional flags > > your example is passing (shell=True etc.) cause the main Popen > > mechanism to take a different path. > > Sure enough, passing shell=True -- which is probably quite > a rare requirement

Re: Cannot build Python 2.4 SRPM on x64 platform

2008-03-16 Thread Eric B.
"Michael Wieher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sorry I don't have much of a better idea, but if I had this kind of > problem > with an RPM, I'd just grab the tarball and start hacking away at > ./configure > pre-requirements, trying to use --options to trim it dow

Re: Weight Problem

2008-03-16 Thread Gary Herron
Ravi Kumar wrote: > An Interesting problem, > """ > A man has only 4 bricks of different weights, lies between 1-40KG, > Also, the total weights of Brick A, B, C, D (ie A+B+C+D) is 40KG. > The man uses that brick to calculate every possible weight > from 1 KG to 40 KG in his shop. (only whole numb

Re: Pycon disappointment

2008-03-16 Thread Barry Hawkins
On Mar 16, 9:18 am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Bruce Eckel  <[EMAIL PROTECTED]> wrote: > > >If the following seems unnecessarily harsh, it was even more harsh for > >me to discover that the time and money I had spent to get to my > >favorite conference had b

Re: Types, Cython, program readability

2008-03-16 Thread sturlamolden
On 16 Mar, 15:32, [EMAIL PROTECTED] wrote: > It seems the development of Cython is going very well, quite > differently from the dead-looking Pyrex. Hopefully Cython will become > more user-friendly too (Pyrex is far from being user-friendly for > Windows users, it doesn't even contain a compiler,

Re: Pycon disappointment

2008-03-16 Thread Fuzzyman
> "It is easier to optimize correct code than to correct optimized code." > --Bill Harlan That's a great quote that I had not heard before. :-) Michael Foord http://www.manning.com/foord -- http://mail.python.org/mailman/listinfo/python-list

Re: Pycon disappointment

2008-03-16 Thread Fuzzyman
On Mar 16, 11:10 am, Bruce Eckel <[EMAIL PROTECTED]> wrote: [snip..] > But it gets worse. The lightning talks, traditionally the best, newest > and edgiest part of the conference, were also sold like commercial air > time. Vendors were guaranteed first pick on lightning talk slots, and > we in the

Re: Types, Cython, program readability

2008-03-16 Thread Stefan Behnel
Hi, [EMAIL PROTECTED] wrote: > It seems Cython is going to become an efficient and > general purpose language after all, with optional static typing (its > purpose: mostly for speed), and it may even gain some kind of macros > soon. So it may even end replacing Python itself in some situations > w

Re: Spaces in path name

2008-03-16 Thread Tim Golden
Tim Golden wrote: > What I haven't investigated yet is whether the additional flags > your example is passing (shell=True etc.) cause the main Popen > mechanism to take a different path. Sure enough, passing shell=True -- which is probably quite a rare requirement -- causes the code to change the

Re: Types, Cython, program readability

2008-03-16 Thread Tim Golden
[EMAIL PROTECTED] wrote: > It seems the development of Cython is going very well, quite > differently from the dead-looking Pyrex. I'll leave others to comment on how dead Pyrex is or isn't ... > Hopefully Cython will become > more user-friendly too (Pyrex is far from being user-friendly for > W

Re: Python and 3D

2008-03-16 Thread dave_mikesell
On Mar 15, 3:09 pm, Eric von Horst <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking for Python modules that allow you to manipulate 3D > objects, more specifically Alias Wavefront .OBJ objects. > Also, a module that would allow you to vizualize these models and > rotate them etc.. > > The goal is

Re: Pycon disappointment

2008-03-16 Thread Michael Wieher
2008/3/16, Aaron <[EMAIL PROTECTED]>: > > > > In my opinion, open spaces should have had greater status and billing, > > with eyes-forward talks and vendor sessions offered only as possible > > alternatives. Especially, vendor sessions should not be presented as > > "keynotes" during plenary sessi

Re: Python and 3D

2008-03-16 Thread Python
On 15 mrt 2008, at 23:06, Mike Driscoll wrote: > On Mar 15, 3:09 pm, Eric von Horst <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am looking for Python modules that allow you to manipulate 3D >> objects, more specifically Alias Wavefront .OBJ objects. >> Also, a module that would allow you to vizuali

Types, Cython, program readability

2008-03-16 Thread bearophileHUGS
It seems the development of Cython is going very well, quite differently from the dead-looking Pyrex. Hopefully Cython will become more user-friendly too (Pyrex is far from being user-friendly for Windows users, it doesn't even contain a compiler, I think. The ShedSkin Windows installer contains an

Re: Pycon disappointment

2008-03-16 Thread Aaron
> In my opinion, open spaces should have had greater status and billing, > with eyes-forward talks and vendor sessions offered only as possible > alternatives. Especially, vendor sessions should not be presented as > "keynotes" during plenary sessions. I think it took a little while > for people

Re: Spaces in path name

2008-03-16 Thread Tim Golden
joep wrote: > I assume that there is some difference how subprocess.call and > subprocess.Popen handle and format the command. subprocess.Popen does > the correct formatting when only one file path has spaces and requires > double quoting, but not if there are two file paths with spaces in it. The

Re: Advantage of the array module over lists?

2008-03-16 Thread bearophileHUGS
Their efficiency is mostly regarding the space. I think they aren't much speed-efficient because they require many conversions from-to Python types. You can gain speed efficiency too (sometimes a LOT), in some situations, using array with Psyco. Another advantage of arrays (better called "vector"s,

Re: Pycon disappointment

2008-03-16 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruce Eckel <[EMAIL PROTECTED]> wrote: > >If the following seems unnecessarily harsh, it was even more harsh for >me to discover that the time and money I had spent to get to my >favorite conference had been sold to vendors, presenting me as a >captive audience they

Re: Advantage of the array module over lists?

2008-03-16 Thread Michael Wieher
I believe the array module provides more functionality than lists. Perhaps this extra functionality comes with... overhead? C'est possible. For example, you can declare an array to contain all items of a type, ie: >>array.array('f')#array of floats So, they might be efficient, in that they'r

Re: Spaces in path name

2008-03-16 Thread Tim Golden
joep wrote: > > Tim Golden wrote: > >> subprocess.call ([ >> >>r"C:\Program Files\Adobe\Acrobat 5.0\Reader\acro reader.exe", >> >> r"C:\Program Files\Adobe\Acr >> obat 5.0\Reader\plug_ins.donotuse\Annotations\Stamps\abc def.pdf" >> >> ]) >> >> Can you confirm that something equivalent *doesn'

Re: Cannot build Python 2.4 SRPM on x64 platform

2008-03-16 Thread Michael Wieher
Sorry I don't have much of a better idea, but if I had this kind of problem with an RPM, I'd just grab the tarball and start hacking away at ./configure pre-requirements, trying to use --options to trim it down to the bare minimal and see if I can get it to load up. 2008/3/16, Eric B. <[EMAIL PROT

Re: Why doesn't xmlrpclib.dumps just dump an empty value instead of ?

2008-03-16 Thread Michael Wieher
2008/3/16, martin f krafft <[EMAIL PROTECTED]>: > > Hi, > > xmlrpclib.dumps((None,), allow_none=True) yields > > '\n\n\n\n' > > Why doesn't it just yield > > '\n\n\n\n' > > Or even just > > '\n\n\n' > > Those are valid XML and valid XML-RPC, but isn't. > > Thanks for any thoughts... > > > --

Cannot build Python 2.4 SRPM on x64 platform

2008-03-16 Thread Eric B.
Hi, For those on several python lists, I appologize in advance for cross-posting, but I'm really not sure which list is best to ask for assistance with this. Currently, I am trying to build the python2.4 SRPM from Python.org on a RHEL4 x64 platform, but the build is failing with a very non-descri

  1   2   >