tkSimpleDialog fails

2006-08-31 Thread Gheorghe Postelnicu
Hi, I am using Python to develop a front-end GUI using Tk. I would need to use some of the tkSimpleDialog widgets, but they seem to fail. As far as I could tell, this happens because my application also uses VTK, so I have to use the root.withdraw() line root = Tkinter.Tk() root.withdraw() app =

Re: GC and security

2006-08-31 Thread Paul Rubin
Les Schaffer <[EMAIL PROTECTED]> writes: > keys are on a USB drive key ring. gpg accesses the key ring as needed, > but in a separate process. and gpg is done with its work early on in our > app lifetime. comes back at end to encrypt and then app is done. gpg is fairly careful about passphrases.

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > what module is this? if it takes 5.5 seconds to import a single module, > something isn't quite right. Ok, I know it sounds bad but it has a good purpose! Basically it provides access to about 100mb of data. It serves as a cache of QuickBoo

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jorge Vargas
On 31 Aug 2006 08:24:29 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > Jaroslaw Zabiello wrote: > > [EMAIL PROTECTED] wrote: > > > > > + SqlObject allows working with the DB tables without > > > using SQL itself. > > > > Rails has ActiveRecord ORM, which IMO has nicer and simpler > > syntax than

problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Salerno
Here's the code: class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, wx.ID_ANY) panel = wx.Panel(self) dbconn = self.connect_db() dbconn.execute("select namefirst, namelast from master") bb_players = [] for x in db

Re: csv module strangeness.

2006-08-31 Thread tobiah
>> The docs clearly state what the defaults are, but they are not >> in the code. It seems so clumsy to have to specify every one of >> these, just to change the delimiter from comma to tab. >> >> http://docs.python.org/lib/csv-fmt-params.html : > > The "it defaults to" clauses should probably

Re: dictionaries vs. objects

2006-08-31 Thread Andre Meyer
On 8/28/06, Steve Holden <[EMAIL PROTECTED]> wrote: Andre Meyer wrote:> Hi all>> I have the following question: I need a representation of a physically> inspired environment. The environment contains a large number of objects> with varying attributes. There may be classes of objects, but there is >

Re: problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Purser
On Thu, 31 Aug 2006 18:11:15 GMT John Salerno <[EMAIL PROTECTED]> wrote: > Here's the code: > > class MyFrame(wx.Frame): > > def __init__(self): > wx.Frame.__init__(self, None, wx.ID_ANY) > panel = wx.Panel(self) > dbconn = self.connect_db() > dbconn.exec

Re: problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Salerno
John Purser wrote: > I'd say you had a record with a null value for the namefirst field. > The join method don't like that. Wow, you're right! I tried this: if x[0] and not x[0] == 'NULL': and sure enough it works after that. (Not sure if that's the best way to test, though. Just testing for

Re: problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Salerno
John Salerno wrote: > John Purser wrote: > >> I'd say you had a record with a null value for the namefirst field. >> The join method don't like that. > > Wow, you're right! I tried this: > > if x[0] and not x[0] == 'NULL': > > and sure enough it works after that. (Not sure if that's the best

Assignment-in-conditional

2006-08-31 Thread xamdam
I am not sure if this came up before, but I would love to have an 'assignment-in-conditional' form in python, e.g pat = re.compile('something') if m = pat.match(s): m.group(1) Of course there is some concern about accidentally using '=' instead of '=='. One possible solution is to do what th

SQLObject or SQLAlchemy?

2006-08-31 Thread John Salerno
Are there any major differences between these two? It seems they can both be used with TurboGears, and SQLAlchemy with Django. I'm just wondering what everyone's preference is, and why, and if there are even more choices for ORM. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Purser
On Thu, 31 Aug 2006 18:39:45 GMT John Salerno <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > John Purser wrote: > > > >> I'd say you had a record with a null value for the namefirst field. > >> The join method don't like that. > > > > Wow, you're right! I tried this: > > > > if x[0] and

Re: Assignment-in-conditional

