Re: Merging overlapping spans/ranges

2005-05-11 Thread Jordan Rastrick
Should work fine as far as I can see. Of course, thats not very 'pythonic' - I should probably give at least 10 different unit tests that it passes ;) Its gratifying to know I'm not the only one who needed that final yield. Jim Sizelove wrote: > Bengt Richter wrote: > > On Tue, 10 May 2005 15:14:

RE: windows directories for curr user

2005-05-11 Thread Tim Golden
[Dan Bishop] | flamesrock wrote: | > Hi, | > | > Short, maybe newbish question: Is there a python method for finding | out | > who the current user is in the OS module? | > | > On older windows machines the directory I'm interested in is just | > "c://my documents", but how do I walk to the current

Re: Trouble saving unicode text to file

2005-05-11 Thread Thomas Bellman
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote: >Thomas Bellman wrote: >> Fixed-with characters *do* have advantages, even in the external >> representation. With fixed-with characters you don't have to >> parse the entire file or stream in order to read the Nth character; >

Defunct Processes With subprocess.Popen

2005-05-11 Thread John Abel
Hi! I'm currently writing a script which launches external programs, but it keeps leaving zombie/defunct processes behind, until I kill the launching script, which is a bit of a pain, as it's supposed to be a daemon. The code I'm using is: newPid = subprocess.Popen( cmdLine[ 1: ], executable=

Re: Merging overlapping spans/ranges

2005-05-11 Thread Max M
Jim Sizelove wrote: Wow! c.l.py is allmost like an AI program generator. But I guess it helps to ask questions about problems that programmers find interresting :-) The "linear" approach is pretty simple to code and understand. I am just afraid what happens when many users tries to book that 1

Re: A Faster Way...

2005-05-11 Thread asmir . mehic
For efficient string concatenation in python look at: http://www.skymind.com/~ocrow/python_string -- http://mail.python.org/mailman/listinfo/python-list

Serving binary data from a cgi-script

2005-05-11 Thread Thomas W
Hi, I'm having some problems serving binary data in a simple CGI-script. I'm setting content-type ( "application/octet-stream" ), content-length and Content-disposition and I think these are correct, but the size of the served file/data is different than the source. The read and write the data I'm

Using TCL files in Python ?

2005-05-11 Thread Peter Moscatt
I am reasonably new to programming in Python. [Using LINUX] Up until now I have been using GUI widgets supplied by 'Tkinter' but starting to realise that Tkinter have limited widgets. I have been given the lead that I should look at other sources for GUI widgets - namely TCL. I have just done a

Re: A Faster Way...

2005-05-11 Thread stasz
On Tue, 10 May 2005 18:11:27 -0700, gene.tani wrote: > hmm, there's lots of ways, huh? you can use itertools.zip instead of > builtin zip, or do: > > map(None, list1, list2) Not! One should try a possible solution first, >>> l1 = range(10) >>> l2 = range(10,20) >>> l1 [0, 1, 2, 3, 4, 5, 6, 7, 8

Reading files into a 2D list.

2005-05-11 Thread Oyvind Ostlund
I am not sure what the right syntax is here. So please help me out (started 2 days ago). I have a list of about 20 files that I want to read line by line into a 2D list. So the first dimension will be each file, and the second every line in that file. I tried to do something like this: f

Re: Serving binary data from a cgi-script

2005-05-11 Thread Roland Heiber
Thomas W wrote: > print d Hi, use sys.stdout.write instead, print is adding linebreaks ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-11 Thread Stelios Xanthakis
Roger Binns wrote: >>I am not very interested on C compatibility. > > > That will rule out all the gui frameworks, SSL, cryptography > and numerous other packages. Have a look at what happened to > Prothon. What ultimately killed it was the problem of having > a decent library. You don't have

Re: pyvm -- faster python

2005-05-11 Thread Stelios Xanthakis
Paul Rubin wrote: > > I hope that PyPy will replace CPython once it's solid enough. Trying > to stay backwards compatible with the legacy C API doesn't seem to me > to be that important a goal. Redoing the library may take more work > than the Prothon guy was willing to do for Prothon, but PyPy

