Re: i am new to python-Please somebody help

2007-08-03 Thread Hendrik van Rooyen
"gregarican" wrote: > Maybe it's just me but the word "grovelling" just doesn't ring of > newbie friendliness. To each their own I guess. Kind of like the > Smalltalk list where a few respondents are really dry. Someone will > post asking something like "Can I use Smalltalk to do X so that it >

Re: Memory Leak with Tkinter Canvas (Python 2.5 Win32)

2007-08-03 Thread Hendrik van Rooyen
"frikk" wrote: > 1. ... Am I somehow leaving > objects laying around that aren't being deleted? Is create_rectangle > not the appropriate function to use?) Try calling the canvas's delete method with the old rectangle before making a new one. - Hendrik -- http://mail.python.org/mailma

Re: i am new to python-Please somebody help

2007-08-03 Thread Hendrik van Rooyen
"Bruno Desthuilliers" wrote: >Now if you want some examples of definitively "rude" newsgroups, I >suggest you take your chance on other newsgroups in the comp.* >hierarchy... I know someone who derisively refers to anybody that is associated with computers in any way as a "Pencil Neck". This

File Handling & TRY/EXCEPT

2007-08-03 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for some advice on how best to handle file read/write errors with try/except as i'm a little vague on this, I have a small memory leak in my app and I'm starting to think its generated by my log file write. For an example of the function look below. def addApp

Re: __call__ considered harmful or indispensable?

2007-08-03 Thread Bruno Desthuilliers
Skip Montanaro a écrit : >>> In this case there was a bug. Depending on inputs, sometimes obj >>> initialized to a class, sometimes an instance of that class. (I fixed >>> that too while I was at it.) The problem was that the use of __call__ >>> obscured the underlying bug by making the instance

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Laurent Pointal
Stef Mientki a écrit : > hello, > > I discovered that boolean evaluation in Python is done "fast" > (as soon as the condition is ok, the rest of the expression is ignored). > > Is this standard behavior or is there a compiler switch to turn it on/off ? As it was replied, its standard behavior an

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Laurent Pointal
Stef Mientki a écrit : > > def Some_Function (const): > print 'Ive been here', const > return True > > A = True > > if A and Some_Function (4 ): > print 'I knew it was True' > else: > print 'I''ll never print this' > > > > Ive been here 4 > I knew it was True > > I was expec

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Stef Mientki
John Machin wrote: > On Aug 3, 8:55 am, Ian Clark <[EMAIL PROTECTED]> wrote: >> Stef Mientki wrote: >>> hello, >>> I discovered that boolean evaluation in Python is done "fast" >>> (as soon as the condition is ok, the rest of the expression is ignored). >>> Is this standard behavior or is there a c

Re: Error with Tkinter and tkMessageBox

2007-08-03 Thread Fabio Z Tessitore
Il Fri, 03 Aug 2007 12:38:09 +1000, John McMonagle ha scritto: > Fabio Z Tessitore wrote: >> I've tried to use Twm and SURPRISE! it works!!! >> >> Can you say why? How can I fix the prob with Gnome? >> >> Thanks > > I don't know why it doesn't work correctly on the version of gnome which > you

Re: How to read information from tables in HTML?

2007-08-03 Thread Stefan Behnel
ZelluX wrote: > I'm confronted with some trouble when dealing with html files. > > The html files contain javascript and some information stored in tables. > And it seems that they're not well-formed, when parsed with minidom, it > will say "mismatched tag". minidom deals with XML. You're trying

How to read information from tables in HTML?

2007-08-03 Thread ZelluX
Hi, all I'm confronted with some trouble when dealing with html files. The html files contain javascript and some information stored in tables. And it seems that they're not well-formed, when parsed with minidom, it will say "mismatched tag". Then how can i get information from those files? Is th

Re: How to create python script which can create csv we file with relationship

2007-08-03 Thread André Martins
http://docs.python.org/lib/module-csv.html 2007/8/3, Sonu <[EMAIL PROTECTED]>: > > hello, > i need to create script > that can create a csv file as i want > for example i have two table in database that are person ,country > if i want to create csv file to person,then wht to do ,, > how to connect