2006-08-31 Thread Fredrik Lundh
xamdam wrote: > I am not sure if this came up before, but I would love to have an > 'assignment-in-conditional' form in python, e.g it's a FAQ, so it has probably come up before: http://pyfaq.infogami.com/why-can-t-i-use-an-assignment-in-an-expression -- http://mail.python.org/mailman/listin

python loops

2006-08-31 Thread Putty
In C and C++ and Java, the 'for' statement is a shortcut to make very concise loops. In python, 'for' iterates over elements in a sequence. Is there a way to do this in python that's more concise than 'while'? C: for(i=0; ihttp://mail.python.org/mailman/listinfo/python-list

Re: python loops

2006-08-31 Thread AlbaClause
Putty wrote: > In C and C++ and Java, the 'for' statement is a shortcut to make very > concise loops. In python, 'for' iterates over elements in a sequence. > Is there a way to do this in python that's more concise than 'while'? > > C: > for(i=0; i > > python: > while i < length: > i += 1 for

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Adam Jones
John Salerno wrote: > Are there any major differences between these two? It seems they can > both be used with TurboGears, and SQLAlchemy with Django. I'm just > wondering what everyone's preference is, and why, and if there are even > more choices for ORM. > > Thanks. Currently most of my work i

Re: python loops

2006-08-31 Thread bearophileHUGS
AlbaClause wrote: > for i in range(length): > print i Or usually better: for ii in xrange(length): ... Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with appending to a list, possibly mysqldb related

2006-08-31 Thread John Salerno
John Purser wrote: > On Thu, 31 Aug 2006 18:39:45 GMT > John Salerno <[EMAIL PROTECTED]> wrote: > >> John Salerno wrote: >>> John Purser wrote: >>> I'd say you had a record with a null value for the namefirst field. The join method don't like that. >>> Wow, you're right! I tried this:

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread John Salerno
Adam Jones wrote: > I think SA's extra flexability > is worth the effort. Thanks for the reply. Do you mean in the above quote that SA is a little more complicated than SO? -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread metaperl
John Salerno wrote: > Are there any major differences between these two? It seems they can > both be used with TurboGears, and SQLAlchemy with Django. I'm just > wondering what everyone's preference is, and why, and if there are even > more choices for ORM. I just finished surfing both websites l

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread metaperl
John Salerno wrote: > Thanks for the reply. Do you mean in the above quote that SA is a little > more complicated than SO? Don't be afraid to download them and try their respective tutorials. Each one would take about an hour and then you'd have a feel for yourself. I agree with adam that SQLAl

Re: python loops

2006-08-31 Thread Kay Schluehr
Putty wrote: > In C and C++ and Java, the 'for' statement is a shortcut to make very > concise loops. In python, 'for' iterates over elements in a sequence. > Is there a way to do this in python that's more concise than 'while'? > > C: > for(i=0; i > > python: > while i < length: >

Re: python loops

2006-08-31 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > AlbaClause wrote: > > > for i in range(length): > > print i > > Or usually better: > > for ii in xrange(length): ~~ I hate ii ;) Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

RE: python loops

2006-08-31 Thread Michael . Coll-Barth
> -Original Message- > From: Kay Schluehr > > > > > python: > > while i < length: > > i += 1 > > As AlbaClause had demonstrated you can iterate over indices as well > using the for-statement and the range() function. But you can also > combine iterating over elements

Re: Assignment-in-conditional

2006-08-31 Thread Neil Cerutti
On 2006-08-31, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > xamdam wrote: > >> I am not sure if this came up before, but I would love to have an >> 'assignment-in-conditional' form in python, e.g > > it's a FAQ, so it has probably come up before: > > http://pyfaq.infogami.com/why-can-t-i-use-an-assig

Re: Assignment-in-conditional

2006-08-31 Thread Georg Brandl
xamdam wrote: > I am not sure if this came up before, but I would love to have an > 'assignment-in-conditional' form in python, e.g > > pat = re.compile('something') > > if m = pat.match(s): > m.group(1) > > Of course there is some concern about accidentally using '=' instead of > '=='. One

Re: Assignment-in-conditional

2006-08-31 Thread xamdam
Thanks for the FAQ, and for the 'casm ;) What do you think about using alternative syntax (something like 'as') - max Fredrik Lundh wrote: > xamdam wrote: > > > I am not sure if this came up before, but I would love to have an > > 'assignment-in-conditional' form in python, e.g > > it's a FAQ, s