Re: Put a file on an ftp server over ssl

2005-05-11 Thread Lars
Daniel, Why don't you just use the 'sftp' command line program, it's available for all unixes and I bet you can find a build for windows to? Then you could just do an os.system(..) and be done with it. Cheers! Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading files into a 2D list.

2005-05-11 Thread Klaus Alexander Seistrup
Øyvind Østlund wrote: > I have a list of about 20 files that I want to read line by > line into a 2D list. So the first dimension will be each file, > and the second every line in that file. > > I tried to do something like this: > > files_and_lines = [][] > filenumber = 0 > > for

RE: Reading files into a 2D list.

2005-05-11 Thread Oyvind Ostlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Klaus Alexander Seistrup Sent: Wednesday, May 11, 2005 12:14 PM To: python-list@python.org Subject: Re: Reading files into a 2D list. Øyvind Østlund wrote: > I have a list of about 20 files that I want t

Regarding Mail sending smtplib Module

2005-05-11 Thread praba kar
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ## import email.Message import email.Utils import mimetypes import os,string fromAddr="[EMAIL PROTECTED]" toAddr= ["[EMAIL PROTECTED]","[EMAIL PR

Re: Python Args By Reference

2005-05-11 Thread Roy Smith
"ncf" <[EMAIL PROTECTED]> wrote: > The two issues I am having in grasping all of this are as follows: > 1) Being new to Python, terms like mutable and immutable. Although I > have probably dealt with them in other languages, the terms by > themselves are a little confusing, but managable overall, s

Problems with csv module

2005-05-11 Thread Florian Lindner
Hello, I've one problem using the csv module. The code: self.reader = csv.reader(f, delimiter = ",") works perfectly. But when I use a variable for delimiter: self.reader = csv.reader(f, delimiter = Adelimiter) I get the traceback: File "/home/florian/visualizer/ConfigReader.

Re: Listing of declared variables and functions

2005-05-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fernando Perez <[EMAIL PROTECTED]> wrote: >ohms377 wrote: > >> Dear python users, >> >> In interactive mode, I was wondering if there is a way to list all >> declared variables and functions (and from global workspace). > >In [1]: def foo(): pass > ...: > >In [2]

Re: Using TCL files in Python ?

2005-05-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Peter Moscatt <[EMAIL PROTECTED]> wrote: >I am reasonably new to programming in Python. [Using LINUX] > >Up until now I have been using GUI widgets supplied by 'Tkinter' but >starting to realise that Tkinter have limited widgets. > >I have been given the lead that I

Re: Problems with csv module

2005-05-11 Thread Richie Hindle
[Florian] > I've one problem using the csv module. > The code: > > self.reader = csv.reader(f, delimiter = ",") > > works perfectly. But when I use a variable for delimiter: > > self.reader = csv.reader(f, delimiter = Adelimiter) > > I get the traceback: > > > File "/home/fl

CGIHTTPServer on Windows?

2005-05-11 Thread Chris Curvey
Hi all, I'm trying to work around my cgi-driving-IE problem by creating my own server, but CGIHTTPServer on Windows (python 2.3.5) seems to be having troubles. Trying to run a "hello world" CGI gives me: COMPAQ.ANTIQUES - - [11/May/2005 07:18:50] "GET /cgi-bin/hello.py HTTP/1.1" 200 - COMPAQ.ANT

Re: Problems with csv module

2005-05-11 Thread Florian Lindner
Richie Hindle wrote: > > [Florian] >> I've one problem using the csv module. >> The code: >> >> self.reader = csv.reader(f, delimiter = ",") >> >> works perfectly. But when I use a variable for delimiter: >> >> self.reader = csv.reader(f, delimiter = Adelimiter) >> >> I get th

Re: Problems with csv module

2005-05-11 Thread Richie Hindle
[Florian] > You mean that csv.reader can't work with unicode as the delimiter parameter? Exactly. http://www.python.org/doc/2.3.5/lib/module-csv.html says: "Note: This version of the csv module doesn't support Unicode input. Also, there are currently some issues regarding ASCII NUL characters.

Re: Python Graphing Utilities.

