[off-topic] Usenet

2008-05-13 Thread hdante
Hello, How can I access Usenet without using Google Groups ? (my ISP doesn't have a NNTP server). Do you recommend doing so ? What's your prefered news reader ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Flaming Thunder

2008-05-13 Thread hdante
dnesses are already getting fixed.  The difference: I > can't afford to ignore users. > > But the future is one of the hardest things to predict, so we'll see. > > On May 13, 8:34 am, hdante <[EMAIL PROTECTED]> wrote: > > > On May 13, 10:58 am, Paul McGuire <[

Re: Python and Flaming Thunder

2008-05-13 Thread hdante
On May 13, 10:58 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 13, 8:32 am, Dave Parker <[EMAIL PROTECTED]> wrote: > > > > Don't let yourself be irritated by castironpi > > > I'm not the sort to get irritated by anyone.  There is value in all > > interaction. > > Not this interaction, I'm af

Re: IDLE 3.0a5 has problems with Unicode

2008-05-11 Thread hdante
On May 11, 7:27 pm, Sven Siegmund <[EMAIL PROTECTED]> wrote: > #!/usr/bin/python Notice that this line is probably not what you want, unless you overwrote the default python 2 installation. The line should be: #!/usr/bin/env python3.0 (this is irrelevant to the bug, however) > IDLE complains

Re: Now what!?

2008-05-10 Thread hdante
On May 10, 8:22 pm, notbob <[EMAIL PROTECTED]> wrote: > On 2008-05-10, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > >    So... in short, you'd need to have been reading a tutorial specific > > to "shell" scripting... > > I have been.  I'm also trying to learn bash shell scripting, not to mentio

Re: Newbie to python --- why should i learn !

2008-05-09 Thread hdante
On May 8, 7:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? All the languages have similar "power", in a theoretical sense. If you can solve

Re: "prove"

2008-05-08 Thread hdante
On May 8, 10:50 am, "Lucas Prado Melo" <[EMAIL PROTECTED]> wrote: > Hello, > How could I "prove" to someone that python accepts this syntax using > the documentation (I couldn't find it anywhere): > classname.functionname(objectname) It's in the language reference, section 3.2 "The standard type

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-06 Thread hdante
On May 5, 3:26 pm, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > "Zed A. Shaw" <[EMAIL PROTECTED]> writes: > > > GPLv3? > > > How do people feel about Vellum's GPLv3 status?  It actually doesn't > > impact anyone unless you embed Vellum into a project/product or you > > Yeah, but it effectively prev

Re: generator functions in another language

2008-05-06 Thread hdante
On May 6, 12:28 am, [EMAIL PROTECTED] wrote: > > There's a process decorator to functions in a module. > > [supposes] > > @process > def datafile( processdict ): >    processdict.modify( ) >    op= yield >    op.call( ) in processdict >    # op.call( ) in namespace > > More simply: > > @process > d

Re: Am I missing something with Python not having interfaces?

2008-05-06 Thread hdante
On May 6, 12:09 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > On May 6, 10:26 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > > > > On 2008-05-06, jmDesktop <[EMAIL PROTECTED]> wrote: > > > > Studying OOP and noticed that Python does not have Interfaces.  Is > > > that correct?  Is my schooling for n

Re: Are rank noobs tolerated, here?

2008-05-06 Thread hdante
ackages', '/ usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/ Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/ site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/usr/ lib/python2.5/site-pa

Re: Am I missing something with Python not having interfaces?

2008-05-06 Thread hdante
On May 6, 10:44 am, jmDesktop <[EMAIL PROTECTED]> wrote: > Studying OOP and noticed that Python does not have Interfaces.  Is > that correct?  Is my schooling for nought on these OOP concepts if I > use Python.  Am I losing something if I don't use the "typical" oop > constructs found in other lang

Re: generator functions in another language

2008-05-04 Thread hdante
On May 4, 8:11 am, [EMAIL PROTECTED] wrote: > On May 4, 12:21 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > En Sun, 04 May 2008 01:08:34 -0300, Marc 'BlackJack' Rintsch <[EMAIL > > PROTECTED]> escribió: > > > > On Sat, 03 May 2008 16:39:43 -0700, castironpi wrote: > > > >> I'm act

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-04 Thread hdante
On May 3, 7:05 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On May 3, 10:13 pm, hdante <[EMAIL PROTECTED]> wrote: > > >  I believe that moving this to third party could be better. What about > > numpy ? Doesn't it already have something similar ? > > Y

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-03 Thread hdante
On May 3, 3:44 pm, Szabolcs Horvát <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: > > > sum() works for any sequence of objects with an __add__ method, not > > just floats!  Your algorithm is specific to floats. > > This occurred to me also, but then I tried > > sum(['abc', 'efg'], '') > > an

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-27 Thread hdante
On Apr 27, 4:54 pm, n00m <[EMAIL PROTECTED]> wrote: > Another PC, another OS (Linux) and another compiler C++ (g++ 4.0.0-8) > > Compare 2 my latest submissions:http://www.spoj.pl/status/SBANK,zzz/ > > times: 1.32s and 0.60s > > Submitted codes: > > import sys > z=sys.stdin.readlines() > print z[5]

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-26 Thread hdante
On Apr 26, 8:28 pm, n00m <[EMAIL PROTECTED]> wrote: > No so simple, guys. > E.g., I can't solve (in Python) this:http://www.spoj.pl/problems/INTEST/ > Keep getting TLE (time limit exceeded). Any ideas? After all, it's > weekend. > > 450. Enormous Input Test > Problem code: INTEST > > The purpose of

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-26 Thread hdante
On Apr 26, 5:54 pm, n00m <[EMAIL PROTECTED]> wrote: > hdante: > > I run your code quite a few times. > Its time = 0.734s. > Of mine = 0.703-0.718s. > > PS All I have is an ancient Mingw compiler (~1.9.5v) in Dev-C++. Okay, now I believe in you. :-P The next step would

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-26 Thread hdante
On Apr 26, 1:15 pm, n00m <[EMAIL PROTECTED]> wrote: > fgets() from C++ iostream library??? > fgets is part of the standard C++ library and it lives in the std namespace. > I guess if I'd came up with "Python reads SLOWER than C" > I'd get another (not less) smart explanation "why it's so". -- ht

Re: Python(2.5) reads an input file FASTER than pure C(Mingw)

2008-04-26 Thread hdante
On Apr 26, 12:10 pm, n00m <[EMAIL PROTECTED]> wrote: > Both codes below read the same huge(~35MB) text file. > In the file > 100 lines, the length of each line < 99 chars. > > Stable result: > Python runs ~0.65s > C : ~0.70s > > Any thoughts? > > import time > t=time.time() > f=open('D:\\some.t

Re: problem with mmap

2008-04-25 Thread hdante
On Apr 25, 4:43 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Apr 25, 9:37 am, Neal Becker <[EMAIL PROTECTED]> wrote: > > > On linux, I don't understand why: > > > f = open ('/dev/eos', 'rw') > > m = mmap.mmap(f.fileno(), 100, prot=mmap.PROT_READ|mmap.PROT_WRITE, > > flags=mmap.MAP_SHARED) > >

Re: problem with unicode

2008-04-25 Thread hdante
On Apr 25, 8:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I don't know what to do. I just want to concatenate two string where > apparently one is a binary string, the other one is a unicode string > and I always seem to get this error. Please explain better what you want to do with

Re: Receive data from socket stream

2008-04-25 Thread hdante
On Apr 25, 7:39 pm, [EMAIL PROTECTED] wrote: > I wanted to ask for standard ways to receive data from a socket stream > (with socket.socket.recv()). It's simple when you know the amount of > data that you're going to receive, or when you'll receive data until > the remote peer closes the connection

Re: Java or C++?

2008-04-21 Thread hdante
Summarizing the discussion (and giving my opinions), here's an "algorithm" to find out what language you'll leard next: 1. If you just want to learn another language, with no other essential concern, learn Ruby. 2. If you want to learn another language to design medium to large size applicatio

Re: Unicode chr(150) en dash

2008-04-18 Thread hdante
On Apr 18, 8:36 am, John Machin <[EMAIL PROTECTED]> wrote: > hdante wrote: > > > The character code in question (which is present in the page), 150, > > doesn't exist in ISO-8859-1. > > Are you sure? Consider (re-)reading all of the Wikipedia article. > >

Re: Unicode chr(150) en dash

2008-04-17 Thread hdante
On Apr 17, 12:10 pm, [EMAIL PROTECTED] wrote: > Thank you Martin and John, for you excellent explanations. > > I think I understand the unicode basic principles, what confuses me is the > usage different applications make out of it. > > For example, I got that EN DASH out of a web page which state

Re: How to make this unpickling/sorting demo faster?

2008-04-17 Thread hdante
On Apr 17, 7:33 pm, Steve Bergman <[EMAIL PROTECTED]> wrote: > to demonstrate how Python can combine simplicity, readability, *and* > speed when the standard library is leveraged properly. So, in this But that's not true. You're just creating an artificial example to prove your point. Consider

Re: accessing individual characters in unicode strings

2008-04-12 Thread hdante
On Apr 12, 9:48 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > Peter Robinson schrieb: > > > Dear list > > I am at my wits end on what seemed a very simple task: > > I have some greek text, nicely encoded in utf8, going in and out of a > > xml database, being passed over and beautifully displaye

Re: Rounding a number to nearest even

2008-04-11 Thread hdante
On Apr 11, 3:33 pm, Lie <[EMAIL PROTECTED]> wrote: > > That old-school rounding method you're taught is based on a wrong > assumption of the nature of number. In the past, rounding algorithm is > based on this: > > Original => (RoundUp(u|d|n), RoundNearestEven(u|d|n) > ... > 1.0 => 1(n), 1(n) > 1.1

Re: Rounding a number to nearest even

2008-04-11 Thread hdante
On Apr 11, 11:13 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > Shorter version: > def round3k(x): > return x % 1 != 0.5 and round(x) or round(x / 2.) * 2. Strangely, a "faster" version is: def fast_round(x): if x % 1 != 0.5: return round(x) return 2.0*round(x/2.0) > > nums =

Re: Rounding a number to nearest even

2008-04-11 Thread hdante
On Apr 11, 9:45 am, bdsatish <[EMAIL PROTECTED]> wrote: > On Apr 11, 5:33 pm, bdsatish <[EMAIL PROTECTED]> wrote: > > > > > HI Gerard, > > > I think you've taken it to the best possible implementation. Thanks ! > > On Apr 11, 5:14 pm, Gerard Flanagan <[EMAIL PROTECTED]> wrote: > > > > In fact you c

Re: appropriate python version

2008-04-06 Thread hdante
On Apr 6, 5:59 pm, xamdam <[EMAIL PROTECTED]> wrote: > Thanks. I am guessing the 32bit build should work anyways, same as > other 32 progs on XP 64? The right build should be the "amd64" one. -- http://mail.python.org/mailman/listinfo/python-list

Re: object-relational mappers

2008-04-02 Thread hdante
On Apr 2, 10:50 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > > Try Rails' ActiveRecord. Your problems should reduce to (lg lg > > 2)^(1/12). > > python> (log(log(2)))**(1.0/12.0) > Traceback (most recent call last): > File "", line 1, in ? > ValueError: negative number cannot be raised to a fr

Re: object-relational mappers

2008-04-02 Thread hdante
On Apr 2, 8:25 am, Bruno Desthuilliers wrote: > hdante a écrit : > > > > > > Try Rails' ActiveRecord. Your problems should reduce to (lg lg > > 2)^(1/12). > > Correct me if I'm wrong, but IIRC ActiveRecord requires you use numeric > auto_increment f

Re: object-relational mappers

2008-04-01 Thread hdante
On Apr 1, 5:40 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > I've been poking around the world of object-relational > mappers and it inspired me to coin a corellary to the > the famous quote on regular expressions: > > "You have objects and a database: that's 2 problems. > So: get an object-relati

Re: PyQt - How to prevent a dialog being resized?

2008-03-31 Thread hdante
On Mar 31, 7:12 pm, Kelie <[EMAIL PROTECTED]> wrote: > Hello, > > My question is as subject. I tried something like this and it doesn't > work. > > def resizeEvent(self, event): > self.size = event.oldSize() > > Any hint? > > Thank you. You should preset size hints: http://doc.trolltech.com/

Re: Summary of threading for experienced non-Python programmers?

2008-03-30 Thread hdante
On Mar 28, 11:52 am, [EMAIL PROTECTED] wrote: > I'm having trouble explaining the benefits and tradeoffs of threads to my > coworkers and countering their misconceptions about Python's threading model > and facilities. They all come from C++ and are used to thinking of > multithreading as a way to

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 6:08 pm, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > hdante writes: > > On Mar 30, 9:45 am, Bjoern Schliessmann > [EMAIL PROTECTED]> wrote: > > >> hdante wrote: > > >>> BTW, my opinion is that it's already tim

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 3:14 pm, Lie <[EMAIL PROTECTED]> wrote: > On Mar 30, 12:11 pm, hdante <[EMAIL PROTECTED]> wrote: > (snip) > > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanced enough for generating this: > >

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 9:45 am, Bjoern Schliessmann wrote: > hdante wrote: > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanced enough for generating this: > > Could you please list some that do, and are also convenient? AFAICT th

Re: python ODF library?

2008-03-30 Thread hdante
On Mar 30, 9:29 am, Matias Surdi <[EMAIL PROTECTED]> wrote: > Do yo know any good OpenDocumentFormat library for python? > > I'm starting a project on wich I'll have to programatically modify ODF > text documments, so, after reinventing the wheel, I'd like to know if > already something exists. > >

Re: problem with logic in reading a binary file

2008-03-30 Thread hdante
On Mar 30, 9:23 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > hdante schrieb: > > > > > On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: > >> On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: > > >>> O

Re: problem with logic in reading a binary file

2008-03-30 Thread hdante
On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: > > > > > On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Hello, > > >

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 2:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 30 Mar 2008 02:11:33 -0300, hdante <[EMAIL PROTECTED]> escribió: > > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanc

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread hdante
On Mar 29, 7:55 am, [EMAIL PROTECTED] wrote: > I don't know if this is the right place to discuss the death of <> in > Python 3.0, or if there have been any meaningful discussions posted > before (hard to search google with '<>' keyword), but why would anyone > prefer the comparison operator != ove

Re: problem with logic in reading a binary file

2008-03-29 Thread hdante
On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am having trouble writing the code to read a binary string. I would > like to extract the values for use in a calculation. > > Any help would be great. I'm too lazy to debug your binary string, but I suggest that y

Re: Help me on function definition

2008-03-29 Thread hdante
On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote: > Hello everyone, Hi, Always avoid reinventing the wheel: from Numeric import array, cross_product a = array([1, 2, 3]) b = array([4, 5, 6]) print cross_product(a, b) See: http://numpy.scipy.org/ http://www.scipy.org/ (hint: consid

Re: Big file

2008-03-15 Thread hdante
On Mar 12, 10:50 pm, "Andrew Rekdal" <[EMAIL PROTECTED]> wrote: > Well, I can see how this could get real messy but within defining a GUI > there are many elements and so the block of elements such as a wx.notebook > for instance I would hope I could place all the code for this in another > file an

Re: Big file

2008-03-12 Thread hdante
On Mar 12, 9:42 pm, "Andrew Rekdal" <[EMAIL PROTECTED]> wrote: > I am working in the class constructor defining elements of an application. > The problem is the file is getting unmanageble and I am wanting to extend the > contructor __init__ to another file. > > Is it possible to import directly

Re: Is a "real" C-Python possible?

2007-12-10 Thread hdante
On Dec 9, 10:07 pm, "Jack" <[EMAIL PROTECTED]> wrote: > >> I think most Java-Python benchmarks you can find online will indicate > >> that Java is a 3-10 times faster. A few here: > >>http://mail.python.org/pipermail/python-list/2002-January/125789.html > >>http://blog.snaplogic.org/?p=55 > > > The

Re: Delete a instance passed by reference into a method

2007-12-04 Thread hdante
On Dec 4, 11:47 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-12-03 at 18:27 -0800, hdante wrote: > > (note, you don't want to do this, it's a proof of concept) > > > import sys > > > class A(object): > >def __init__(self):

Re: Delete a instance passed by reference into a method

2007-12-03 Thread hdante
On Dec 3, 10:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 03 Dec 2007 19:53:20 -0300, sccs cscs <[EMAIL PROTECTED]> escribió: > > > I am very surprising by the Python interpreter behavior : see code > > I initialize a 'A' and a 'B', and i give a B instance reference to the > > in

Re: python newbie - question about lexical scoping

2007-12-02 Thread hdante
On Dec 1, 11:31 pm, "Matt Barnicle" <[EMAIL PROTECTED]> wrote: > >> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: > > aye yaye aye... thanks for the pointers in the right direction.. i > > fiddled around with the code for a while and now i've reduced it to the > > *real* issue... i

Re: C++2py

2007-12-02 Thread hdante
On Dec 2, 12:56 pm, farsheed <[EMAIL PROTECTED]> wrote: > I,m looking for a tool for converting c++ to python. Any Ideas? > TIA. Try this: http://www.archaeologyinfo.com/homosapiens.htm (note, probably you'll need the PRO-PLUS version) :-) -- http://mail.python.org/mailman/listinfo/python-

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > Right. Python variables are pointers, except for all the ways that > they are different. By the same criteria, they are also puppies. Give > it a rest. I'm sorry if your notion of pointer is incorrect. A pointer (or, more formally,

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 2:06 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > > That's right. Languages may have arbitrary sets of operations > > defined for their variables. There's nothing wrong with that. > > No, arbitrary operations would be useless. > 1) You may convince a big company to add you newly dev

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: > > > > > On Nov 28, 1:09 am, Steven D'Aprano > ><[EMAIL PROTECTED]> wrote: > >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante w

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 1:09 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: > > Python variables are pointers and that's it. > > How do I increment a Python variable so that it points to the next > address, like I can do wit

Re: How to Teach Python "Variables"

2007-11-27 Thread hdante
On Nov 27, 2:25 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > > I hope the participants in this thread realize > that this sort of discussion will cause > any programming newbie to immediately melt into the > floor. All right, answering the original question is good. :-P 1) If the students can

Re: How to Teach Python "Variables"

2007-11-27 Thread hdante
On Nov 26, 7:49 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > greg <[EMAIL PROTECTED]> writes: > > none wrote: > >> IIRC, I once saw an explanation how Python doesn't have > >> "variables" in the sense that, say, C does, and instead has bindings > >> from names to objects. > > > If you're talk

Re: read/write to java socket in python

2007-11-27 Thread hdante
On Nov 27, 1:08 pm, [EMAIL PROTECTED] wrote: > Hi all, > > I have a problem with reading from a Java server after I have written > to it - it just hangs. It works fine if I just write to the server and > not try to write. I have read the HOWTO on sockets - and it states > that there is a problem (s

Re: How to Teach Python "Variables"

2007-11-27 Thread hdante
On Nov 25, 5:31 pm, none <""atavory\"@(none)"> wrote: > Aurélien Campéas wrote: > > none a écrit : > >> Hello, > > >> IIRC, I once saw an explanation how Python doesn't have > >> "variables" in the sense that, say, C does, and instead has bindings > >> from names to objects. Does anyone hav

Re: fork/exec with input redirection

2007-11-26 Thread hdante
On Nov 27, 12:09 am, hdante <[EMAIL PROTECTED]> wrote: > On Nov 26, 7:58 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > > I have a Python script that does a fork/exec, so the parent process > > can get the child's PID and monitor /proc/PID/s

Re: fork/exec with input redirection

2007-11-26 Thread hdante
On Nov 26, 7:58 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > I have a Python script that does a fork/exec, so the parent process > can get the child's PID and monitor /proc/PID/stat (on a CentOS > system). Most of my processes' command lines are straightforward > enough to do this with, but I have

Re: Passing data to system command

2006-06-18 Thread hdante
Should be like this: from subprocess import Popen, PIPE my_output = file('output1.ps', 'w') p1 = Popen(["psxy"], stdin = PIPE, stdout=my_output) p1.stdin.write(my_format(array)) p1.communicate() my_output.close() I've never used that, though, please tell us if it worked. Chris Hieronymu

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-18 Thread hdante
Hi, I don't know zipfile by heart, but python official documentation is always good ( docs.python.org ). You need a loop in the file list like this: for file in zip: process(file) Unfortunatelly, there are too many ways to create a thumbnail from an image. I'll cite one, using the "pyth

Re: File read and writing in binary mode...

2006-06-17 Thread hdante
Hi, I'm sorry, but you have a conceptual error there. Text files differ from binary files because they are not considered raw. When you say that this or that file is a text file, python and/or the operating system takes the liberty to insert and or remove semantics from the file, according to so