Re: csv module strangeness.

2006-08-31 Thread John Machin
tobiah wrote: > > > > > > > > I agree with Henryk's evaluation Henryk?? Have I missed a message in the thread, or has the effbot metamorphosed into the aitchbot? -- http://mail.python.org/mailman/listinfo/python-list

re.compile() doesn't work under Windows?

2006-08-31 Thread ddtl
Hello everybody. My script uses re.compile() function, and while it rans without errors under Linux, when I ran that script under Windows I get the following error: Traceback (most recent call last): File "C:\a\projects\re.py", line 4, in ? import re File "C:\a\projects\re.py", line 95, i

Re: HTTPS Login

2006-08-31 Thread Thierry Lam
Instead of using the following: > req = urllib2.Request("https://web.site.com/default.aspx";, params) > data = urllib2.urlopen(req) Try: data = urllib.urlopen("https://web.site.com/default.aspx";, param) Thierry Tom Grove wrote: > I am trying to login to a secure website and I am having some

Re: re.compile() doesn't work under Windows?

2006-08-31 Thread jay graves
ddtl wrote: > My script uses re.compile() function, and while it rans without errors > under Linux, when I ran that script under Windows I get the following > error: > Traceback (most recent call last): > File "C:\a\projects\re.py", line 4, in ? > import re > File "C:\a\projects\re.py", li

Re: re.compile() doesn't work under Windows?

2006-08-31 Thread Carsten Haese
On Thu, 2006-08-31 at 17:38, ddtl wrote: > Hello everybody. > > My script uses re.compile() function, and while it rans without errors > under Linux, when I ran that script under Windows I get the following > error: > > Traceback (most recent call last): > File "C:\a\projects\re.py", line 4, in

Re: re.compile() doesn't work under Windows?

2006-08-31 Thread Gabriel Genellina
At Thursday 31/8/2006 18:38, ddtl wrote: My script uses re.compile() function, and while it rans without errors under Linux, when I ran that script under Windows I get the following error: Traceback (most recent call last): File "C:\a\projects\re.py", line 4, in ? import re File "C:\a\p

Re: Duck typing alows true polymorfisim

2006-08-31 Thread The Ghost In The Machine
In comp.lang.java.advocacy, Tor Iver Wilhelmsen <[EMAIL PROTECTED]> wrote on 31 Aug 2006 18:31:15 +0200 <[EMAIL PROTECTED]>: > The Ghost In The Machine <[EMAIL PROTECTED]> writes: > >> Also, one language is very conspicuous by its absence: C#. > > He does not date any of the updates, so it's uncle

Re: sys.argv[0] doesn't always contain the full path of running script.

2006-08-31 Thread Ivan Zuzak
Joel Hedlund wrote: > Yes indeed! But the path to the module will not be the same as the path to > the script if you are currently in an imported module. Consider this: I thought that was the point - to get the full path of the running script? I see you use the terms "script" and "module" in dif

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Anthra Norell
Nico, perhaps this would be suitable: >>> s = '''Example text: This is a test. A test. /www/mydoc1 And I need to extraxt /www/mydoc1 and /www/mydoc2 from this text. /foo/bar/doc ...''' >>> import SE >>> Thing_Filter = SE.SE (' "~>> key="path">(.|\n)*?~==" | "~<.*?>~= " ') >>> print Thing_Filte

Re: re.compile() doesn't work under Windows?

2006-08-31 Thread John Machin
ddtl wrote: > Hello everybody. > > My script uses re.compile() function, and while it rans without errors > under Linux, when I ran that script under Windows I get the following > error: > > Traceback (most recent call last): > File "C:\a\projects\re.py", line 4, in ? > import re > File "C:

Re: sys.argv[0] doesn't always contain the full path of running script.

2006-08-31 Thread John Machin
Ivan Zuzak wrote: > Joel Hedlund wrote: > > > Yes indeed! But the path to the module will not be the same as the path to > > the script if you are currently in an imported module. Consider this: > > I thought that was the point - to get the full path of the running > script? I see you use the term

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread BJörn Lindqvist
On 8/31/06, Jorge Vargas <[EMAIL PROTECTED]> wrote: > On 31 Aug 2006 08:24:29 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > I believe that is the most important part of TG, taking the best of > the best, and letting the framework adapt and morphe. > > for example noone plan to move to SA, 0.1 ca