2005-05-11 Thread Bill Mill
On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Fernando Perez <[EMAIL PROTECTED]> writes: > > > [...] > > > > And I'd also second the matplotlib suggestion, to which I've by > > now fully switched after years of faithful gnuplot usage. > > Matplotlib is very good, has an

Re: Problems with csv module

2005-05-11 Thread Florian Lindner
Richie Hindle wrote: > > [Florian] >> You mean that csv.reader can't work with unicode as the delimiter >> parameter? > > Exactly. http://www.python.org/doc/2.3.5/lib/module-csv.html says: > > "Note: This version of the csv module doesn't support Unicode input. Also, > there are currently some

Re: Python Graphing Utilities.

2005-05-11 Thread Torsten Bronger
HallÃchen! Bill Mill <[EMAIL PROTECTED]> writes: > On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Fernando Perez <[EMAIL PROTECTED]> writes: >> >>> [...] >>> >>> [...] Matplotlib is very good, has an active development >>> community, and it is designed from the ground up not only a

HELP Printing with wxPython

2005-05-11 Thread Mario
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but is impossible to use this script even if I do exactly as said there. I think th

Re: Serving binary data from a cgi-script

2005-05-11 Thread Fuzzyman
Yeah... I once spent ages going round in circles trying to track that down. A happy way to spend an evening... Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with csv module

2005-05-11 Thread Richie Hindle
[Florian] > How can I convert Unicode to ASCII? You're writing code using Unicode and you don't know how to convert it ASCII? You need to do some reading. Here are a few links - Google can provide many more: http://docs.python.org/tut/node5.html#SECTION00513 http://diveinto

Re: Jabber/XML-RPC lib in Python?

2005-05-11 Thread Skip Montanaro
Michael> I was wanting to write a program that lets two machines Michael> communicate (without user intervention) using XML-RPC over a Michael> Jabber network. Does anyone know of an existing library suited Michael> to that task? Googling for "Jabber XML-RPC Python" yielded this a

Re: Using TCL files in Python ?

2005-05-11 Thread Jeff Epler
While I've never used it, there *is* a Tix module in Python which appears to wrap the widgets provided by Tix. In Fedora Core 2, Python doesn't seem to be configured to use Tix OOTB but a one-liner (that should be harmless elsewhere) does make it work. These classes are defined in the Tix module:

Replacing open builtin

2005-05-11 Thread rmm
If I replace the open builtin eg import main __main__.__builtins__.open=None Is there any way, from here on, to access the original open function?? Extending this slightly, lets say I put a reference to the original open function inside a class called Isolate and protect this reference using __g

Re: Replacing open builtin

2005-05-11 Thread Jp Calderone
On 11 May 2005 05:20:28 -0700, [EMAIL PROTECTED] wrote: >If I replace the open builtin eg > >import main >__main__.__builtins__.open=None > >Is there any way, from here on, to access the original open function?? > >Extending this slightly, lets say I put a reference to the original >open function i

Re: Problems with csv module

2005-05-11 Thread Skip Montanaro
>> You mean that csv.reader can't work with unicode as the delimiter >> parameter? Richie> Exactly Richie> "Note: This version of the csv module doesn't support Unicode Richie> input Richie> That note is still there in the current development docs, so it Rich

libraries with distutils

2005-05-11 Thread Glenn Pierce
Hi I have a question about writing a portable setup.py script for distutils. I have a directory structure like this. FreeImage/ |--Source/ ||-- FreeImage.h | |--Dist/ ||--FreeImage.li

Interactive shell for demonstration purposes

2005-05-11 Thread Brian Quinlan
Can anyone recommend a Python interactive shell for use in presentations? Ideal characteristics (priority order): o configurable font size o full screen mode o readline support o syntax coloring I've tried ipython but, since it runs inside a console window, and the console window has a limited n

RE: Interactive shell for demonstration purposes

2005-05-11 Thread Tim Golden
[Brian Quinlan] | | Can anyone recommend a Python interactive shell for use in | presentations? | | Ideal characteristics (priority order): | o configurable font size | o full screen mode | o readline support | o syntax coloring | | I've tried ipython but, since it runs inside a console | wind

Re: Replacing open builtin