Re: File Handling & TRY/EXCEPT

2007-08-03 Thread Alex Popescu
"Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > This is a multipart message in MIME format. > > --=_NextPart_000_00B0_01C7D5B0.02EB8BA0 > Hello Guys, > > > > I'm looking for some advice on how best to handle file read/write > errors with try/except as

Re: Emacs + python

2007-08-03 Thread hg
Greg Donald wrote: > On 8/1/07, hg <[EMAIL PROTECTED]> wrote: >> Are there any cscope & ECB equivalent for Python ? > > ECB is not language specific. It works the same for browsing Python > code as any other language. > > > -- > Greg Donald > http://destiney.com/ Thanks, I realized my mistake

Replacing _xmlplus.dom.minidom with xml.dom.minidom

2007-08-03 Thread aine_canby
Hi, I'm working with a number of scripts which were written years ago for my company for Python 2.2, and I'd like to update for Python 2.5. I have written a script to add # -*- coding: cp1252 -*- to the beginning of all my scripts, and that has fixed the encoding issues. Another issue was the use

RE: File Handling & TRY/EXCEPT

2007-08-03 Thread Robert Rawlins - Think Blue
Thanks for your ideas guys, I'm unfortunately tied to 2.4 so don't have the full try except status, but I'm now working with the following code: def addApp(self, event): try: logfile = open('/pblue/new/Logs/Application.csv','a')

Re: Help: GIS

2007-08-03 Thread kyosohma
On Aug 2, 10:46 pm, zxo102 <[EMAIL PROTECTED]> wrote: > Hi, > I am new in GIS area and need your suggestions for where I can > start from. I have a python based web application with a database. > Now I would like to add a GIS map into my application. When a user > clicks a certain area in the

Re: File Handling & TRY/EXCEPT

2007-08-03 Thread Steve Holden
Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I’m looking for some advice on how best to handle file read/write errors > with try/except as i’m a little vague on this, I have a small memory > leak in my app and I’m starting to think its generated by my log file > write. For an exa

Re: How to create python script which can create csv we file with relationship

2007-08-03 Thread kyosohma
On Aug 3, 6:45 am, Sonu <[EMAIL PROTECTED]> wrote: > hello, > i need to create script > that can create a csv file as i want > for example i have two table in database that are person ,country > if i want to create csv file to person,then wht to do ,, > how to connect database,how to create csv of

Re: wxpython TreeCtrl with os.listdir