Re: GC and security

2006-08-31 Thread Les Schaffer
Paul Rubin wrote: > gpg is fairly careful about passphrases. Why are you collecting the > passphrase in the Python app instead of letting gpg handle it? as i recall we did that because we needed the passphrase more than once, and didnt want to have to make the users type in something that long t

Re: csv module strangeness.

2006-08-31 Thread tobiah
John Machin wrote: > tobiah wrote: >>> >>> >> I agree with Henryk's evaluation > > Henryk?? Have I missed a message in the thread, or has the effbot > metamorphosed into the aitchbot? > How strange. Either my client was whacked, or I was. I was actually referring to your "baroque byzantine ov

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Bruno Desthuilliers
John Salerno a écrit : > Are there any major differences between these two? Yes. SQLAlchemy is, mainly, a very higher-level DB-API that makes working with a RDBMS almost transparent (no embedded SQL unless you really wants to) without trying to pretend there's no RDBMS nor forcing you into ORM

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Cliff Wells
On Thu, 2006-08-31 at 23:31 +0200, BJörn Lindqvist wrote: > On 8/31/06, Jorge Vargas <[EMAIL PROTECTED]> wrote: > > On 31 Aug 2006 08:24:29 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > > > Someone ones said on the mailing list TG is the Ubuntu of web > > frameworks, and I think I'll add and you

Boost Python Issue

2006-08-31 Thread JDJMSon
I was wondering if someone here could help me with a problem I'm having building Python extensions with the Boost.Python library. Basically, if I have a wrapper class with something like this: string TestFunc() { return "Hello World"; } BOOST_PYTHON_MODULE(TestClass) { def("TestFu

Re: code for the graphics window?

2006-08-31 Thread Richard Jones
[EMAIL PROTECTED] wrote: > Hi. I'm new to Python . . .very new. I was just wondering, once I've > written a program that opens the graphics window and I've got some > things going on in the grahics window, how do I display text in the > grahics window? I need to be able to display changeable text,

Re: Using eval with substitutions

2006-08-31 Thread Anthra Norell
Abhishek, I hesitate to propose this idea, because there's got to be a better (more conventional) way of doing this. Anyway consider this: >>> x = "a+b"; y = "x*a; z = "x+y" # Your definitions >>> import SE >>> def f (x, y, z): substitutions = 'z=(%s) | y=(%s) | x=(%s)' % (z,

Re: GC and security

2006-08-31 Thread Paul Rubin
Les Schaffer <[EMAIL PROTECTED]> writes: > i forget whether gpg can be given a list of files to decrypt. but cuz of > what we are doing, i still believe we would need to call gpg more than > once. Yes, gpg --batch if I remember correctly. > Fred Lundh's scheme for blanking the passphrase looks go

Re: Duck typing alows true polymorfisim

2006-08-31 Thread fizbin
Just a quick note in the midst of this: The Ghost In The Machine wrote: > Dynamic type creation. I don't know if Java has this or not. > One can of course attempt bytecode synthesis -- I think that's > what BCEL uses -- but that's a bit of a hack. Since no one has pointed this out, I should ment

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Adam Jones
John Salerno wrote: > Adam Jones wrote: > > > I think SA's extra flexability > > is worth the effort. > > Thanks for the reply. Do you mean in the above quote that SA is a little > more complicated than SO? Yes, it is. To avoid the technical issues involved the complication can be summarized as:

Python style: to check or not to check args and data members

2006-08-31 Thread Joel Hedlund
Hi! The question of type checking/enforcing has bothered me for a while, and since this newsgroup has a wealth of competence subscribed to it, I figured this would be a great way of learning from the experts. I feel there's a tradeoff between clear, easily readdable and extensible code on one

Re: Boost Python Issue