2005-05-11 Thread rmm
Sorry, should maybe have used __import__ as an example. Let's say I grab import, store the reference within the Isolate class and then redirect the builtin import to a function in the Isolate class which only allows certain modules to be imported -eg not sys. Would this be secure? -- http://mai

Question about XML Parser in Python.

2005-05-11 Thread Amitpython5
Hello,     Well, I'm fairly new to Python and have encountered a strange error while reading an XML document in Python. I used the SAX parser, and my input XML is fairly large with 30 records. I extract about 25 fields from each record and spit out a csv file. The strange thing is that af

Importing modules

2005-05-11 Thread qwweeeit
The pythonic way of programming requires, as far as I know, to spread a big application in plenty of more manageable scripts, using import or from ... import to connect the various modules. In some cases there is a further complication: module importing through an indirect mechanism, like: exec "fr

Re: Encryption with Python?

2005-05-11 Thread Peter Hansen
Robert Kern wrote: > Peter Hansen wrote: > >> Back to Paul's question then: why use an unreliable and >> probably-useless-for-all-but-spawning-lengthy-but-educational-threads >> encryption method when there are relatively reliable and, uh, less >> discussed and non-edifying, uh... well, you get

Re: Python Graphing Utilities.

2005-05-11 Thread Bill Mill
On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Bill Mill <[EMAIL PROTECTED]> writes: > > > On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote: > > > >> Fernando Perez <[EMAIL PROTECTED]> writes: > >> > >>> [...] > >>> > >>> [...] Matplotlib is very good, has an active

Re: HELP Printing with wxPython

2005-05-11 Thread Tim G
> Hello all, I'm trying hard to make possible to print some simple text from > python to the default printer using wxPython, after days of internet > searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but > is impossible to use this script even if I do exactly as said there. I

Re: Replacing open builtin

2005-05-11 Thread Jp Calderone
On 11 May 2005 05:56:04 -0700, [EMAIL PROTECTED] wrote: >Sorry, should maybe have used __import__ as an example. >Let's say I grab import, store the reference within the Isolate class >and then redirect the builtin import to a function in the Isolate class >which only allows certain modules to be i

RE: Interactive shell for demonstration purposes

2005-05-11 Thread Jp Calderone
On Wed, 11 May 2005 13:55:38 +0100, Tim Golden <[EMAIL PROTECTED]> wrote: >[Brian Quinlan] >| >| Can anyone recommend a Python interactive shell for use in >| presentations? >| >| Ideal characteristics (priority order): >| o configurable font size >| o full screen mode >| o readline support >| o sy

Re: Put a file on an ftp server over ssl

2005-05-11 Thread Rick Holbert
Have a look at Putty's pscp and PySCP... http://www.chiark.greenend.org.uk/~sgtatham/putty/ http://py.vaults.ca/apyllo.py/990075885.195097684.69935243 Rick Lars wrote: > Daniel, > > Why don't you just use the 'sftp' command line program, it's available > for all unixes and I bet you can find a

Re: Encryption with Python?

2005-05-11 Thread Robert Kern
Peter Hansen wrote: >>Education is a process one must engage in. You don't just step in it. > > The education to which I was referring was that which _most_ of us just > received by reading Paul's and your replies, not from anything in the > OP's postings. ;-) Okay, I'll buy that. :-) -- R

RE: Interactive shell for demonstration purposes

2005-05-11 Thread Tim Golden
[Jp Calderone] | | [Tim Golden ] | | >[Brian Quinlan] | >| | >| Can anyone recommend a Python interactive shell for use in | >| presentations? | | > I Googled and came across this: | > | >http://codespeak.net/py/current/doc/execnet.html | > | >which might get you started. | > | | execnet lets y

Decompyle will not Compile.

2005-05-11 Thread eternl_knight
Ironically enough - the decompyle module will not compile on my machine. I am using Python 2.2 and MSVC7 (i.e. .NET). However it tells me there is an undefined external as follows: "marshal_22_for_20.obj : error LNK2001: unresolved external symbol initdecompyle/marshal_20" I am writing code for P

Re: Python Graphing Utilities.