2007-08-03 Thread kyosohma
On Aug 3, 6:56 am, [EMAIL PROTECTED] wrote: > Hello, > > Does anybody know how can I "insert" os.listdir items in wx python > TreeCtrl and every item assign adequately > icon on this example > import wx > > class TestFrame(wx.Frame): > def __init__(self): > wx.Frame.__init__(self, None,

distutils and development workflow

2007-08-03 Thread Brian Blais
Hello, I was wondering how people organize their projects while they are developing, and packaging with distutils. For example, so many python packages let me download, then do "sudo python setup.py install" and they are put in the right place. The developers of those packages, however,

Re: Memory Leak with Tkinter Canvas (Python 2.5 Win32)

2007-08-03 Thread frikk
On Aug 3, 2:26 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "frikk" wrote: > > 1. ... Am I somehow leaving > > objects laying around that aren't being deleted? Is create_rectangle > > not the appropriate function to use?) > > Try calling the canvas's delete method with the old rect

Re: __call__ considered harmful or indispensable?

2007-08-03 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > In this particular case it was clearly unnecessary and just obfuscated > the code. I'm wondering, are there some general cases where __call__ > methods of a user-defined class are simply indispensable? I don't know that you couldn't live without __call__, but it would

RE: Replacing _xmlplus.dom.minidom with xml.dom.minidom

2007-08-03 Thread Robert Rawlins - Think Blue
Just as a heads up, minidom is pretty inefficient and difficult to work with too. On someone else's advice I switched over to ElementTree and have been really pleased with the results, its much simpler to work with and more efficient too. Rob -Original Message- From: [EMAIL PROTECTED] [m

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Bruno Desthuilliers
Stef Mientki a écrit : (snip) > Gabriel: you pointed me to this page: > The exact behavior is defined in the Language Reference > > > > or_test ::= and_test | or_test "or" and_test > > Can you imagine, while I'm not a programmer, just a huma

How to log python Shell results

2007-08-03 Thread Colly
How do I output the IDLE 1.2.1 Python Shell results to a log file. -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse/PyDev question.

2007-08-03 Thread André Martins
I think you can download the eclipse plataform e get pydev through eclipse update. Eclipse Europa distro is a group of 21 projects like jdt and cdt not correlate to python. []'s -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient Rank Ordering of Nested Lists

2007-08-03 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > A naive approach to rank ordering (handling ties as well) of nested > lists may be accomplished via: > >def rankLists(nestedList): > def rankList(singleList): > sortedList = list(singleList) > sortedList.sort() >

Re: Eclipse/PyDev question.

2007-08-03 Thread Danyelle Gragsone
I wonder how long before they come out with a python version of eclipse. I know there is a C/C++ now. Danyelle -- http://mail.python.org/mailman/listinfo/python-list

Re: How to log python Shell results

2007-08-03 Thread kyosohma
On Aug 3, 10:14 am, Colly <[EMAIL PROTECTED]> wrote: > How do I output the IDLE 1.2.1 Python Shell results to a log file. Redirect stdout to the log file. out = sys.stdout # save stdout for restoration later f = open(r'c:\test\test.log', 'w') sys.stdout = f # now stdout is redirected # do so

Re: Best way to capture output from an exec'ed (or such) script?

2007-08-03 Thread [EMAIL PROTECTED]
On Aug 2, 7:32 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > If your web server is multithreaded (or you use some other way to process > many simultaneous requests) you have to be more careful - remember that > sys.stdout is global, you must find a way to distinguish between output > from d

Re: Eclipse/PyDev question.

2007-08-03 Thread gregarican
On Aug 3, 10:58 am, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > this is actually a question to those of us who use Eclipse and Pydev > as their main Python developing environment. As i use Eclipse (3.3 > Europa) only for Python and i have nothing to do with Java, is there a > way to disable/unin

Re: Eclipse/PyDev question.

2007-08-03 Thread king kikapu
On Aug 3, 5:00 pm, gregarican <[EMAIL PROTECTED]> wrote: > On Aug 3, 10:58 am, king kikapu <[EMAIL PROTECTED]> wrote: > > > Hi, > > this is actually a question to those of us who use Eclipse and Pydev > > as their main Python developing environment. As i use Eclipse (3.3 > > Europa) only for Python

xlrd question

2007-08-03 Thread JYOUNG79
When running 'python setup.py install' to install items for xlrd to work, does anybody know what items are installed and where items are installed at on a Mac (OS 10.4)? I'm assuming it mainly uses things out of the xlrd folder, but was curious if it copies files to other locations. Thanks.

Re: Replacing _xmlplus.dom.minidom with xml.dom.minidom

2007-08-03 Thread Stefan Behnel
Robert Rawlins - Think Blue wrote: > Just as a heads up, minidom is pretty inefficient and difficult to work with > too. > > On someone else's advice I switched over to ElementTree and have been really > pleased with the results, its much simpler to work with and more efficient > too. /and/ lxml.

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Roel Schroeven
Paul Boddie schreef: > On 3 Aug, 11:45, Stef Mientki <[EMAIL PROTECTED]> wrote: >> Sorry, my question missed the essential "NOT", >> here is an example, that behaves different in Delphi, >> (so I guess Delphi is not a real language ;-) > > Delphi is based on Pascal, and from what I can recall from

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Paul Boddie
On 3 Aug, 11:45, Stef Mientki <[EMAIL PROTECTED]> wrote: > > Sorry, my question missed the essential "NOT", > here is an example, that behaves different in Delphi, > (so I guess Delphi is not a real language ;-) Delphi is based on Pascal, and from what I can recall from my university textbook, the

Eclipse/PyDev question.

2007-08-03 Thread king kikapu
Hi, this is actually a question to those of us who use Eclipse and Pydev as their main Python developing environment. As i use Eclipse (3.3 Europa) only for Python and i have nothing to do with Java, is there a way to disable/uninstall some Java-specific stuff and make the environment actually more

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Fri, 03 Aug 2007 10:20:59 +0200, Bruno Desthuilliers wrote: > >> Joshua J. Kugler a écrit : >>> On Thursday 02 August 2007 15:19, Evan Klitzke wrote: > I discovered that boolean evaluation in Python is done "fast" > (as soon as the condition is ok, the rest o

Eclipse and Python

2007-08-03 Thread Danyelle Gragsone
Does anyone have any suggested websites for learning Eclipse the python way? thanks, Danyelle -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse/PyDev question.

2007-08-03 Thread Danyelle Gragsone
I just found this: http://www.easyeclipse.org/site/distributions/python.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient Rank Ordering of Nested Lists

2007-08-03 Thread Neil Cerutti
On 2007-08-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > A naive approach to rank ordering (handling ties as well) of nested > lists may be accomplished via: > >def rankLists(nestedList): > def rankList(singleList): > sortedList = list(singleList) > sortedList.sor

Re: XML Processing

2007-08-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >On Aug 2, 2:09 pm, Jay Loden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > On Aug 2, 1:45 pm, Roman <[EMAIL PROTECTED]> wrote: >> >> Is there a package that converts a string that contains special >> >> characters in xml to

Idlelib TreeWidget (UNCLASSIFIED)

2007-08-03 Thread Vines, John (Civ, ARL/CISD)
Classification: UNCLASSIFIED Caveats: NONE Does anyone have any experience using the idlelib TreeWidget module? I am using it to display XML files and would like to include some editing capabilities. Does anyone have any examples I could take a look at? Thanks, John Classification: UNCLA

Re: replacement for execfile

2007-08-03 Thread Stefan Bellon
On Sun, 29 Jul, Steven D'Aprano wrote: > (1) Don't use eval, exec or execfile. Ok, then I would really like to ask a question about how to solve my problem without execfile ... ;-) I am embedding Python on Windows using MinGW. In order to execute a Python script file, calling any of the PyRun_Fi

Devloper Wanted For Debugging / Optimizing

2007-08-03 Thread Robert Rawlins - Think Blue
Hello Chaps, I've been writing (with your help) a small application over the past couple of months but I'm really struggling to iron out all of the creases and its seems to spring a few memory leaks that I'm unable to find and plug. It's only a small app, around 500 lines of code I would guess,

Using cursor.callproc with zxJDBC

2007-08-03 Thread Vaughan V Ashe
Hi We would like to use the store proc. We are using a postgreql database. what we have working so far is: params = [4,4,2] curs.callproc("update_job_status",params) db.commit() #print db #print curs.description result = curs.fetchall() if result == 1: print "good one" else: p

Re: Email

2007-08-03 Thread Rohan
On Aug 2, 1:06 pm, Laurent Pointal <[EMAIL PROTECTED]> wrote: > Rohan wrote: > > I was wondering if there could be an arrangement where a file could be > > attached and send as an email. > > For ex > > f = open(add.txt,w) > > f.write('python') > > f.close() > > > Now I would like to send an email w

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Bruno Desthuilliers
Joshua J. Kugler a écrit : > On Thursday 02 August 2007 15:19, Evan Klitzke wrote: >>> I discovered that boolean evaluation in Python is done "fast" >>> (as soon as the condition is ok, the rest of the expression is ignored). >> This is standard behavior in every language I've ever encountered. >

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Neil Cerutti
On 2007-08-03, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > But that's specific to the syntax of the language. You could, > if you choose, design a language where elif was unnecessary: > > if condition: > pass > else if another_condition: > pass > > What advantage is there to "elif", apart

Re: Bug in execfile?

2007-08-03 Thread Peter Otten
Fernando Perez wrote: > I'm finding the following behavior truly puzzling, but before I post a bug > report on the site, I'd rather be corrected if I'm just missing somethin > obvious. > > Consider the following trivial script: > > from math import sin, pi > wav = lambda k,x: sin(2*pi*k*x) > pri

Re: Best way to capture output from an exec'ed (or such) script?

2007-08-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Thu, 02 Aug 2007 16:48:06 -0300, <[EMAIL PROTECTED]> escribió: > >> In any case. I've added some minor scripting support, so that you can >> write dynamic pages in Python. To do this, I use execfile(), and pass >> the

Global package variable, is it possible?

2007-08-03 Thread Chris Allen
Hello fellow pythoneers. I'm stumped on something, and I was hoping maybe someone in here would have an elegant solution to my problem. This is the first time I've played around with packages, so I'm probably misunderstanding something here... Here's what I'd like to do in my package. I want my

wxpython TreeCtrl with os.listdir

2007-08-03 Thread vedrandekovic
Hello, Does anybody know how can I "insert" os.listdir items in wx python TreeCtrl and every item assign adequately icon on this example import wx class TestFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="simple tree with icons", size=(400,500)) il