2006-08-31 Thread [EMAIL PROTECTED]
I believe this is more of a tools/compiler issue than a coding issue. If you are using the pre-built BOOST.Python library you get compile mismatches. I am not a Windows Visual Studio programmer (barely a programmer), I am probably not using the correct terminology. There are some settings for th

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Cliff Wells
On Thu, 2006-08-31 at 09:04 -0700, Paul Boddie wrote: > SkunkWeb (3.4.0), Zope (2.9.4 and 3.2.1), Plone (2.5), Karrigell (2.3), > CherryPy (2.2.1), Spyce (2.1), QP (1.8), Cymbeline (1.3.1), Django > (0.95), Webware (0.9.1), Pylons (0.9.1), TurboGears (0.8.9), PyLucid > (v0.7.0RC4), Paste (0.4.1),

Re: Allowing ref counting to close file items bad style?

2006-08-31 Thread Dan
BJörn Lindqvist wrote: > On 8/30/06, Dan <[EMAIL PROTECTED]> wrote: >> Is my data safer if I explicitly close, like this?: >> fileptr = open("the.file", "w") >> foo_obj.write(fileptr) >> fileptr.close() > > Have you ever experienced a problem caused by not explicitly closing > your

AttributeError: 'Attributes' object has no attribute 'saveFile'

2006-08-31 Thread crystalattice
Not sure how to explain, but I'll try my best. I'm making a GUI with wxGlade. The GUI has windows that open when the "Next Page" button is pushed; the button also pickles the information that is input into the frame at the same time. The saveFile name is autocreated based on the data entered by

Re: Python style: to check or not to check args and data members

2006-08-31 Thread Robert Kern
Joel Hedlund wrote: > Hi! > > The question of type checking/enforcing has bothered me for a while, and > since this newsgroup has a wealth of competence subscribed to it, I > figured this would be a great way of learning from the experts. I feel > there's a tradeoff between clear, easily readda

Trouble finding references that are keeping objects alive

2006-08-31 Thread t . mitchell
Hi, I have a python gtk app that allows users to have one project open at a time. I have recently discovered that projects are not being freed when they are closed - the refcount is not hitting zero. I have used gc.get_referrers() to track down a few culprits, but I have now found that some of m

Re: Broadcast server

2006-08-31 Thread Damjan
[EMAIL PROTECTED] wrote: > I would like to write a server with the low level API of python ( > socket+select and/or socket+thread ) that allow me to register client > and update them every X seconds ( could be the time, the temperature, a > stock quote, a message , ... ). > > How to write the ser

Re: M$ windows python libs installed in arbitrary directories forcustomized python distributions

2006-08-31 Thread alf
Georg Brandl wrote: >>> >>> It's his signature. >>> >> >> The sig is delimited by '-- \n' > > > Yes, and Earth is a disk. > how deep -- alf -- http://mail.python.org/mailman/listinfo/python-list

Re: Python style: to check or not to check args and data members

2006-08-31 Thread Bruno Desthuilliers
Joel Hedlund a écrit : > Hi! > > The question of type checking/enforcing has bothered me for a while, (snip) > > I've also whipped up some examples in order to put the above questions > in context and for your amusement. :-) (snip) > These are the attached modules: > > * nocheck_module.py: >

Re: Boost Python Issue

2006-08-31 Thread Neal Becker
JDJMSon wrote: > I was wondering if someone here could help me with a problem I'm having > building Python extensions with the Boost.Python library. > Basically, if I have a wrapper class with something like this: > > string TestFunc() > { > return "Hello World"; > } > > BOOST_PYTHON_MODULE(Test

Re: Trouble finding references that are keeping objects alive

2006-08-31 Thread t . mitchell
More info: The project has cyclic references to the objects in the projects, but this should be handled by gc.collect(). Here's is my 'project still alive' test: # store a weakref for debugging p = weakref.ref(self.data.project) self.data.setProject(None, None)

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread BJörn Lindqvist
> > > Someone ones said on the mailing list TG is the Ubuntu of web > > > frameworks, and I think I'll add and you can strip down the kernel and > > > it wont break :) > > > > But that is not really true. If you use Cheetah instead of Kid, you > > lose out: No widgets, > > Untrue. Even though I do

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread BJörn Lindqvist
I think this post by the author of SQLAlchemy perfectly summarizes the differences between the two ORMs: http://article.gmane.org/gmane.comp.python.sqlalchemy.user/1072/ -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list