2005-05-11 Thread Robert Kern
Bill Mill wrote: > Tha's cool, I saw what you wrote. First off, I wasn't sure what you > meant by "hardcopy", so I thought I'd let you know that matplotlib has > PS output. Second, the page I linked to talks about all the font-type > features of matplotlib, which I thought might interest you. Havi

FutureWarning in win32com?

2005-05-11 Thread Chris Curvey
Hi all, When trying to automate IE thru win32com (using PAMIE), I'm getting this message out C:\Program Files\Plone 2\Python\lib\site-packages\win32com\client\dynamic.py:463 : FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Pyth on 2.4 and up debug_attr_print("Getting

Re: Interactive shell for demonstration purposes

2005-05-11 Thread Ville Vainio
> "Brian" == Brian Quinlan <[EMAIL PROTECTED]> writes: Brian> Can anyone recommend a Python interactive shell for use in Brian> presentations? Brian> I've tried ipython but, since it runs inside a console Brian> window, and the console window has a limited number of Brian>

Re: Python Args By Reference

2005-05-11 Thread Peter Hansen
Roy Smith wrote: > The most common immutable objects you'll see are strings and tuples, and > the main reason they're immutable is to allow them to be dict keys. And ints. Strings, tuples and ints are the *three* most common immutable objects you'll see... -Peter -- http://mail.python.org/mai

Re: Replacing open builtin

2005-05-11 Thread rmm
I had a quick look at the python source code and fileobject.c is one of the core classes which, I would imagine, is why a reference can be obtained. The other classes (method, dictionaries etc) don't look so much of a liability. I'll maybe try disabling the fopen calls in fileobject and see if it

Re: Pipes of binaries - IPC::Run

2005-05-11 Thread Peter Hansen
Swaroop C H wrote: > Is there a Python equivalent of Perl's IPC::Run module [ > http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ? I don't know Perl, and don't plan to read all of that page you referenced, but judging from the subject line and the half-sentence description near the top of th

Re: Reading files into a 2D list.

2005-05-11 Thread Larry Bates
Few observations. 1) Don't concatenate pathnames yourself use os.path.join, that makes your code portable. lexi_file = open(os.path.join(sys.path[0],"lexi",files), "r") 2) Start with an empty list and append your "lines" lists: files_and_lines=[] filenumber = 0 for files in file_names: fpa

Re: HELP Printing with wxPython

2005-05-11 Thread James Carroll
Hi Mario, > Something like SendPrinter("some text\n")? If you are doing this just for yourself, and you know you have a printer that will really print just the plain text when you send it plain text (like a dot matrix printer from the early 90s) then you can probably open the printer device and

Re: HELP Printing with wxPython

2005-05-11 Thread Larry Bates
Mario, Here is a function stripped from a working program that uses printpreview from wxWindows to print out cells from a grid that the user is working on. Hopefully this can point you in the proper direction. Regards, Larry Bates def DO_printpreview(self, event): if self._trace:

Re: Decompyle will not Compile.

2005-05-11 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I am writing code for Poser 6 (which has not as yet updated to the > latest Python) and have just lost a substantial chunk of code - part of > which being an algorithm I have been tweaking for a couple of weeks > now. As such, getting even part of the PYC to decompile wou

Re: Replacing open builtin

2005-05-11 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I had a quick look at the python source code and fileobject.c is one of > the core classes which, I would imagine, is why a reference can be > obtained. The other classes (method, dictionaries etc) don't look so > much of a liability. I'll maybe try disabling the fopen

RE: Reading files into a 2D list.

2005-05-11 Thread Oyvind Ostlund
Thanks a lot. That works great. I can't belive how close I was in the end. Well that was the last lines of this application, so thanks a lot. And thanks for the tip about the portability stuff. I can't belive I didn't think about that. Been writing to much in non portable languages and libs lik

Re: Interactive shell for demonstration purposes

2005-05-11 Thread Brian Quinlan
Ville Vainio wrote: > Hmm, do you consider the fonts in a console window unreadable? In fullscreen mode, yes (you get no choice of font size in Windows XP). In Windowed mode you still only get a limited font selection (only two fonts and only a few type sizes [most of which are small]). > I've