How to create python script which can create csv we file with relationship

2007-08-03 Thread Sonu
hello, i need to create script that can create a csv file as i want for example i have two table in database that are person ,country if i want to create csv file to person,then wht to do ,, how to connect database,how to create csv of interrelated field eg :in person table :country_id (which is pr

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Stef Mientki
Laurent Pointal wrote: > Stef Mientki a écrit : >> >> def Some_Function (const): >> print 'Ive been here', const >> return True >> >> A = True >> >> if A and Some_Function (4 ): >> print 'I knew it was True' >> else: >> print 'I''ll never print this' >> >> >> >> Ive been here 4 >

suppress pop up windwo

2007-08-03 Thread diego
I'm automating the generation of PDF out of Excel sheets through win32com. I nearly accomplished everything I wanted, but one problem is still left: when I calling the print job through following code: xl.Selection.PrintOut(Copies=1,Collate=True) then a window pops up, where I have to input the

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Diez B. Roggisch
Stef Mientki schrieb: > John Machin wrote: >> On Aug 3, 8:55 am, Ian Clark <[EMAIL PROTECTED]> wrote: >>> Stef Mientki wrote: hello, I discovered that boolean evaluation in Python is done "fast" (as soon as the condition is ok, the rest of the expression is ignored). Is th

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Ed Leafe
On Aug 3, 2007, at 11:57 AM, Bruno Desthuilliers wrote: > Sorry, I forgot to mention the language did not allow to have else > & if > in the same statement. IOW : > > if some_condition then >do_sometehing > else >if some_other_condition then > do_something_else >else > if y

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Steven D'Aprano
On Fri, 03 Aug 2007 10:20:59 +0200, Bruno Desthuilliers wrote: > Joshua J. Kugler a écrit : >> On Thursday 02 August 2007 15:19, Evan Klitzke wrote: I discovered that boolean evaluation in Python is done "fast" (as soon as the condition is ok, the rest of the expression is ignored). >>>

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Irmen de Jong
John Machin wrote: > > (you_are_confused and/or > function_returns_bool_but_has__side_effects()) > That above expression should be written more explicitly like: function_result = function_returning_bool_but_with_side_effects() if you_are_confused or function_result: do_something_nice() -

Coroutine API

2007-08-03 Thread Calvin Spealman
I was talking to some other people, who all were working on different schedulers and such for coroutines. We decided to work out a common API to give coroutines, and common rules to passing data between them, etc. I am wondering now if there is already work on this, or some schedulers I'm not aware

Re: Efficient Rank Ordering of Nested Lists

2007-08-03 Thread pyscottishguy
On Aug 2, 10:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > A naive approach to rank ordering (handling ties as well) of nested > lists may be accomplished via: > >def rankLists(nestedList): > def rankList(singleList): > sortedList = list(singleList) > sortedL

Trying to find zip codes/rest example

2007-08-03 Thread VanL
Hello, A couple months ago there was an example posted in a blog of a rest interface for validating zip codes. If I recall correctly, the backend validator was written in python. The validator demo page had a single text input; next to the text input would appear either a green check or a red

Re: Using cursor.callproc with zxJDBC

2007-08-03 Thread Carsten Haese
On Fri, 2007-08-03 at 17:31 +0100, Vaughan V Ashe wrote: > Hi > > We would like to use the store proc. We are using a postgreql > database. what we have working so far is: > > params = [4,4,2] > > curs.callproc("update_job_status",params) > > db.commit() > > #print db > > #print curs.descr

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Neil Cerutti
On 2007-08-03, Ed Leafe <[EMAIL PROTECTED]> wrote: > On Aug 3, 2007, at 11:57 AM, Bruno Desthuilliers wrote: > >> Sorry, I forgot to mention the language did not allow to have else >> & if >> in the same statement. IOW : >> >> if some_condition then >>do_sometehing >> else >>if some_other

Re: Global package variable, is it possible?

2007-08-03 Thread Fabio Z Tessitore
Heve you tried to do something like: # module configure.py value1 = 10 value2 = 20 ... # other module from configure import * # now I'm able to use value1 value2 etc. var = value1 * value2 bye -- http://mail.python.org/mailman/listinfo/python-list

Re: i am new to python-Please somebody help

2007-08-03 Thread Zentrader
On the discussion of rudeness, we have to include the OP. He/She/it did not even attempt a Google before posting, and posted with a meaningless subject. We'll chalk that up to newness, but some sort of retort was called for IMHO. How else do we learn the conventions that govern rudeness. Person

Strange set of errors

2007-08-03 Thread Stephen Webb
Greetings all, I've recently begun using Python to do scientific computation, and I wrote the following script to find approximate eigenvalues for a semi-infinite matrix: from pylab import * from numpy import * from scipy import * def bandstructure(N,s): b = s/4.0 jmax = 10 + N**2

Re: i am new to python-Please somebody help

2007-08-03 Thread Zentrader
BTW - on the subject of polite discussions, how about this one as an example of opinions politely expressed. Oh, and does anyone know how to use zip in Python. Yes+1. -- http://mail.python.org/mailman/listinfo/python-list

Re: Global package variable, is it possible?

2007-08-03 Thread Carsten Haese
On Fri, 2007-08-03 at 17:51 +, Fabio Z Tessitore wrote: > Heve you tried to do something like: > > # module configure.py > value1 = 10 > value2 = 20 > ... > > > # other module > from configure import * > > # now I'm able to use value1 value2 etc. > var = value1 * value2 Right idea, wrong e

►►►Get FREE Satellite TV on your PC ◄◄◄

2007-08-03 Thread Ana James
Watch Satellite TV On Your Computer Without Paying Monthly Fees... FOR FREE? Watch all your favorite shows on your Computer from anywhere in the World! Save 1000's of $$$ over many years on cable and satellite bills. INSTANT DOWNLOAD Plus Free Unlimited Downloads Movies, MP3s Music, etc !!! Mo

RE: File Handling & TRY/EXCEPT

2007-08-03 Thread Alex Popescu
"Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Thanks for your ideas guys, > > I'm unfortunately tied to 2.4 so don't have the full try except > status, but I'm now working with the following code: > > def addApp(self, event): > try: >

Re: __call__ considered harmful or indispensable?

2007-08-03 Thread Terry Reedy
Skip Montanaro a écrit : >>> In this case there was a bug. Depending on inputs, sometimes obj >>> initialized to a class, sometimes an instance of that class. (I fixed >>> that too while I was at it.) The problem was that the use of __call__ >>> obscured the underlying bug by making the instanc

downloading files

2007-08-03 Thread Ehsan
hared.com/download/1839752/cd520048/ xpersia14.3gp?tsid=20070803-143313-49566ea2', 'xpersia4.3gp' ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Global package variable, is it possible?

2007-08-03 Thread Chris Allen
> Hmm. So maybe something like this makes sense: > > __init__py: > ### > _default_cfg_file = 'config.conf' > > import configure > def loadcfg(filename): > configure.cfgfile = filename > try: > reload(pkg_module1) > reload(pkg_module2) > except NameErr

Re: Global package variable, is it possible?

2007-08-03 Thread Chris Allen
On Aug 3, 11:16 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-03 at 17:51 +, Fabio Z Tessitore wrote: > > Heve you tried to do something like: > > > # module configure.py > > value1 = 10 > > value2 = 20 > > ... > > > # other module > > from configure import * > > > # now I'm ab

Re: downloading files

2007-08-03 Thread Steve Holden
ebFile.close() > localFile.close() > download('http://www.2shared.com/download/1839752/cd520048/ > xpersia14.3gp?tsid=20070803-143313-49566ea2', 'xpersia4.3gp' ) > I'm guessing there are binary files and you are running on Windows, which is inserting a carria

Re: downloading files

2007-08-03 Thread Carsten Haese
On Fri, 2007-08-03 at 11:48 -0700, Ehsan wrote: > I foundd this code in ASPN Python Cookbook for downloading files in > python but when it finished downloading files the files became > corrupted and didn't open, the files in internet havn't any problem: > > > def download(url,fileName): >

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Terry Reedy
"Stef Mientki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | John Machin wrote: | So now I'm left with just one question: | for bitwise operations I should use &, |, ^ | for boolean operations I should use and, or, xor | but after doing some test I find strange effects: | >>> A =

Re: Global package variable, is it possible?

2007-08-03 Thread Chris Allen
On Aug 3, 10:51 am, Fabio Z Tessitore <[EMAIL PROTECTED]> wrote: > Heve you tried to do something like: > > # module configure.py > value1 = 10 > value2 = 20 > ... > > # other module > from configure import * > > # now I'm able to use value1 value2 etc. > var = value1 * value2 > > bye Thanks for

Re: Trying to find zip codes/rest example

2007-08-03 Thread Terry Reedy
"VanL" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | | I now cannot find this demo and the associated discussion. Does anybody | remember this demo and where I might be able to find it? No, but does the localflavor entry on http://code.djangoproject.com/browser/django/trunk/docs

Announcing Wing IDE 101 for teaching intro programming courses

2007-08-03 Thread Wingware
Hi, We're pleased to announce the first public beta release of Wing IDE 101, a free scaled back edition of Wing IDE that was designed for teaching introductory programming courses. We are releasing Wing IDE 101 to the general public in the hopes that it may help others teach with or learn Python.

Re: downloading files

2007-08-03 Thread kyosohma
localFile.write(webFile.read()) > webFile.close() > localFile.close() > download('http://www.2shared.com/download/1839752/cd520048/ > xpersia14.3gp?tsid=20070803-143313-49566ea2', 'xpersia4.3gp' ) Uhhh...you probably need to change the open() command

Re: Eclipse and Python

2007-08-03 Thread kyosohma
On Aug 3, 11:22 am, "Danyelle Gragsone" <[EMAIL PROTECTED]> wrote: > Does anyone have any suggested websites for learning Eclipse the python way? > > thanks, > Danyelle This article is a little old, but it might be helpful to you: http://www.ibm.com/developerworks/library/os-ecant/ I found this

draggable Tkinter.Text widget

2007-08-03 Thread infidel
Inspired by effbot's recent Vroom! editor, I have been toying with my own version. I'd like to make the Text widget "draggable", kind of like how you can drag a PDF document up and down in Adobe Reader. Here's what I have so far: from Tkinter import * class Draggable(Text, object): def __i

os.listdir path error

2007-08-03 Thread vedrandekovic
Hello Here is my simple listdir example: >>> import os >>> os.listdir("C:\Python24\") # This directory relly exists Here is my error: WindowsError: [Errno 3] The system cannot find the path specified: 'l/ *.*' Regards, Vedran -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange set of errors

2007-08-03 Thread Kurt Smith
Sorry, forgot to "Reply to all." On 8/3/07, Stephen Webb <[EMAIL PROTECTED]> wrote: > Greetings all, <> > Also, I've been having trouble with the plot function in matplotlib. For > example, I enter the following in the terminal: > > >>> from pylab import * > >>> plot([1,2,3]) > [] > I can help

Re: os.listdir path error

2007-08-03 Thread Jerry Hill
On 8/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello > > Here is my simple listdir example: > > >>> import os > >>> os.listdir("C:\Python24\") # This directory relly exists > > Here is my error: > > WindowsError: [Errno 3] The system cannot find the path specified: 'l/ > *.*' That's a

Re: os.listdir path error

2007-08-03 Thread kyosohma
On Aug 3, 2:50 pm, [EMAIL PROTECTED] wrote: > Hello > > Here is my simple listdir example: > > >>> import os > >>> os.listdir("C:\Python24\") # This directory relly exists > > Here is my error: > > WindowsError: [Errno 3] The system cannot find the path specified: 'l/ > *.*' > > Regards, > Vedran

Re: Trying to find zip codes/rest example

2007-08-03 Thread VanL
Terry Reedy wrote: > No, but does the localflavor entry on > http://code.djangoproject.com/browser/django/trunk/docs/add_ons.txt?rev=5118 > help? (found with Google) Thanks, but no. A friend asked for advice about implementing a password-checking interface; I remembered that the method describe

Re: Strange set of errors

2007-08-03 Thread Kurt Smith
On 8/3/07, Stephen Webb <[EMAIL PROTECTED]> wrote: > Greetings all, > > I've recently begun using Python to do scientific computation, and I wrote > the following script to find approximate eigenvalues for a semi-infinite > matrix: > > > from pylab import * > from numpy import * > from scipy impor

libpq.dll for pgdb

2007-08-03 Thread ekzept
the module PGDB which gives Python access to PostgreSql currently wants for a copy of a properly located or proper libpq.dll library, on Windows. anyone know what the current story on this is? thanks, -- jt -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: Spiff Workflow 0.0.1 (Initial Release)

2007-08-03 Thread Samuel
Introduction Spiff Workflow is a library implementing a framework for workflows. It is based on http://www.workflowpatterns.com and implemented in pure Python. Supported workflow patterns include (at least) the following: 1. Sequence 2. Parallel Split 3. Synchronization 4. Exclusi

Re: Global package variable, is it possible?

2007-08-03 Thread Fabio Z Tessitore
Il Fri, 03 Aug 2007 14:16:59 -0400, Carsten Haese ha scritto: > Right idea, wrong execution. Note that the OP said "I'd like to be able > to reload the config file dynamically and have all my modules > automatically receive the new config." You are obviously right ... I haven't read all the post,

Re: Global package variable, is it possible?

2007-08-03 Thread Chris Allen
> Only for knowing more about modules: is there a way to dinamically reload > an already imported module? > > bye > Fabio Yeah you can reload modules with the reload builtin function. -- http://mail.python.org/mailman/listinfo/python-list

Re: downloading files

2007-08-03 Thread Ehsan
lFile = open(fileName, 'w') > >localFile.write(webFile.read()) > >webFile.close() > >localFile.close() > > download('http://www.2shared.com/download/1839752/cd520048/ > > xpersia14.3gp?tsid=20070803-143313-49566ea2', 'xpersia4.3gp&#

regexp problem in Python

2007-08-03 Thread Ehsan
I want to find "http://www.2shared.com/download/1716611/e2000f22/ Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11" or 3gp instead of wmv in the text file like this : ""some code"" function reportAbuse() { var windowname="abuse"; var url="/ab

Re: Eclipse/PyDev question.

2007-08-03 Thread Fabio Zadrozny
On 8/3/07, king kikapu <[EMAIL PROTECTED]> wrote: > > Hi, > this is actually a question to those of us who use Eclipse and Pydev > as their main Python developing environment. As i use Eclipse (3.3 > Europa) only for Python and i have nothing to do with Java, is there a > way to disable/uninstall s

amra and py2exe

2007-08-03 Thread vinod
Hi i am having trouble creating exe using py2exe for amara package i saw some posts related to this talking about amara cat file but i dont have any cat file for amara on my machine. the standalone script runs fine. i am using python on windows here is the error i am getting while creating the exe

  1   2   >