Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Heiko Wundram
On Wednesday 11 May 2005 08:02, 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, just the way > it should be... Same here, an

Pipes of binaries - IPC::Run

2005-05-10 Thread Swaroop C H
Is there a Python equivalent of Perl's IPC::Run module [ http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ? Thanks! -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-10 Thread Paul Rubin
"Roger Binns" <[EMAIL PROTECTED]> writes: > Some examples are gui toolkits (eg wxPython), SSL (eg M2Crypto, pyopenssl) > and database (pysqlite, APSW). These aren't in the shipped with Python > library but are widely used. M2Crypto is a straightforward SWIG wrapper around OpenSSL, I thought. I do

Re: pyvm -- faster python

2005-05-10 Thread Paul Rubin
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > Delete the "standard" and You still obtain huge librarys for .Net, Java > and Python. I also regret that Prothon starved in infancy but it might > be exeggerated to demand that each language designer or one of his > apostels should manage a huge communit

Re: windows directories for curr user

2005-05-10 Thread flamesrock
thanks!! -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-10 Thread Roger Binns
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Roger Binns" <[EMAIL PROTECTED]> writes: > What kind of stuff is in the existing Python C library that couldn't > be reimplemented or retargeted pretty easily? Most of it is either > wrappers for standard C functio

Re: Python Args By Reference

2005-05-10 Thread Donn Cave
Quoth "ncf" <[EMAIL PROTECTED]>: ... | 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 overal

Re: windows directories for curr user

2005-05-10 Thread 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 users my documents > folder?

Re: pyvm -- faster python

2005-05-10 Thread Kay Schluehr
Paul Rubin wrote: > "Roger Binns" <[EMAIL PROTECTED]> writes: > > Err, you proved my point! Prothon was fine at the VM level. The > > author couldn't figure out how to get a decent sized "standard" > > library, and ultimately ended up abandoning his VM for .Net since > > that gets you a large st

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Ville Vainio
> "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> It is a shame: peer to peer has th

Re: Python Args By Reference

2005-05-10 Thread Dan Bishop
ncf wrote: > As I fail to see how an array could be used in this (my own > stupidity?), would you have any such example? For reference, I'm trying > to translate this: http://www.cr0.net:8040/code/crypto/sha256/ (Inside > sha256_process). > > Once again, thanks for the patience, I'm still picking u

Re: Python Args By Reference

2005-05-10 Thread Paul Rubin
Paul Rubin writes: > state = [A,B,C,D,E,F,G,H] > magic = [0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, > 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98 ] > > def P(state, i, magic): >a,b,c,d,e,f,g,h = state[i:] + state[:i]

Re: Python Args By Reference

2005-05-10 Thread Paul Rubin
"ncf" <[EMAIL PROTECTED]> writes: > As I fail to see how an array could be used in this (my own > stupidity?), would you have any such example? How's this (untested): state = [A,B,C,D,E,F,G,H] magic = [0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1,

Re: Trouble saving unicode text to file

2005-05-10 Thread "Martin v. Löwis"
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; > instead you can skip or seek to an octet position that can be > calculated

Re: Python Args By Reference

2005-05-10 Thread ncf
As I fail to see how an array could be used in this (my own stupidity?), would you have any such example? For reference, I'm trying to translate this: http://www.cr0.net:8040/code/crypto/sha256/ (Inside sha256_process). Once again, thanks for the patience, I'm still picking up on all the little ti

Re: Python Args By Reference

2005-05-10 Thread Paul Rubin
"ncf" <[EMAIL PROTECTED]> writes: > Since I cannot simply do it the way I had originally seen it, would > there be an alternative method to proforming the operations that I am > missing? Use an array instead of all those named variables. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Graphing Utilities.

2005-05-10 Thread Torsten Bronger
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 active development community, and > it is designed from the ground up not

Re: Python Args By Reference

2005-05-10 Thread ncf
Ok, I'm relatively new to python (< 1 year experiance), yet I have had much experiance with other languages. I never really looked that deeply in the FAQ -- temporary lapse of stupidity(?). Thanks for the link, the concept seems to help. The two issues I am having in grasping all of this are as f

Re: Need a little parse help