Re: Boost Python Issue

2006-08-31 Thread JDJMSon
Neal Becker wrote: > Shouldn't that be: > .def("TestFunction",&TestClass::TestFunction) > > ; Yes, you're right, but I'm still getting the error. I'm using a prebuilt python library, so later I'm going to rebuild python myself and see if that helps, as has been suggested. Thanks. -- http://ma

Re: AttributeError: 'Attributes' object has no attribute 'saveFile'

2006-08-31 Thread t . mitchell
Hi Sounds like you've got a wizard-type interface thing happening. I haven't used wxGlade but I have done similar things in GTK several times. Try putting all the windows in a notebook widget with hidden tabs. Put the 'Next Page' button and the filename outside the notebook. This makes the filen

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Jorge Godoy
"BJörn Lindqvist" <[EMAIL PROTECTED]> writes: > I think this post by the author of SQLAlchemy perfectly summarizes the > differences between the two ORMs: > > http://article.gmane.org/gmane.comp.python.sqlalchemy.user/1072/ And ActiveMapper is working to some extent better than it was by the time

Re: Coding style and else statements

2006-08-31 Thread matt . newville
> To my eyes, that's less readable than, and has no benefit over, the > following: > > def foo(thing): > if thing: > result = thing+1 > else: > result = -1 > return result I wouldn't discount: def foo(thing): result = -1 if thing:

Re: Boost Python Issue

2006-08-31 Thread Neal Becker
JDJMSon wrote: > > Neal Becker wrote: > >> Shouldn't that be: >> .def("TestFunction",&TestClass::TestFunction) >> > ; > > > Yes, you're right, but I'm still getting the error. I'm using a > prebuilt python library, so later I'm going to rebuild python myself > and see if that helps, as has bee

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop
Paul Boddie wrote: > fuzzylollipop wrote: > > Paul Boddie wrote: > > > > fuzzylollipop wrote: > > > > > uh, no, Python predates Ruby by a good bit > > > > > Rails might be "older" than Turbogears but it still JUST went 1.0 > > > > > officially. > > > > > It can't be called "mature' by any defintit

introspection

2006-08-31 Thread brad tilley
How do I import a module and then ask it to show me its methods or other aspects about itself during execution? I'd like to do something such as this: import win32api print win32api.methods() I'd like to write some test scripts that load modules and probe them for information about themselves

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread fuzzylollipop
Sam Smoot wrote: big rant snipped since Google Groups has what I responding to: > So if you decide to reply, might I suggest spending a few minutes with > Google to get your facts straight next time? Oh, and keeping an eye on > the actual topic might be a good idea too. I got my facts straight,

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Sam Smoot
fuzzylollipop wrote: > I got my facts straight, Ruby is not tested in production environments. That's odd... it's running bank websites, credit-card processing, high traffic sites like ODEO and Penny-Arcade. Seems pretty "production" to me. > And I am speaking from a BIG internet site scale. Ye

Re: introspection

2006-08-31 Thread John Machin
brad tilley wrote: > How do I import a module and then ask it to show me its methods or other > aspects about itself during execution? I'd like to do something such as > this: > > import win32api > > print win32api.methods() > > I'd like to write some test scripts that load modules and probe them

Re: Coding style and else statements

2006-08-31 Thread Ben Finney
[EMAIL PROTECTED] writes: > > To my eyes, that's less readable than, and has no benefit over, > > the following: > > > > def foo(thing): > > if thing: > > result = thing+1 > > else: > > result = -1 > > return result I chose this to more clearly

Re: introspection