reg mail sending without smtp module

2005-05-11 Thread praba kar
Dear All, Is it possible to send a message as a mail with out smtplib module? If you find out any module for mail sending(without smtplib) kindly mail me. regards Prabahar Yahoo! India Matrimony: Find your life

Re: Python Args By Reference

2005-05-11 Thread Grant Edwards
On 2005-05-11, Roy Smith <[EMAIL PROTECTED]> wrote: > The most common immutable objects you'll see are strings and tuples, And integers. They're immutable, aren't they? At least the small ones. And floats. -- Grant Edwards grante Yow! .. bleakness

Re: Python Args By Reference

2005-05-11 Thread Grant Edwards
On 2005-05-11, Peter Hansen <[EMAIL PROTECTED]> wrote: >> The most common immutable objects you'll see are strings and >> tuples, and the main reason they're immutable is to allow them >> to be dict keys. > > And ints. Strings, tuples and ints are the *three* most > common immutable objects you'l

pylab: plot update

2005-05-11 Thread Jan Wienhausen
Hi, I need to do a plot of data that is beeing acuired. For that the plot needs to be updated after aquiering a new tuple. At the moment I allways do this after a new tuple is aqcuired: plot(ar[0,i-1:i],br[1,i-1:i],'ro') show() #ar is arrays were the new tuple is put in po

Re: Python Graphing Utilities.

2005-05-11 Thread Torsten Bronger
HallÃchen! Robert Kern <[EMAIL PROTECTED]> writes: > [...] > > A pslatex backend certainly would be interesting. A Gnuplot > backend would probably not be feasible. Does it expose its raw > drawing operations? Probably not raw enough, but I don't know how basic matplotlib wants it to be. You co

CHANGE BayPIGgies: May *THIRD* Thurs

2005-05-11 Thread Aahz
Reminder: We will *NOT* be meeting the *SECOND* Thursday (this week, May 12). Our May meeting will be the *THIRD* Thursday, May 19. This will be our first meeting at Google, with Alex Martelli's presention on design patterns. More details soon! -- Aahz ([EMAIL PROTECTED]) <*>

Re: reg mail sending without smtp module

2005-05-11 Thread John Abel
praba kar wrote: >Dear All, > > Is it possible to send a message as a mail >with out smtplib module? If you find out any module >for mail sending(without smtplib) kindly mail me. > >regards >Prabahar > > > >Yahoo! In

Fwd: Interactive shell for demonstration purposes

2005-05-11 Thread James Carroll
-- Forwarded message -- From: James Carroll <[EMAIL PROTECTED]> Date: May 11, 2005 10:43 AM Subject: Re: Interactive shell for demonstration purposes To: Brian Quinlan <[EMAIL PROTECTED]> I would personally try looking at the PyCrust.py that's included with wxPython. It has a sta

Re: pylab: plot update

2005-05-11 Thread Skip Montanaro
Jan> After that i call sleep(5) until I can acuire the next tuple. Jan> But during that I can't use the zoom/pan, save etc in the window. ... Jan> Is there any better way to do this easily? Set a timeout. How to do that depends on what gui tools you are using. I've never used p

Re: Supercomputer and encryption and compression @ rate of 96%

2005-05-11 Thread TZOTZIOY
On Mon, 2 May 2005 23:11:54 +0530, rumours say that km <[EMAIL PROTECTED]> might have written: >Hi all, > >This was posted long ago. >I tried to compress a mp3 file but i couldnt get the keycode+".out" file >which is of size 1 bit. instead it is printed to STDOUT. i am usng python 2.4 >. i unde

Re: unicode encoding problem

2005-05-11 Thread TZOTZIOY
On Thu, 28 Apr 2005 23:53:02 +0200, rumours say that "Martin v. Löwis" <[EMAIL PROTECTED]> might have written: >In theory, Python should look at sys.stdin.encoding when processing >the interactive source. In practice, various Python releases ignore >sys.stdin.encoding, and just assume it is Latin-

Re: Python or PHP?

