Re: Problem creating a shorcut

2008-05-15 Thread Chris
On May 15, 5:13 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > Hi, > > I've had this niggling issue from time to time. I want to create a > shortcut on the user's desktop to a website that specifically loads > Firefox even if Firefox is not the default browser. > > I usually use COM as it allows ve

Re: managing properties/configurations

2008-05-15 Thread Venkatraman.S.
Or a better example would be: I have the params in a config file and import this module: myconfig.py a=10 b=30 c=31 d=40 import myconfig def checkCutoff(self,up,down): .do some processing if (a <= score <= b): result="Bad" elif (c <= score

Professional Grant Proposal Writing Workshop (August 2008: Boston, Massachusetts - University of Phoenix Campus)

2008-05-15 Thread Anthony Jones
The Grant Institute: Certificate in Professional Program Development and Grant Communication will be held at the University of Phoenix - Burlington Campus, August 18 - 22, 2008.  Interested development professionals, researchers, faculty, and graduate students should register as soon as possible

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 23:32:38 -0300, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> escribió: New mantra: Test to the interfaces (as in program to the interfaces) :) Seems reasonable... However, I'm curious on how you would test the mathprogram.divide(x,y) function. But in this case I'm not te

Re: ?

2008-05-15 Thread Alexandr N Zamaraev
urikaluzhny wrote: | It seems that I rather frequently need a list or iterator of the form | [x for x in <> while <>] I can think of two ways to interpret that. I mean like [x for x in if ], only that it breaks the loop when the expression is false. How do you plan to modify B during iteratio

managing properties/configurations

2008-05-15 Thread Venkatraman.S.
Hi, Am sure many would have stumbled on this situation while developing an application in Python which is highly driven by configuration/ properties. I have an application (obviously written in Python) wherein the properties change frequently and the program needs to work according to the new rul

Re: call tree tool?

2008-05-15 Thread castironpi
On May 15, 9:30 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 9:27 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 15, 6:53 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > On May 15, 4:26 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > > On Thu, May 15, 2008 at 5:19 PM,

Re: send yield

2008-05-15 Thread castironpi
On May 15, 7:40 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 7:07 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > On Thu, May 15, 2008 at 8:05 PM, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > > > On Thursday 15 May 2008 09:32:37 am castironpi wrote: > > >> Why can't I write this? > > >>

Re: no inputstream?

2008-05-15 Thread castironpi
On May 15, 6:49 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 6:42 pm, John Krukoff <[EMAIL PROTECTED]> wrote: > > > > > > > On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: > > > On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: > > > > On Thu, 2008-05-15 at 15:35 -0700, max wr

Re: call tree tool?