2005-05-10 Thread Michael Hartl
Mike mentions an important point, and I've been bitten by the phenomenon Mike mentions---but only when *writing* to files. They should always be closed explicitly, as in f = file(filename, 'w') f.write(somestring) f.close() On the other hand, I've never encountered a problem with the "for line

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Jp Calderone
On Tue, 10 May 2005 19:27:00 -0700, Paul McNett <[EMAIL PROTECTED]> wrote: >Joseph Garvin wrote: >> I was looking at this earlier today because I was curious how they were >> going to handle performance concerns (both due to Python and bandwidth). >> I'm having trouble understanding all of the deta

Re: pyvm -- faster python

2005-05-10 Thread Paul Rubin
"Roger Binns" <[EMAIL PROTECTED]> writes: > Err, you proved my point! Prothon was fine at the VM level. The > author couldn't figure out how to get a decent sized "standard" > library, and ultimately ended up abandoning his VM for .Net since > that gets you a large standard library. Jython also

Re: pyvm -- faster python

2005-05-10 Thread Roger Binns
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Roger Binns" <[EMAIL PROTECTED]> writes: >> That will rule out all the gui frameworks, SSL, cryptography >> and numerous other packages. Have a look at what happened to >> Prothon. > > I think it would be enough to

Re: Encryption with Python?

2005-05-10 Thread Robert Kern
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 the picture. ;-) Well, I'

Weekly Python Patch/Bug Summary

2005-05-10 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 332 open (+10) / 2834 closed ( +2) / 3166 total (+12) Bugs: 927 open ( +7) / 4959 closed ( +7) / 5886 total (+14) RFE : 186 open ( +0) / 157 closed ( +1) / 343 total ( +1) New / Reopened Patches __ Feature e

Re: pyvm -- faster python

2005-05-10 Thread Peter Hansen
Paul Rubin wrote: > "Roger Binns" <[EMAIL PROTECTED]> writes: > >>That will rule out all the gui frameworks, SSL, cryptography >>and numerous other packages. Have a look at what happened to >>Prothon. > > > I think it would be enough to retarget SWIG. > > >>What ultimately killed it was the

Re: Need a little parse help

2005-05-10 Thread Peter Hansen
Delaney, Timothy C (Timothy) wrote: > Peter Hansen wrote: >>In my opinion, if the code fits on one screen and just reads stuff >>from one file and, maybe, writes to another, you can safely and with > ^^ >>clean conscience ignore Mike's advice (but remember it for lat

Jabber/XML-RPC lib in Python?

2005-05-10 Thread Michael
I was wanting to write a program that lets two machines communicate (without user intervention) using XML-RPC over a Jabber network. Does anyone know of an existing library suited to that task? I'd like it if I didn't need to worry about writing any Jabber or XML-RPC code if I could and just wo

Re: pyvm -- faster python

2005-05-10 Thread Paul Rubin
"Roger Binns" <[EMAIL PROTECTED]> writes: > That will rule out all the gui frameworks, SSL, cryptography > and numerous other packages. Have a look at what happened to > Prothon. I think it would be enough to retarget SWIG. > What ultimately killed it was the problem of having a decent > libra

Re: pyvm -- faster python

2005-05-10 Thread Roger Binns
> 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 to make the C library compatibil

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Paul McNett
Joseph Garvin wrote: > I was looking at this earlier today because I was curious how they were > going to handle performance concerns (both due to Python and bandwidth). > I'm having trouble understanding all of the details -- what is the > significance of the use of a torus for the world space? Do

Re: Bandwith Shaping

2005-05-10 Thread flamesrock
sweet, that twisted thing is exactly what I was looking for :) -thanks for all the replies -- http://mail.python.org/mailman/listinfo/python-list

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Terry Reedy
"Joseph Garvin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: > >>Today I followed a link to an interesting Python application I have not >>seen mentioned here before: >>http://solipsis.netofpeers.net/wiki/HomePage/. > I was looking at this earlier today becau

Re: [PyQt] browse for a directory

2005-05-10 Thread Dan Sommers
On 10 May 2005 16:49:25 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > But I can't find any Qt widget that enables me to browse for a > directory! ... Try QFileDialog.getExistingDirectory. HTH, Dan -- Dan Sommers -- http://mail.python.org/mailman/l