2006-08-31 Thread Ben Finney
brad tilley <[EMAIL PROTECTED]> writes: > How do I import a module and then ask it to show me its methods or other > aspects about itself during execution? I'd like to do something such as > this: > > import win32api > > print win32api.methods() > > I'd like to write some test scripts that load

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Jorge Vargas
On 8/31/06, John Salerno <[EMAIL PROTECTED]> wrote: > Are there any major differences between these two? It seems they can > both be used with TurboGears, and SQLAlchemy with Django. I'm just > wondering what everyone's preference is, and why, and if there are even > more choices for ORM. > they us

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Jorge Vargas
On 8/31/06, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > On 8/31/06, Jorge Vargas <[EMAIL PROTECTED]> wrote: > > On 31 Aug 2006 08:24:29 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > > > I believe that is the most important part of TG, taking the best of > > the best, and letting the framework a

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Jorge Godoy
"Jorge Vargas" <[EMAIL PROTECTED]> writes: > for example SA wins at using an existing db > but SO wins at not worring about the db structure That's not entirely true. Some things are impossible with SQL Object alone. You have to, at least, make use of sqlbuilder. And these aren't hard things, m

Re: Questoin about outlook calendar

2006-08-31 Thread Roger Upole
"Gallagher, Tim F (NE)" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] "Gallagher, Tim (NE)" wrote : > import win32com.client > import time > import datetime > > outlook = win32com.client.Dispatch("Outlook.Application") > namespace = outlook.GetNamespace("MAPI") > appointments = na

Re: Assignment-in-conditional

2006-08-31 Thread Simon Forman
xamdam wrote: > Thanks for the FAQ, and for the 'casm ;) > > What do you think about using alternative syntax (something like 'as') > > - max > > Fredrik Lundh wrote: > > xamdam wrote: > > > > > I am not sure if this came up before, but I would love to have an > > > 'assignment-in-conditional' form

raw audio in windows

2006-08-31 Thread Putty
Hi. I've written a small python script that was primarily meant for use in a unix-compatible environment. It writes a bunch of raw audio to a file and then sends the file to /dev/audio and the system plays the audio. Very simple. Is there a simple way I could edit the script (which just uses th

Table of Python Packages

2006-08-31 Thread Sanghyeon Seo
Hello, c.l.py, and catalog-sig, This post updates last year's post: http://mail.python.org/pipermail/catalog-sig/2005-March/000506.html Believe it or not, I am still maintaining this table, and it can be now found here: http://sparcs.kaist.ac.kr/~tinuviel/package/list.cgi?name=python Now you can

Re: GC and security

2006-08-31 Thread Paul Rubin
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > This is after they'd made an 11x14 enlargement of the "stolen" > print, cleaned it up with a marker, reduced to life size, and etched > onto printed circuit board to form a mold for making a latex "skin". > Which, BTW, also fooled the lock. I r

Re: Allowing ref counting to close file items bad style?

2006-08-31 Thread [EMAIL PROTECTED]
Dan wrote: > BJo:rn Lindqvist wrote: > > On 8/30/06, Dan <[EMAIL PROTECTED]> wrote: > >> Is my data safer if I explicitly close, like this?: > >> fileptr = open("the.file", "w") > >> foo_obj.write(fileptr) > >> fileptr.close() > > Have you ever experienced a problem caused by not exp

Re: raw audio in windows

2006-08-31 Thread spiffy
On 31 Aug 2006 21:34:13 -0700, "Putty" <[EMAIL PROTECTED]> wrote: >Hi. I've written a small python script that was primarily meant for >use in a unix-compatible environment. It writes a bunch of raw audio >to a file and then sends the file to /dev/audio and the system plays >the audio. Very sim

Re: introspection

2006-08-31 Thread Fredrik Lundh
brad tilley wrote: > How do I import a module and then ask it to show me its methods or other > aspects about itself during execution? I'd like to do something such as > this: > > import win32api dir(win32api) help(win32api) and also import inspect help(inspect) -- http://mail.python.org

Re: all ip addresses of machines in the local network

2006-08-31 Thread damacy
Amit Khemka wrote: > > in my program so far, multiple threads (255 threads in total) spawned > > at once with each one of them trying to call socket.gethostbyaddr(ip) > > function. i.e. if exception thrown, no machine found. i used .join() to > > wait for the threads to terminate. it's fully workin

Re: Searching a string and extract all occurancies of a substring

2006-08-31 Thread Nico Grubert
> is this XML, or just something that looks a little like XML ? Unfortunately, something that looks a little XML so I can't use a XML parser. But the HTML parser does the job. -- http://mail.python.org/mailman/listinfo/python-list

<    1   2