2008-05-15 Thread castironpi
On May 15, 9:27 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 6:53 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 15, 4:26 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > On Thu, May 15, 2008 at 5:19 PM, jay graves <[EMAIL PROTECTED]> wrote: > > > > On May 15, 3:47 pm, [

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Marcelo de Moraes Serpa
> > That depends on what you consider "valid". Just duplicating the function > code in the test is absurd and pointless. Yes, the code is duplicated, and now I see your point. Thanks! However, that code would always generate the same string (despite the timestamp). But that was a violation of the

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 22:50:21 -0300, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> escribió: Hmm.. I re-read your message and I think I'm approaching testing in a mechanical way, indeed. You're right, my test is kind of pointless, given the objective of the function, which is to generate a diffe

Re: call tree tool?

2008-05-15 Thread castironpi
On May 15, 6:53 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 4:26 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > > > > On Thu, May 15, 2008 at 5:19 PM, jay graves <[EMAIL PROTECTED]> wrote: > > > On May 15, 3:47 pm, [EMAIL PROTECTED] wrote: > > >> I'm cleaning up some old code, and wa

Re: ?

2008-05-15 Thread castironpi
On May 15, 6:52 pm, afrobeard <[EMAIL PROTECTED]> wrote: > l.__delslice__(0,len(l)) is an expression as it returns None which is > a value > > On May 16, 4:23 am, castironpi <[EMAIL PROTECTED]> wrote: > > > > > On May 15, 6:07 pm, afrobeard <[EMAIL PROTECTED]> wrote: > > > > The following proposed

Re: send yield

2008-05-15 Thread castironpi
On May 15, 7:16 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 6:43 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 15, 6:16 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > On May 15, 4:28 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > > > On 15 mai, 16:40,

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 22:44:17 -0300, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> escribió: @Gabriel: I understand what you are saying. It all depends on what you want to test. In this case, I wanted to test the algorithm of the method. The test_generate_chat_dir_string is meant to do just th

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Marcelo de Moraes Serpa
Hmm.. I re-read your message and I think I'm approaching testing in a mechanical way, indeed. You're right, my test is kind of pointless, given the objective of the function, which is to generate a differnt directory name each time it is called. I also found it kind of strange to repeat the implem

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Marcelo de Moraes Serpa
Thank you for the replies. @Gabriel: I understand what you are saying. It all depends on what you want to test. In this case, I wanted to test the algorithm of the method. The test_generate_chat_dir_string is meant to do just that: Check if the generate_chat_dir_string generated a "valid" (accord

Re: Problem creating a shorcut

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 12:13:56 -0300, Mike Driscoll <[EMAIL PROTECTED]> escribió: I've had this niggling issue from time to time. I want to create a shortcut on the user's desktop to a website that specifically loads Firefox even if Firefox is not the default browser. I usually use COM as it al

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Erik Jones
On Thu, May 15, 2008 at 12:21 PM, Marcelo de Moraes Serpa < [EMAIL PROTECTED]> wrote: > Hello, > > So, I have this particular method, generate_chat_dir_string, which should > generate a string in the following format: > "md5hexstring-day-month-year-hour-minute" > > This string will be used to cre

Re: Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 14:21:34 -0300, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> escribió: So, I have this particular method, generate_chat_dir_string, which should generate a string in the following format: "md5hexstring-day-month-year-hour-minute" This string will be used to create a directo

Re: send yield

2008-05-15 Thread castironpi
On May 15, 7:07 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > On Thu, May 15, 2008 at 8:05 PM, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > > On Thursday 15 May 2008 09:32:37 am castironpi wrote: > >> Why can't I write this? > >> -- > >>http://mail.python.org/mailman/listinfo/python-list > > > yiel

RE: How do I use the unpack function?

2008-05-15 Thread Marlin Rowley
Thanks. I'll churn on this for awhile.. > Date: Thu, 15 May 2008 16:00:03 -0700> From: [EMAIL PROTECTED]> To: > python-list@python.org> Subject: Re: How do I use the unpack function?> > > Marlin Rowley wrote:> > Hey Gary!> > Please keep such discussions on the > public python-list -- not perso

rough set & python

2008-05-15 Thread gianluca
I've just wrapped the rough set library from C to python. Could anybody help me to test it and debug? thanks Gianluca -- http://mail.python.org/mailman/listinfo/python-list

Re: send yield

2008-05-15 Thread castironpi
On May 15, 6:43 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 6:16 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 15, 4:28 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > On 15 mai, 16:40, castironpi <[EMAIL PROTECTED]> wrote: > > > > > On May 15, 9:26 am, "D

Re: send yield

2008-05-15 Thread Dan Upton
On Thu, May 15, 2008 at 8:05 PM, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > On Thursday 15 May 2008 09:32:37 am castironpi wrote: >> Why can't I write this? >> -- >> http://mail.python.org/mailman/listinfo/python-list > > yield recieved. > > Thanks. Should that be ack yield ? -- http://mail.p

Re: send yield

2008-05-15 Thread Luis Zarrabeitia
On Thursday 15 May 2008 09:32:37 am castironpi wrote: > Why can't I write this? > -- > http://mail.python.org/mailman/listinfo/python-list yield recieved. Thanks. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.o

Re: Using file objects with elementtree

2008-05-15 Thread castironpi
On May 15, 1:14 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > What do we render? > > Sur. > > Stefan I'm pretty sure 'inputs' come from the real world. I guess the fear would be my hands aren't happy. Concerns include age fitity, a propriety, and making up words. B

Re: call tree tool?

2008-05-15 Thread castironpi
On May 15, 4:26 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > On Thu, May 15, 2008 at 5:19 PM, jay graves <[EMAIL PROTECTED]> wrote: > > On May 15, 3:47 pm, [EMAIL PROTECTED] wrote: > >> I'm cleaning up some old code, and want to see what orphan > >> functions might be sitting around. > > >> Is ther

Re: ?

2008-05-15 Thread afrobeard
l.__delslice__(0,len(l)) is an expression as it returns None which is a value On May 16, 4:23 am, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 6:07 pm, afrobeard <[EMAIL PROTECTED]> wrote: > > > > > The following proposed solution is not intended to be a solution, it > > goes completely aga

Re: no inputstream?

2008-05-15 Thread castironpi
On May 15, 6:42 pm, John Krukoff <[EMAIL PROTECTED]> wrote: > On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: > > On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: > > > On Thu, 2008-05-15 at 15:35 -0700, max wrote: > > > > On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > > > O

Re: ?

2008-05-15 Thread afrobeard
According to http://en.wikipedia.org/wiki/Expression_(programming) "An expression in a programming language is a combination of values, variables, operators, and functions that are interpreted (evaluated) according to the particular rules of precedence and of association for a particular programmi

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:42 -0600, John Krukoff wrote: > On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: > > On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: > > > On Thu, 2008-05-15 at 15:35 -0700, max wrote: > > > > On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > > > On Ma

Re: send yield

2008-05-15 Thread castironpi
On May 15, 6:16 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 4:28 pm, "[EMAIL PROTECTED]" > > > > > > <[EMAIL PROTECTED]> wrote: > > On 15 mai, 16:40, castironpi <[EMAIL PROTECTED]> wrote: > > > > On May 15, 9:26 am, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > > On Thu, May 15, 2008 at

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: > On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: > > On Thu, 2008-05-15 at 15:35 -0700, max wrote: > > > On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > > On May 15, 9:00 pm, max <[EMAIL PROTECTED]> wrote: > > > > > > > > > y

Re: exists=false, but no complaint when i open it!?

2008-05-15 Thread Henrique Dante de Almeida
Em Thu, 15 May 2008 19:20:58 +0200, Andreas Tawn escreveu: >>print os.path.exists('C:\Users\saftarn\Desktop\NetFlixDataSet >>\training_set') returns False... >> >>i have thourogly checked the filename to be correct and if we assume it >>is what could this mean then? >>i had a problem one other tim

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: > On Thu, 2008-05-15 at 15:35 -0700, max wrote: > > On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > On May 15, 9:00 pm, max <[EMAIL PROTECTED]> wrote: > > > > > > > you're right, my java implementation does indeed parse for Id3v2 > >

Re: ?

2008-05-15 Thread castironpi
On May 15, 6:07 pm, afrobeard <[EMAIL PROTECTED]> wrote: > The following proposed solution is not intended to be a solution, it > goes completely against the zen of python. [Type import this into the > python command interpreter] > > I brought it down to two lines:- > > l = range(6) > [1 if b!=4 el

ElementTree and DTDs

2008-05-15 Thread J . Pablo Fernández
Hello, Is ElementTree supposed to load DTDs? I have some xmls heavy on entities and it fails this way: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> filename = "revo/xml/a.x

Re: send yield

2008-05-15 Thread castironpi
On May 15, 4:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 15 mai, 16:40, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 15, 9:26 am, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > On Thu, May 15, 2008 at 9:32 AM, castironpi <[EMAIL PROTECTED]> wrote: > > > > Why can't I wr

Re: basic comparing files

2008-05-15 Thread Gabriel Genellina
En Thu, 15 May 2008 06:02:29 -0300, Beema shafreen <[EMAIL PROTECTED]> escribió: I am comparing two files A and B which has three columns a1, b1 of A and a2, b2 *three* columns? You menction only two of them. say for example if need to compare a1 with a2 and if there are common i have di

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 15:35 -0700, max wrote: > On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > > On May 15, 9:00 pm, max <[EMAIL PROTECTED]> wrote: > > > > > you're right, my java implementation does indeed parse for Id3v2 > > > (sorry for the confusion). i'm using the getrawid3v2() method

Re: ?

2008-05-15 Thread afrobeard
The following proposed solution is not intended to be a solution, it goes completely against the zen of python. [Type import this into the python command interpreter] I brought it down to two lines:- l = range(6) [1 if b!=4 else l.__delslice__(0,len(l)) for b in l][:-1] itertools would still be

Re: How do I use the unpack function?

2008-05-15 Thread Gary Herron
Marlin Rowley wrote: Hey Gary! Please keep such discussions on the public python-list -- not personal e-mail. Scroll down for an answer to your latest question. Here's what I have that renders fine but I see some optimization that can be done (as you mentioned): # Tile Generation # Thi

Re: no inputstream?

2008-05-15 Thread max
On May 15, 6:18 pm, MRAB <[EMAIL PROTECTED]> wrote: > On May 15, 9:00 pm, max <[EMAIL PROTECTED]> wrote: > > > you're right, my java implementation does indeed parse for Id3v2 > > (sorry for the confusion).  i'm using the getrawid3v2() method of this > > bitstream class (http://www.javazoom.net/jav

Re: no inputstream?

2008-05-15 Thread MRAB
On May 15, 9:00 pm, max <[EMAIL PROTECTED]> wrote: > you're right, my java implementation does indeed parse for Id3v2 > (sorry for the confusion). i'm using the getrawid3v2() method of this > bitstream class (http://www.javazoom.net/javalayer/docs/docs0.4/ > javazoom/jl/decoder/Bitstream.html) to

Re: Pass data from Python to C++

2008-05-15 Thread Christian Heimes
brad schrieb: > However, other components can be written in a more user friendly, more > easily maintained language. We've chosen Python for this. The main > question now is how to pass the computationally heavy info to c++ from > within Pyhton. os.system is not ideal. Just wondering how other folk

Re: Making Variable Text Output More Pythonic?

2008-05-15 Thread afrobeard
Arnaud's code wont work if self.opt1 is None, an empty list, an empty tuple, False, etc, because all these evaluate to false. They wont print the internal state of these variables. [Just an informational notice, this may be the behavior you expect] Secondly, I'm not sure if you know the variable n

Re: send yield

2008-05-15 Thread [EMAIL PROTECTED]
On 15 mai, 16:40, castironpi <[EMAIL PROTECTED]> wrote: > On May 15, 9:26 am, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > On Thu, May 15, 2008 at 9:32 AM, castironpi <[EMAIL PROTECTED]> wrote: > > > Why can't I write this? > > > -- > > > Because your antecedent is undefined? > > Of the two ways to

Re: Pydev Console use vs. stdout/stderr

2008-05-15 Thread s0suk3
On May 15, 3:12 pm, RossGK <[EMAIL PROTECTED]> wrote: > Just getting used to the PyDev environment in eclipse by playing with > a few simple programs. I'm also using wxPython GUI stuff. > > I've noticed though that simple print commands in my code cause a > "wxPython:stdout/stderr" popup window to

Re: Class Methods Vs Any Other Callable

2008-05-15 Thread [EMAIL PROTECTED]
On 15 mai, 17:53, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > > FWIW, I wonder why the BDFL choosed to implement __new__ as a > > staticmethod - there are probably some pretty good reasons, but not > > knowing them, it looks like __new__ would hav

Re: FTP upload issue

2008-05-15 Thread afrobeard
First of all, it would be better to use:- ftp.storlines("STOR " + remoteFileName, open(localFileName, "rb")) rather than:- ftp.storlines("STOR" + filename, file(filename)) Since the Python Documentation has this to say for open(): [Although ] When opening a file, it's preferable to use open()

Re: call tree tool?

2008-05-15 Thread Dan Upton
On Thu, May 15, 2008 at 5:19 PM, jay graves <[EMAIL PROTECTED]> wrote: > On May 15, 3:47 pm, [EMAIL PROTECTED] wrote: >> I'm cleaning up some old code, and want to see what orphan >> functions might be sitting around. >> >> Is there a static call tree analyzer for python? > > How about > http://pyc

Re: call tree tool?

2008-05-15 Thread jay graves
On May 15, 3:47 pm, [EMAIL PROTECTED] wrote: > I'm cleaning up some old code, and want to see what orphan > functions might be sitting around. > > Is there a static call tree analyzer for python? How about http://pycallgraph.slowchop.com/ ... Jay Graves -- http://mail.python.org/mailman/listinfo/

Re: exists=false, but no complaint when i open it!?

2008-05-15 Thread s0suk3
On May 15, 12:07 pm, globalrev <[EMAIL PROTECTED]> wrote: > On 15 Maj, 19:04, globalrev <[EMAIL PROTECTED]> wrote: > > > when i try to write to the file... > > > Traceback (most recent call last): > > File "C:\Python25\myPrograms\netflix\netflix.py", line 10, in > > > > d.write('hej du galne

Re: Python and Flaming Thunder

2008-05-15 Thread [EMAIL PROTECTED]
On 15 mai, 19:30, Lie <[EMAIL PROTECTED]> wrote: > On May 15, 4:08 am, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > On 14 mai, 08:08, Lie <[EMAIL PROTECTED]> wrote: > > > > On May 14, 12:51 pm, Lie <[EMAIL PROTECTED]> wrote: > > > > > And your 8 by 8 cross compiler doesn't impress me

call tree tool?

2008-05-15 Thread mh
I'm cleaning up some old code, and want to see what orphan functions might be sitting around. Is there a static call tree analyzer for python? Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I use the unpack function?

2008-05-15 Thread Gary Herron
Marlin Rowley wrote: Gary, I'm getting streaming tile data from a renderer in order to allow the user to see the rendering of tiles in real-time to create the total image. I'm NOT reading an entire image scanline-by-scanline. The renderer streams in a series of floats (for each tile) and I

Re: Making Variable Text Output More Pythonic?

2008-05-15 Thread Arnaud Delobelle
Casey <[EMAIL PROTECTED]> writes: > Hi, > > I have some classes that print variable outputs depending on their > internal state, like so: > > def __str__(self): > out = [] > if self.opt1: out += ['option 1 is %s' % self.opt1'] > if self.opt2: out += ['option 2 is %s' % self.opt2'] >

RE: Building python 2.5 fails on linux 64

2008-05-15 Thread Marc-André Belzile
So I tried with 2.6a3 and 3.0 and I ended up with the same error, but python 2.5.2 works though. Seems like something is missing from the build instructions for the newer versions I guess. -mab From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Be

How to make an Activation Issue?

2008-05-15 Thread David Anderson
Hi, How can I make something like this... The final user installs the app The app Runs and the User has to authenticate the app, which will be by acessing a remote file on a Server, If he user dont authenticate the program will run only for 3 days, after that it will be blocked until the user authe

FTP upload issue

2008-05-15 Thread davidj411
I am having difficulty uploading a text file using Python 2.5 on MAC OSX. SCRIPT filename='/tmp/mac.info2.txt' fh=open(filename,'w') fh.write('yes, i have a mac but don't hold that against me - just example data') fh.close() from ftplib import FTP 'host, username, and password are string variab

Making Variable Text Output More Pythonic?

2008-05-15 Thread Casey
Hi, I have some classes that print variable outputs depending on their internal state, like so: def __str__(self): out = [] if self.opt1: out += ['option 1 is %s' % self.opt1'] if self.opt2: out += ['option 2 is %s' % self.opt2'] return '\n'.join(out) Is there any way to

Pydev Console use vs. stdout/stderr

2008-05-15 Thread RossGK
Just getting used to the PyDev environment in eclipse by playing with a few simple programs. I'm also using wxPython GUI stuff. I've noticed though that simple print commands in my code cause a "wxPython:stdout/stderr" popup window to display any print's I might be dumping out, rather than going

Re: Problem creating a shorcut

2008-05-15 Thread Mike Driscoll
On May 15, 2:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Mike Driscoll wrote: > > Hi, > > > I've had this niggling issue from time to time. I want to create a > > shortcut on the user's desktop to a website that specifically loads > > Firefox even if Firefox is not the default browser. > > > I

Re: Pass data from Python to C++

2008-05-15 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, brad <[EMAIL PROTECTED]> wrote: > I have some c++ binaries that do rather intense number computations. > They do it well and rather quickly compared to other languages (not just > Python). ... > > However, other components can be written in a more user friendly,

Re: no inputstream?

2008-05-15 Thread max
you're right, my java implementation does indeed parse for Id3v2 (sorry for the confusion). i'm using the getrawid3v2() method of this bitstream class (http://www.javazoom.net/javalayer/docs/docs0.4/ javazoom/jl/decoder/Bitstream.html) to return an inputstream that then i buffer and parse. apolog

RE: How do I use the unpack function?

2008-05-15 Thread Marlin Rowley
Gary, I'm getting streaming tile data from a renderer in order to allow the user to see the rendering of tiles in real-time to create the total image. I'm NOT reading an entire image scanline-by-scanline. The renderer streams in a series of floats (for each tile) and I build this tile up fro

test

2008-05-15 Thread Casey McGinty
test -- http://mail.python.org/mailman/listinfo/python-list

Re: Computer

2008-05-15 Thread Mensanator
On May 15, 1:14 pm, gaojihuiyuan <[EMAIL PROTECTED]> wrote: > Plastic Coat Your Cedar with EPL > EPL is a clear thin polymer coat that will maintain the bright cedar > wood look. Buy online today.http://www.healthhuman.com.cn/Computer.htm > > Cedar Wood > Find Deals on Cedar Wood and other Home & G

Re: Pass data from Python to C++

2008-05-15 Thread Gary Herron
brad wrote: I have some c++ binaries that do rather intense number computations. They do it well and rather quickly compared to other languages (not just Python). An example: [EMAIL PROTECTED]:~/$ date && ./compute.cpp.o < 1_million.txt > /dev/null && date Thu May 15 13:08:28 EDT 2008 Thu Ma

Re: Running an interactive interpreter inside a python

2008-05-15 Thread R. Bernstein
castironpi <[EMAIL PROTECTED]> writes: > On May 15, 6:26 am, [EMAIL PROTECTED] (R. Bernstein) wrote: >> "Alan J. Salmoni" <[EMAIL PROTECTED]> writes: >> >> > I'm not sure if this is exactly what you're after, but try looking >> > into the 'code' module. >> >> > It's fairly easy to make an interact

Re: Problem creating a shorcut

2008-05-15 Thread Larry Bates
Mike Driscoll wrote: Hi, I've had this niggling issue from time to time. I want to create a shortcut on the user's desktop to a website that specifically loads Firefox even if Firefox is not the default browser. I usually use COM as it allows very specific settings of the shortcut, such as the

Re: Dbase / foxpro files

2008-05-15 Thread Larry Bates
Johny wrote: Is there a module for reading/modifing db files from Python? Thanks for help B. Just create a ODBC DataSource (Control Panel/Administrative Tools/ DataSources) and use ODBC to read/write. -Larry -- http://mail.python.org/mailman/listinfo/python-list

Computer

2008-05-15 Thread gaojihuiyuan
Plastic Coat Your Cedar with EPL EPL is a clear thin polymer coat that will maintain the bright cedar wood look. Buy online today. http://www.healthhuman.com.cn/Computer.htm Cedar Wood Find Deals on Cedar Wood and other Home & Garden Products at DealTime. Choose from millions of deals. Save time a

Re: Using file objects with elementtree

2008-05-15 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > What do we render? Sur. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Fast Mersenne Twister

2008-05-15 Thread bearophileHUGS
This may be interesting for Python developers of the random module, "SIMD-oriented Fast Mersenne Twister (SFMT): twice faster than Mersenne Twister": http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/ One function may be useful to generate integers (randint, randrange, choice, shuffle, etc), t

Re: pyserial and file open conflict?

2008-05-15 Thread Grant Edwards
On 2008-05-15, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a small but rather annoying problem with pyserial. I want to > open a file on disk for reading and then open a com-port, write lines > from the file to the port and then read something back and compare it > to the next line in th

Re: Python and Flaming Thunder

2008-05-15 Thread Lie
On May 15, 4:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 14 mai, 08:08, Lie <[EMAIL PROTECTED]> wrote: > > > On May 14, 12:51 pm, Lie <[EMAIL PROTECTED]> wrote: > > > > And your 8 by 8 cross compiler doesn't impress me at all, they're all > > > based on x86/IA-32 architecture which i

Pass data from Python to C++

2008-05-15 Thread brad
I have some c++ binaries that do rather intense number computations. They do it well and rather quickly compared to other languages (not just Python). An example: [EMAIL PROTECTED]:~/$ date && ./compute.cpp.o < 1_million.txt > /dev/null && date Thu May 15 13:08:28 EDT 2008 Thu May 15 13:08:31

Handling test data that depends on temporal data (that might change while the test runs)

2008-05-15 Thread Marcelo de Moraes Serpa
Hello, So, I have this particular method, generate_chat_dir_string, which should generate a string in the following format: "md5hexstring-day-month-year-hour-minute" This string will be used to create a directory in the filesystem. I'm trying to adopt the TDD approach, so, I'm starting by testi

RE: exists=false, but no complaint when i open it!?

2008-05-15 Thread Andreas Tawn
>print os.path.exists('C:\Users\saftarn\Desktop\NetFlixDataSet >\training_set') returns False... > >i have thourogly checked the filename to be correct and if we assume >it is what could this mean then? >i had a problem one other time when i had renamed a file but windows >didnt rename it compeltel

Re: no inputstream?

2008-05-15 Thread Hrvoje Niksic
"John Krukoff" <[EMAIL PROTECTED]> writes: > I'd love to know how Java handles all that automatically through a > generic stream interface, though. It could be that their stream interface supports seek(), and that seek()ing on HTTP connection sends the appropriate range request and, if it fails,

Re: exists=false, but no complaint when i open it!?

2008-05-15 Thread globalrev
On 15 Maj, 19:04, globalrev <[EMAIL PROTECTED]> wrote: > when i try to write to the file... > > Traceback (most recent call last): > File "C:\Python25\myPrograms\netflix\netflix.py", line 10, in > > d.write('hej du galne kock') > IOError: [Errno 0] Error damn i take a break lol. r+ ldo whe

Re: generate all possible math expr of one term

2008-05-15 Thread Jon Harrop
[EMAIL PROTECTED] wrote: > Here's a example of Expressiveness of a Language. > > The following is Mathematica code that generates all possible > equations of one term involving trig function. (tweak the funList and > nesting level to define what ?all possible? means. if nesting level is > 2, it ta

Re: How do I use the unpack function?

2008-05-15 Thread Gary Herron
John Machin wrote: On May 16, 2:11 am, Gary Herron <[EMAIL PROTECTED]> wrote: Marlin Rowley wrote: All: I've got a script that runs really slow because I'm reading from a stream a byte at a time: // TERRIBLE for y in range( height ): for color in range(4):

Re: exists=false, but no complaint when i open it!?

2008-05-15 Thread globalrev
when i try to write to the file... Traceback (most recent call last): File "C:\Python25\myPrograms\netflix\netflix.py", line 10, in d.write('hej du galne kock') IOError: [Errno 0] Error -- http://mail.python.org/mailman/listinfo/python-list

Re: exists=false, but no complaint when i open it!?

2008-05-15 Thread globalrev
yeah i was unclear but i tested different stuff at the same time. and flim is not misspelled i just created it and jolted osmething down and it became flim... print os.path.exists('C:/Python25/myPrograms/netflix/flim.txt') d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') #print d.readline()

Re: file open/read/name etc, not working

2008-05-15 Thread globalrev
On 15 Maj, 18:33, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > >import os > > >print os.path.exists('C:/Python25/myPrograms/netflix/test.txt') > >d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') > >d.readline() > > >returns true in the shell but prints no text even though the document > >conta

Re: Dbase / foxpro files

2008-05-15 Thread Claudio Driussi
Johny ha scritto: Is there a module for reading/modifing db files from Python? Thanks for help B. If your target is Windows, you can try mediator components http://www.otc.pl/download/ which are COM objects based on xHarbour and which give you full access to DBF and index. You need PythonWin

RE: How do I use the unpack function?

2008-05-15 Thread Marlin Rowley
Sorry Gary, I found out that I wasn't reassigning the array back once I got the first 4 bytes. I don't mean to appear lazy..:( Thanks for the help! -M > Date: Thu, 15 May 2008 09:51:22 -0700> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: python-list@python.org> Subject: Re: How

RE: file open/read/name etc, not working

2008-05-15 Thread Andreas Tawn
>import os > >print os.path.exists('C:/Python25/myPrograms/netflix/test.txt') >d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') >d.readline() > >returns true in the shell but prints no text even though the document >contains text. > >d.name returns nothing, d.name() raises an error. >-- >http

Re: How do I use the unpack function?

2008-05-15 Thread Gary Herron
Marlin Rowley wrote: Thanks for the advice! However, I assumed that: fourbytes = pixelComponent[:4] would shave that byte off the array in pixelComponent. So that the array is smaller by one on the next iteration. Is this not the case? You don't need the newsgroup to answer this kind of

Re: How do I use the unpack function?

2008-05-15 Thread John Machin
On May 16, 2:11 am, Gary Herron <[EMAIL PROTECTED]> wrote: > Marlin Rowley wrote: > > All: > > > I've got a script that runs really slow because I'm reading from a > > stream a byte at a time: > > > // TERRIBLE > > for y in range( height ): > > for color in range(4): > > for x i

RE: How do I use the unpack function?

2008-05-15 Thread Marlin Rowley
Thanks for the advice! However, I assumed that: fourbytes = pixelComponent[:4] would shave that byte off the array in pixelComponent. So that the array is smaller by one on the next iteration. Is this not the case? I'm getting weird results now.. -M > Date: Thu, 15 May 2008 09:11:23

Re: pyserial and file open conflict?

2008-05-15 Thread Henrique Dante de Almeida
Em Thu, 15 May 2008 08:03:40 -0700, p.wallstedt escreveu: > Hi all! > > I have a small but rather annoying problem with pyserial. I want to open > a file on disk for reading and then open a com-port, write lines from > the file to the port and then read something back and compare it to the > next

Re: file open/read/name etc, not working

2008-05-15 Thread John Machin
On May 16, 2:12 am, globalrev <[EMAIL PROTECTED]> wrote: > import os > > print os.path.exists('C:/Python25/myPrograms/netflix/test.txt') > d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') Two different paths again. > d.readline() This reads one line and then does absolutely nothing with it

Re: cgitb performance issue

2008-05-15 Thread Ethan Furman
Gabriel Genellina wrote: En Wed, 14 May 2008 13:51:40 -0300, Ethan Furman <[EMAIL PROTECTED]> escribió: Gabriel Genellina wrote: En Mon, 05 May 2008 15:56:26 -0300, Ethan Furman <[EMAIL PROTECTED]> escribió: I tried adding a form to our website for uploading large files. Personally, I

Re: file open/read/name etc, not working

2008-05-15 Thread globalrev
On 15 Maj, 18:12, globalrev <[EMAIL PROTECTED]> wrote: > import os > > print os.path.exists('C:/Python25/myPrograms/netflix/test.txt') > d=open('C:/Python25/myPrograms/netflix/flim.txt', 'r') > d.readline() > > returns true in the shell but prints no text even though the document > contains text. >

RE: exists=false, but no complaint when i open it!?

2008-05-15 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Reedick, Andrew > Sent: Thursday, May 15, 2008 12:11 PM > To: globalrev; python-list@python.org > Subject: RE: exists=false, but no complaint when i open it!? > > > > > print os.path.exists('C

  1   2   >