Re: Python Args By Reference

2005-05-10 Thread Grant Edwards
On 2005-05-10, Joseph Garvin <[EMAIL PROTECTED]> wrote: > ncf wrote: > >>Hello all, I was wondering if there was any way to pass arguments >>(integer and such) by reference (address of), rather than by value. > > All mutable types in python are passed by reference automatically. So are immutable o

Re: Python Graphing Utilities.

2005-05-10 Thread Kenneth Miller
Beleive i'm going to try out PyX. "Fernando Perez" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Mill wrote: > > > On 5/10/05, Kenneth Miller <[EMAIL PROTECTED]> wrote: > >> Hello All, > >> > >> I am new to Python and i was wondering what graphing utlities would be > >> av

Re: Python Graphing Utilities.

2005-05-10 Thread Kenneth Miller
Unix, not windows >< "Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Kenneth Miller wrote: > > > Hello All, > > > > I am new to Python and i was wondering what graphing utlities would be > > available to me. I have already tried BLT and after weeks of unsuccesful > > in

RE: Need a little parse help

2005-05-10 Thread Delaney, Timothy C (Timothy)
Peter Hansen wrote: > In my opinion, if the code fits on one screen and just reads stuff > from one file and, maybe, writes to another, you can safely and with ^^ > clean conscience ignore Mike's advice (but remember it for later!). Remember, finalisers are not cal

Re: Encryption with Python?

2005-05-10 Thread Peter Hansen
Anthra Norell wrote: > From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> >>.. >>Since good encryption schemes that don't have significant performance >>penalties are widely available, why mess with a crap scheme EVER? Why >>use a solution that "might or might not be adequate" when you can us

Re: Need a little parse help

2005-05-10 Thread Peter Hansen
Mike Meyer wrote: > I'd like to note that failing to close the file explicitly is a bad > habit. You really should invoke the close method, rather than relying > on the garbage collector to close them for you. This means you do need > a variable to hold the file object. 99% of the time nothing bad

Re: A Faster Way...

2005-05-10 Thread gene . tani
hmm, there's lots of ways, huh? you can use itertools.zip instead of builtin zip, or do: map(None, list1, list2) , which will pad the shorter one to match the longer one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Args By Reference

2005-05-10 Thread Dan Bishop
Joseph Garvin wrote: > ncf wrote: > > >Hello all, I was wondering if there was any way to pass arguments > >(integer and such) by reference (address of), rather than by value. > > > >Many thanks in advance. > > > > All mutable types in python are passed by reference automatically. More accurately:

Re: Python Graphing Utilities.

2005-05-10 Thread Fernando Perez
Bill Mill wrote: > On 5/10/05, Kenneth Miller <[EMAIL PROTECTED]> wrote: >> Hello All, >> >> I am new to Python and i was wondering what graphing utlities would be >> available to me. I have already tried BLT and after weeks of unsuccesful >> installs i'd like to find something else. Anything

Re: Need a little parse help

2005-05-10 Thread Mike Meyer
"Michael Hartl" <[EMAIL PROTECTED]> writes: > I'd also like to note that both the inputfiles variable and the > readlines() method are superfluous; to iterate through the file line by > line, use either > > for line in open(inputfilename): > # do something with line > > or (my personal prefere

Re: win32com and IIS

2005-05-10 Thread Roger Upole
Are you authenticating when you connect to the web server ? If you're connected as an anonymous user, you don't have enough privilege. Roger "Chris Curvey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I have a python script that uses the PAMIE libraries to dri

Re: Python Graphing Utilities.

2005-05-10 Thread Ron Adam
Kenneth Miller wrote: > Hello All, > > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend? > > Regards, > Ken BLT does

Re: Trouble saving unicode text to file

2005-05-10 Thread Thomas Bellman
John Machin <[EMAIL PROTECTED]> wrote: > UTF-32 is yet another encoding. [...] > Once you have done codecs.open('inputfile', 'rb', 'utf_32') or > receivedstring.decode('utf_32'), what do you care whether your > *external representation* has fixed-width characters or not? > Putting it another way,

Re: Python Args By Reference

2005-05-10 Thread Grant Edwards
On 2005-05-10, ncf <[EMAIL PROTECTED]> wrote: > Hello all, I was wondering if there was any way to pass arguments > (integer and such) by reference (address of), rather than by value. Yes. All arguments are passed by reference. This must be in the FAQ somewhere... Sure enough. 30 seconds of b

windows directories for curr user

2005-05-10 Thread flamesrock
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 users my documents folder? -thanks -- http://mail.python.

Re: Python Args By Reference

2005-05-10 Thread Joseph Garvin
ncf wrote: >Hello all, I was wondering if there was any way to pass arguments >(integer and such) by reference (address of), rather than by value. > >Many thanks in advance. > >-Wes > > > All mutable types in python are passed by reference automatically. -- http://mail.python.org/mailman/listi

Re: Python 2.4 & BLT ?

2005-05-10 Thread Ron Adam
StepH wrote: > Hi, > > I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) > distibution... > > I'v try to download btlz-for-8.3.exe, but when i try to install it, i've > a msgbox saying to the file is corrupt... > > Any idea ? > > Thanks. > > StepH. Have you tried blt2.4z-for-

Re: Python Graphing Utilities.

2005-05-10 Thread Grant Edwards
On 2005-05-10, Kenneth Miller <[EMAIL PROTECTED]> wrote: > Ahh Thanks for the quick replies. I'm having a look through > them now. What would you consider the best for real time > applications? That depends on how fast "real time" is. I use gnuplot-py for 1 Hz update rates with no issues. 2Hz w

Python Args By Reference

2005-05-10 Thread ncf
Hello all, I was wondering if there was any way to pass arguments (integer and such) by reference (address of), rather than by value. Many thanks in advance. -Wes -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging overlapping spans/ranges

2005-05-10 Thread Jim Sizelove
Bengt Richter wrote: > On Tue, 10 May 2005 15:14:47 +0200, Max M <[EMAIL PROTECTED]> wrote: > > >>I am writing a "find-free-time" function for a calendar. There are a lot >>of time spans with start end times, some overlapping, some not. >> >>To find the free time spans, I first need to convert t

RE: bad argument type for built-in operation

2005-05-10 Thread Delaney, Timothy C (Timothy)
Florian Lindner wrote: > Traceback (most recent call last): > File "visualizer.py", line 8, in ? > main() > File "visualizer.py", line 5, in main > g = GraphCreator(f) > File "/home/florian/visualizer/GraphCreator.py", line 13, in > __init__ self.conf = ConfigReader(config) > F

[PyQt] browse for a directory

2005-05-10 Thread [EMAIL PROTECTED]
Hi people, I'm trying my first little app to create a small, simple application in Python (just to see how PyQt works and all) and I seem to get stuck. I want to make a front-end for ImageMagick's convert for my dad. He usually wants to send people pictures he made with his digital camera and he n

Re: Merging overlapping spans/ranges

2005-05-10 Thread Bengt Richter
On Tue, 10 May 2005 15:14:47 +0200, Max M <[EMAIL PROTECTED]> wrote: >I am writing a "find-free-time" function for a calendar. There are a lot >of time spans with start end times, some overlapping, some not. > >To find the free time spans, I first need to convert the events into a >list of non o

Re: Need a little parse help

2005-05-10 Thread Scott David Daniels
Alex Nordhus wrote: ... > for ln in inputfile.readlines(): > words = string.split(ln) > if len(words) >= 2: > # print (words[1]) Try: print >>outputfile, words[1] --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-lis

Re: Need a little parse help

2005-05-10 Thread Michael Hartl
I'd also like to note that both the inputfiles variable and the readlines() method are superfluous; to iterate through the file line by line, use either for line in open(inputfilename): # do something with line or (my personal preference, since I like to think of the file as a thing rather th

Re: Setting the corner color in rotated PIL images

2005-05-10 Thread rzed
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > "rzed" wrote: > >> I'm using PIL to generate some images which may be rotated at >> the user's option. When they are rotated, the original image is >> cropped in the new image (which is fine), and the corners are >> black (wh

Re: Python Graphing Utilities.

2005-05-10 Thread Kenneth Miller
Ahh Thanks for the quick replies. I'm having a look through them now. What would you consider the best for real time applications? The idea here is to stream in the results from an A/D converter onto a 2d chart. Regards, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging overlapping spans/ranges

2005-05-10 Thread Bengt Richter
On Tue, 10 May 2005 15:14:47 +0200, Max M <[EMAIL PROTECTED]> wrote: >I am writing a "find-free-time" function for a calendar. There are a lot >of time spans with start end times, some overlapping, some not. > >To find the free time spans, I first need to convert the events into a >list of non o

Re: lists in cx_Oracle

2005-05-10 Thread Daniel Dittmar
Andrew Dalke wrote: > It sounds like you're saying that the interface is actually implemented > by passing the execute string and a database-specific dictionary-like > object; the latter created by the DB-API interface. That's the way it's supposed to work. The program prepares a statement with p

Re: A Faster Way...

2005-05-10 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > If I simplify the problem, suppose I have 2 lists like: > > a = range(10) > b = range(20,30) > > What I would like to have, is a "union" of the 2 list in a > single tuple. In other words (Python words...): > > c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, . If the

bad argument type for built-in operation

2005-05-10 Thread Florian Lindner
Hello, I've the traceback: Traceback (most recent call last): File "visualizer.py", line 8, in ? main() File "visualizer.py", line 5, in main g = GraphCreator(f) File "/home/florian/visualizer/GraphCreator.py", line 13, in __init__ self.conf = ConfigReader(config) File "/home/f

Re: Solipsis: Python-powered Metaverse

2005-05-10 Thread Joseph Garvin
Terry Reedy wrote: >Today I followed a link to an interesting Python application I have not >seen mentioned here before: http://solipsis.netofpeers.net/wiki/HomePage/. > >"A peer-to-peer system for a massively multi-participant virtual world " > >It is a France Telecom R&D project, LGPL licenced

Re: Merging overlapping spans/ranges

2005-05-10 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > The linear method: > > You create an array - one bool per minute. For one day 24 * 60 entries > is enough. Spans (Start, End) are in minutes from midnight. Set array > slots in range(Start, End) to True for each input span. > > Scan the array and find metaspans - contig

Re: Trouble saving unicode text to file

2005-05-10 Thread John Machin
On Tue, 10 May 2005 07:59:31 + (UTC), Thomas Bellman <[EMAIL PROTECTED]> wrote: >John Machin <[EMAIL PROTECTED]> writes: > >> Which raises a question: who or what is going to read your file? If a >> Unicode-aware application, and never a human, you might like to >> consider encoding the text a

Re: Encryption with Python?

2005-05-10 Thread Anthra Norell
Original Message - From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> Newsgroups: comp.lang.python To: Sent: Tuesday, May 10, 2005 12:59 AM Subject: Re: Encryption with Python? > .. > Since good encryption schemes that don't have significant performance > penalties are widely availa

Re: Question: Threading and embedding python in an application

2005-05-10 Thread David Harrison
Thanks very much for the responses. I did indeed look carefully at the code I was using for threading and didn't see anything obvious. I include the python excerpt below. For small values of lMax, things seem to work as expected. Larger values seem to cause the thread to either hang or termin

Re: Merging overlapping spans/ranges

2005-05-10 Thread Mike Rovner
Max M wrote: > I am writing a "find-free-time" function for a calendar. There are a lot > of time spans with start end times, some overlapping, some not. > > To find the free time spans, I first need to convert the events into a > list of non overlapping time spans "meta-spans". > "Almost" lin

Re: A Faster Way...

2005-05-10 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > If I simplify the problem, suppose I have 2 lists like: > > a = range(10) > b = range(20,30) > > What I would like to have, is a "union" of the 2 list in a single tuple. In > other words (Python words...): > > c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, . py> a

Re: Need a little parse help

2005-05-10 Thread Matt
Alex Nordhus wrote: > Im trying to grab a colum of data from a text file and write it to a new > file. > I am having trouble getting It to write the data to newlines. Python is > making it one > Long string without any spaces when it writes the file. The first > character is capitalized in colum 2.

Re: Unique Elements in a List

2005-05-10 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > Is there an easy way to grab the Unique elements from a list? > For Example: > data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9] > > what I am looking for is the unique elements 0.4 and 0.9 with their > index from the list. This is basically the same as Fredrik Lundh's solution,