2005-05-11 Thread TZOTZIOY
On Tue, 26 Apr 2005 00:35:59 GMT, rumours say that Jorey Bump <[EMAIL PROTECTED]> might have written: >"Lad" <[EMAIL PROTECTED]> wrote in news:1114254894.512656.297040 >@l41g2000cwc.googlegroups.com: > >> Is anyone capable of providing Python advantages over PHP if there are >> any? >As you lear

Re: Python Args By Reference

2005-05-11 Thread ncf
Thanks to everyone for your assistance. I shall reread this a couple times and then try to make something that works. Many thanks and have a GREAT day. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Regarding Mail sending smtplib Module

2005-05-11 Thread Sion Arrowsmith
praba kar <[EMAIL PROTECTED]> wrote: >Here I want to avoid this line "Received: from unknown >(HELO prabahar.enmail.com) (59.92.13.47) by >mailserver with SMTP; 11 May 2005 10:09:11 - " How >can I do this? . Why python give this line? . Mail >sending Module in php will not give this type

Re: reg mail sending without smtp module

2005-05-11 Thread Tim Williams
- Original Message - From: "John Abel" <[EMAIL PROTECTED]> > praba kar wrote: > > >Dear All, > > > > Is it possible to send a message as a mail > >with out smtplib module? If you find out any module > >for mail sending(without smtplib) kindly mail me. > > > >regards > >Prabahar

Re: pyvm -- faster python

2005-05-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roger Binns <[EMAIL PROTECTED]> wrote: >> could You tell us a bit more about Your motivation to create an >> alternative C-Python interpreter? > >I'd also be curious to know if the performance gains would remain >once it gets fleshed out with things like closures, lo

Re: Regarding Mail sending smtplib Module

2005-05-11 Thread Tim Williams
praba kar <[EMAIL PROTECTED]> wrote: >Here I want to avoid this line "Received: from unknown >(HELO prabahar.enmail.com) (59.92.13.47) by >mailserver with SMTP; 11 May 2005 10:09:11 - " How >can I do this? . Why python give this line? . Mail >sending Module in php will not give this type

Re: Solipsis: Python-powered Metaverse