Re: Put a file on an ftp server over ssl

2005-05-10 Thread Daniel Santa Cruz
Sorry Jp, I was using the google client, and it does not automagically put reply marks on the message one is replying too. I'm just a bit frustrated that such a seemingly simple task to get so complicated very easily. I do appreciate your input! Just wish someone had already done it and shared

Re: Question: Threading and embedding python in an application

2005-05-10 Thread Mike Meyer
David Harrison <[EMAIL PROTECTED]> writes: > I am working on an application on Mac OS X that calls out > to python via PyImport_ImportModule(). I find that if > the imported module creates and starts a python thread, > the thread seems to be killed when the import of > the module is complete. I

Re: Merging overlapping spans/ranges

2005-05-10 Thread elbertlev
The linear method: You create an array - one bool per minute. For one day 24 * 60 entries is enough. Spans (Start, End) are in minutes from midnight. Set array slots in range(Start, End) to True for each input span. Scan the array and find metaspans - contiguous sequences of False. -- http://ma

Re: lists in cx_Oracle

2005-05-10 Thread Andrew Dalke
Daniel Dittmar wrote: > Possible workarounds: ... > - create a class for this purpose. Statement are created on the fly, but > with placeholders so you don't run into the SQL Injection problem. As > it's an object, you could cache these generated statements base on the > size of the list > It

Re: Put a file on an ftp server over ssl

2005-05-10 Thread Jp Calderone
On 10 May 2005 11:32:39 -0700, Daniel Santa Cruz <[EMAIL PROTECTED]> wrote: >I looked briefly at this option, but it seems to me that I would have >to learn a whole architecture just to put a file on an ftp server. >Seems like a bit much, don't you think? (In the absence of any quoted material,

Re: Python Graphing Utilities.

2005-05-10 Thread Grant Edwards
On 2005-05-10, Kenneth Miller <[EMAIL PROTECTED]> wrote: > I am new to Python and i was wondering what graphing utlities > would be available to me. Exactly what do you mean by "graphing"? I think pygnuplot pretty much kicks for the graphs and plots I do. -- Grant Edwards gra

Re: Python on Pocket PC (Strong Arm)

2005-05-10 Thread Miradan
rbt wrote: > I'm about to test this out on a new Dell hand held. Anyone had luck with it? > > http://www.murkworks.com/Research/Python/PocketPCPython/Overview Works just fine for me. Running the Axim 600Mhz processor. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Graphing Utilities.

2005-05-10 Thread Thomas Lotze
Kenneth Miller wrote: > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would > recommend? You might also want to check out PyX:

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread Keith Thompson
alex goldman <[EMAIL PROTECTED]> writes: > Lawrence Kirby wrote: [snip] >> My response talks about relevance, not ambiguity. > > Well, your response was irrelevant. This entire discussion is irrelevant to most, if not all, of the newsgroups to which it's being posted. comp.lang.c, where I'm readi

Re: Put a file on an ftp server over ssl

2005-05-10 Thread Daniel Santa Cruz
I looked briefly at this option, but it seems to me that I would have to learn a whole architecture just to put a file on an ftp server. Seems like a bit much, don't you think? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Unique Elements in a List

2005-05-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Edvard Majakari <[EMAIL PROTECTED]> wrote: >James Stroud <[EMAIL PROTECTED]> writes: >> >> from sets import Set >> >> data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9] >> >> [x for x in Set(data) if data.count(x) == 1] > >Um. > >...I must have missed something, but I'll post

Re: Need a little parse help

2005-05-10 Thread James Stroud
Try outputfile.write(words[1]+"\n") On Tuesday 10 May 2005 10:57 am, Alex Nordhus wrote: > outputfile.write(words[1]) -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-l

Re: Need a little parse help

2005-05-10 Thread Alex N
That worked! Thank you so much! -- http://mail.python.org/mailman/listinfo/python-list

Python 2.4 & BLT ?

2005-05-10 Thread StepH
Hi, I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) distibution... I'v try to download btlz-for-8.3.exe, but when i try to install it, i've a msgbox saying to the file is corrupt... Any idea ? Thanks. StepH. -- http://mail.python.org/mailman/listinfo/python-list

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-10 Thread alex goldman
Lawrence Kirby wrote: > On Tue, 10 May 2005 06:52:18 -0700, alex goldman wrote: > >> Lawrence Kirby wrote: > > ... > >>> However the original quote was in the context of regular expressions, so >>> discussion of the terminology used in regular expressions is far more >>> relevant than the termi

Re: Need a little parse help

2005-05-10 Thread Lonnie Princehouse
write() doesn't automatically add a newline like print does. You can either do: outputfile.write(words[1] + '\n') or print >> outputfile, words[1] -- http://mail.python.org/mailman/listinfo/python-list

Python on Pocket PC (Strong Arm)

2005-05-10 Thread rbt
I'm about to test this out on a new Dell hand held. Anyone had luck with it? http://www.murkworks.com/Research/Python/PocketPCPython/Overview -- http://mail.python.org/mailman/listinfo/python-list

Need a little parse help

2005-05-10 Thread Alex Nordhus
Im trying to grab a colum of data from a text file and write it to a new file. I am having trouble getting It to write the data to newlines. Python is making it one Long string without any spaces when it writes the file. The first character is capitalized in colum 2. I am trying to grab the 2nd co

Re: Unique Elements in a List

2005-05-10 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > you forgot enumerate() Oh, oops. > and if you fix that, you'll notice that the output doesn't quite match > the OP's spec: > > > what I am looking for is the unique elements 0.4 and 0.9 with their > > index from the list. Oh, I see, he wante

Re: A Faster Way...

2005-05-10 Thread Andrew Dalke
andrea.gavana wrote: > If I simplify the problem, suppose I have 2 lists like: > > a = range(10) > b = range(20,30) > > What I would like to have, is a "union" of the 2 list in a single tuple. In > other words (Python words...): > > c = (0, 20, 1, 21, 2, 22, 3, 23, 4, 24, 5, 25, . The 'yiel

Re: Python Graphing Utilities.

2005-05-10 Thread Bill Mill
On 5/10/05, Kenneth Miller <[EMAIL PROTECTED]> wrote: > Hello All, > > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend?

Re: Put a file on an ftp server over ssl

2005-05-10 Thread Jp Calderone
On 10 May 2005 09:55:32 -0700, Daniel Santa Cruz <[EMAIL PROTECTED]> wrote: >Hello all! > >I have been troubled for the past couple of days trying to write a >simple script that sends a file to an ftp server. It used to be the >easiest thing in the world, but now the server has changed to a ftps >

Re: Merging overlapping spans/ranges

2005-05-10 Thread Jordan Rastrick
Max M wrote: > I am writing a "find-free-time" function for a calendar. There are a lot > of time spans with start end times, some overlapping, some not. > > To find the free time spans, I first need to convert the events into a > list of non overlapping time spans "meta-spans". > > This nice asci

Solipsis: Python-powered Metaverse

2005-05-10 Thread Terry Reedy
Today I followed a link to an interesting Python application I have not seen mentioned here before: http://solipsis.netofpeers.net/wiki/HomePage/. "A peer-to-peer system for a massively multi-participant virtual world " It is a France Telecom R&D project, LGPL licenced, still in alpha, built on

Re: Python Graphing Utilities.

2005-05-10 Thread Fredrik Lundh
Kenneth Miller wrote: > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend? start here: http://www.python.org/moin/N

Re: object oriented inheritance problem

2005-05-10 Thread Fredrik Lundh
Matthew Thorley wrote: > So is elementtree a module of modules? I didn't know you could do that. "elementtree" is a package. see: http://docs.python.org/tut/node8.html#SECTION00840 for a bit more information. -- http://mail.python.org/mailman/listinfo/python-list

Destructor Woes, was Advice needed on __del__

2005-05-10 Thread phil
> Then i got a tip that you can register a function that needs to be > called when the object is going to be deleted. > For instance to register a function __exit, you do this: > Here is the complete line class with your suggestion: Below is the output. Nice idea, maybe I did something wrong

  1   2   >