2005-05-11 Thread Paul McNett
Ville Vainio wrote: >>"Paul" == Paul McNett <[EMAIL PROTECTED]> writes: > > > Paul> Only, I couldn't hear what they said back to me because I > Paul> don't have UDP port 6000 open on my firewall and forwarding > Paul> to my laptop (and don't want to do that either). > > Paul>

Re: __brace__ (PEP?)

2005-05-11 Thread Terry Hancock
On Sunday 08 May 2005 06:29 pm, James Stroud wrote: > If "__call__" allows anobject() and "__getitem__" allows anobject[arange], > why > not have "__brace__" (or some other, better name) for anobject{something}. > Such braces might be useful for cross-sectioning nested data structures: [...] > T

Re: "mysql.h: No such file or directory" when building MySQL-python

2005-05-11 Thread francescomoi
Thank you Andy for your answer. I tried by using '1.2.1c1' and '1.2.1c2', but with no success: --- creating build/temp.linux-i686-2.3 gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 - D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c _mysql.c -o build/

Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever separated from the love of God in a place called Hell. The Holy Bible descibes Hell as a place of eternal torment, suffering, pain and agony for all those who have rejected Jesus Christ. The good news is that you can avoid Hell by allowing Jesus Christ to save you today. Only then will you have true peace in your life knowing that no matter what happens you are on your way to Heaven. by BluWater0523@yahoo.com

2005-05-11 Thread BluWater0523
http://hypershrink.com/SinnersPrayer << I saw this website on a search directory. Great Resource! -- http://mail.python.org/mailman/listinfo/python-list

working directory for debugging in pythonwin

2005-05-11 Thread Thomas Pfaff
Hello all, I started using the nice Pythonwin IDE together with Python 2.3 (I have come to prefer its editor to IDLE). My problem is, that when I want to run a script in the debugger, I can give the script name and arguments, but I can't tell it in which directory it should run. I googled this gr

OO design question / Transform object in place?

2005-05-11 Thread andy2O
Hello comp.lang.py, Can you help me with ideas for the following (somewhat newbie) OO design question in Python? Note, I'm using psuedo-code, not actual Python for the examples! Background: --- I need to represent a small variety of mathematical constructs symbolically using Python classe

Re: Python Args By Reference

2005-05-11 Thread Terry Hancock
On Wednesday 11 May 2005 08:43 am, Peter Hansen wrote: > Roy Smith wrote: > > The most common immutable objects you'll see are strings and tuples, and > > the main reason they're immutable is to allow them to be dict keys. > > And ints. Strings, tuples and ints are the *three* most common > imm

TAKE_FOCUS

2005-05-11 Thread phil
WM_TAKE_FOCUS does not work on WinXP ?? I was sure I had used that on win before. Works on Linux. I have a function I need to run when the window gets the focus. How do you do that in Tkinter on Win32? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: A Faster Way...

2005-05-11 Thread Fredrik Lundh
"stasz" wrote: > > hmm, there's lots of ways, huh? you can use itertools.zip instead of > > builtin zip, or do: > > > > map(None, list1, list2) > > Not! huh? > One should try a possible solution first, > >>> l1 = range(10) > >>> l2 = range(10,20) > >>> l1 > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > >>>

Re: Replacing open builtin

2005-05-11 Thread rmm
Sorry, didn't mean to pester Jp I have checked the archives, Rexec copies __builtins__, causing the del __builtins__ issue. I'm modifying the lowest level__builtins__. I am also using __getAttribute__ and __setAttr__, I could find no mention of security holes on the lists. Let me re-state the qu

Re: reg mail sending without smtp module

2005-05-11 Thread Kartic
The Great 'praba kar' uttered these words on 5/11/2005 10:06 AM: > Dear All, > > Is it possible to send a message as a mail > with out smtplib module? If you find out any module > for mail sending(without smtplib) kindly mail me. > > regards > Prabahar twistedmatrix.com, Twisted Mail

Problem combining python code and html

2005-05-11 Thread Hansan
Hi all, I hope you have time to help me out a little. My problem is that I want to combine some python code I have made with some html templates, I found a tutorial at dev shed: http://devshed.spunge.org/Server_Side/Python/CGI/page6.html and : http://devshed.spunge.org/Server_Side/Python/CGI/pag

tes, no reply

2005-05-11 Thread hans
z -- http://mail.python.org/mailman/listinfo/python-list

ezPyCrypto confusion

2005-05-11 Thread scott
I am experimenting with ezPyCrypto ( http://www.freenet.org.nz/ezPyCrypto/ ). Having difficulty making the key portable (ie put in a file). I don't get an error message, I just recover a message string that is empty instead of one that contains my message. The code is below with a few extra prin

Re: OO design question / Transform object in place?

2005-05-11 Thread Dave Benjamin
[EMAIL PROTECTED] wrote: > Now suppose I set "expression2 = Sum([a,-a])" and Sum.simplify() > recognises that the two terms cancel and the Sum has value 0. > > Can I make "expression2.simplify()" transform expression2 from an > instance of Sum to an instance of Number(0) **in place**? Is that > po

Finding startup files

2005-05-11 Thread jeff elkins
I'm creating an app that relies on a configuration file at launch. The file will always exist in the app's installation directory, but I have no control over where that might be. Is there an OS-independent way that I can instruct the app to look in it's home directory for startup files? Right

Re: Solipsis: Python-powered Metaverse

2005-05-11 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul McNett <[EMAIL PROTECTED]> wrote: >Ville Vainio wrote: >> >> FWIW, In Finland all home *DSL and Cable internet connections (that I >> know of) are connected "directly" to the internet (in the sense that >> all ports are open). Blocking is reserved for the modem

Re: Python Args By Reference

2005-05-11 Thread Fredrik Lundh
Grant Edwards wrote: > Yes. All arguments are passed by reference. This must be in > the FAQ somewhere... hopefully not, because that saying that "all arguments are passed by reference" is extremely confusing for people who've learned about "call by reference" in school. as has discussed many

Re: Finding startup files

2005-05-11 Thread hemagician
The following script demonstrates a method that should work for you. I believe it is entirely cross-platform. #! /usr/bin/python import sys import os print os.path.abspath(os.path.dirname(sys.argv[0])) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >