>In general it's considered quite pythonic to catch exceptions :-)
>It's a particularly useful way of implementing duck typing for example.
>I'm not sure if I've got *any* code that doesn't use exceptions
>somewhere
Hehe. Okay. It will probably always be the case that you have to lose
some Pyt
Errm, maybe you could use the sys.excepthook function to catch the
error and then print the details yourself from the traceback object.
import sys
def _exceptionhook(type, value, traceback):
''' your code here '''
sys.excepthook = _exceptionhook
((untested))
--
http://mail.python.org/mailma
Hmm...sorry to go a little off topic here, but I, also, have been
striving to learn Python/MySQL for a while using MySQL's official
thing. Can you please explain to me why one must use a cursor and can't
just do an execute on the connction? :confused about the subject:
--
http://mail.python.org/m
Well, it worked :)
Thanks a lot!
- Kreedz
--
http://mail.python.org/mailman/listinfo/python-list
Hi Timothy,
first at all, sorry if you receive this message twice, but I sent a
message five hours ago and I don't see it on
mail.python.org/python-list.
Now at least the OP will receive it since I included it in a CC.
This thread may give you an start:
http://groups.google.ch/group/comp.lang.py
Well, for a single connection object you could use several cursor
objects and juggle with all of them in your program. This can come in
handy if it's not about a simple script like I put in here. You can
reuse the results from the cursors, etc. without issuing more,
potentially resource-hungry,
CPIM Ronin wrote:
> Hi Folks,
>
> I'm brand spanking new to Python, busy reading docs and going through
> two of the ubiquitous O'Reilly books--"Learning Python" by Lutz/Ascher
> and "Python Programming on Win32" by Hammond/Robinson.
>
> Still I have a just few newbie questions:
>
>-In
> - What book or doc would you recommend for a thorough
>thrashing of object oriented programming (from a Python
>perspective) for someone who is weak in OO? In other
>words, how can someone learn to think in an OO sense,
>rather than the old linear code sense?
sven wrote:
> hi list,
> i'd like to define __repr__ in a class to return the standardrepr
> a la "<__main__.A instance at 0x015B3DA0>"
> plus additional information.
> how would i have to do that?
> how to get the standardrepr after i've defined __repr__?
>
> sven.
>
It's relatively easy for new
On 2005-09-08, Adriaan Renting <[EMAIL PROTECTED]> wrote:
> The elegant way to do installs on Windows would be by creating an MSI.
> Microsoft provides (IIRC) a simple tool to create those (Orca), that's
> free. Without the Installshield or Wise tools I think it would take
> quite some effort thoug
A.B., Khalid wrote:
> Mark Dufour wrote:
> > After nine months of hard work, I am proud to introduce my baby to the
> > world: an experimental Python-to-C++ compiler.
>
> Good work.
>
> I have good news and bad news.
>
> First the good news: ShedSkin (SS) more or less works on Windows. After
> patc
On Sep 12, 2005, at 11:26 AM, Frank Millman wrote:
> If I move all the authentication and business logic to a program which
> runs on the server, it is up to the system administrator to ensure that
> only authorised people have read/write/execute privileges on that
> program. Clients will have no p
How do you do this with the disutils module? I'm looking to make an installer that will install a python library.
Isn't that already available in the distutils module ?--
http://mail.python.org/mailman/listinfo/python-list-- Gregory PiñeroChief Innovation OfficerBlended Technologies(
www.blendedte
Gregory Piñero wrote:
> How do you do this with the disutils module? I'm looking
> to make an installer that will install a python library.
start here:
http://docs.python.org/dist/dist.html
if you need more help, grab some libraries from PyPI and look
at their setup files.
--
http:/
I have been working on handling unhanded exceptions and making a
detailed print out of the traceback after the exception. I found that
traceback.extract_tb worked nice and was quite simple.
During my searching around I found out that it might be possible to
get the variables and their respective v
>I am reluctant to attempt an arduous installation on Windows, but if
>Mr. Dufour or someone else could create a web site that would let you
>paste in Python code and see a C++ translation, I think this would
>expand the user base. Alternatively, a Windows executable would be
>nice.
The web site i
Frank Millman a écrit :
> bruno modulix wrote:
>
>>Frank Millman wrote:
>>
>>>Hi all
>>>
>>>I am writing a multi-user accounting/business system. Data is stored in
>>>a database (PostgreSQL on Linux, SQL Server on Windows). I have written
>>>a Python program to run on the client, which uses wxPyth
On 1997/06/05 Peter Henning wrote:
>SMB, ldap, imap4rev1
>
>Is there an SMB library? I want to be able to access SMB shares
>from python, or publish shares onto a network neighbourhood from
>a python server. If anyone has implemented SMB in python, could
>you point me to the code? Otherwise, would
Erich Schreiber wrote:
> In the Python Library Reference the explanation of the time.sleep()
> function reads amongst others:
>
>
>>The actual suspension time may be less than that requested because
>>any caught signal will terminate the sleep() following execution
>>of that signal's catching r
Jerzy Karczmarczuk a écrit :
> Gurus,
No guru answered, so you'll have to bear with me...
> before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
>
> On the other h
Oops, I forgot to look at my old topic. Some of you mentioned CIFS. I
was away from home for a while and now I'm on my job, again. Soth the
Network Neighborhood thing isn't a problem. Now I know, that probably
it would be better to use CIFS rather than a virtual filesystem. I just
need to read thro
[EMAIL PROTECTED] wrote:
> Perhaps so, but the logging module seems like such an unpythonic beast to
> me. How about cleaning it up (*) before we add more to it? Stuff like
> colorizing seems like it belongs in its own module (presuming a reasonably
> general markup scheme can be agreed upon) so
[EMAIL PROTECTED] wrote:
> >> - It's a package, but contrary to any other package I've ever seen,
> >> most of its functionality is implemented in __init__.py.
>
> Trent> I'm not defending the implementation, but does this cause any
> Trent> particular problems?
>
> No, it just seems
On Mon, 12 Sep 2005 06:34:45 -0700, Frank Millman wrote:
> The client program contains all the authentication and business logic.
> It has dawned on me that anyone can bypass this by modifying the
> program. As it is written in Python, with source available, this would
> be quite easy. My target m
Larry Bates wrote:
>You need to specify a "platform" you will be running on. I've had
>good experience with ExperVision's RTK toolkit on Windows. It is not
>free, but it is very, very good. Sometimes software is actually
>worth paying for ;-).
>
>Larry Bates
>
>
>Timothy Smith wrote:
>
>
>>i'
Hi,
Why not just releasing the *.pyc ?
Regards,
Philippe
Frank Millman wrote:
> Hi all
>
> I am writing a multi-user accounting/business system. Data is stored in
> a database (PostgreSQL on Linux, SQL Server on Windows). I have written
> a Python program to run on the client, which uses w
Trent Mick wrote:
> Yah. It was added before Guido more clearly stated that he thought
> modules should have a successful life outside the core before being
> accepted in the stdlib.
Perhaps so, but Guido was also quite keen to get PEP-282 implemented
for inclusion in 2.3, and pronounced on the c
On Mon, 12 Sep 2005 08:33:10 -0700, Frank Millman wrote:
> My problem is that, if someone has access to the network and to a
> Python interpreter, they can get hold of a copy of my program and use
> it to knock up their own client program that makes a connection to the
> database. They can then ex
[EMAIL PROTECTED] wrote:
> Since the logging package currently uses mixedCase it would appear it
> shouldn't revert to lower_case. I'm thinking it should have probably used
> lower_case from the start though. I see no real reason to have maintained
> compatibility with log4j. Similarly, I think
Steve Horsley wrote:
> I think the sleep times are quantised to the granularity of the system
> clock, shich varies from os to os. From memory, windows 95 has a 55mS
> timer, NT is less (19mS?), Linux and solaris 1mS. All this is from
For the record, the correct value for NT/XP family is about
Hi Miki
Thx for you reply. I have tried the procedure but I am stuck with
python setup.py py2exe --includes mymodule.
I get the following error: "ImportError: No module named mymodule"
I don't know what mymodule should contain. Basically I want all of
python and numarray
to be part of the distr
Robert Kern <[EMAIL PROTECTED]> writes:
>> Come to think of it, what's installed by Apple may count as a
>> different distribution as well. It certainly includes more than just
>> the official distribution.
> It's also old and probably won't be the same version in 10.5. If you
> want any control ov
Has anyone had any luck getting plwm (the X window manager framework
written in Python) working on OS X? How about python-xlib, which plwm
depends on?
Thanks,
http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more informati
Mike Meyer wrote:
> Robert Kern <[EMAIL PROTECTED]> writes:
>
>>>Come to think of it, what's installed by Apple may count as a
>>>different distribution as well. It certainly includes more than just
>>>the official distribution.
>>
>>It's also old and probably won't be the same version in 10.5. If
"Will McGugan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You may be right. I always use plural nouns for collections.
ditto
> To me 'line' would suggest there was just one of them,
> so I assumed it was string.
I did too.
for line in file('skljflask.txt',r): # or similar
i
Alessandro Bottoni wrote:
...
> > - In college, I came to admire the Schaum's Outline book
> >approach--again heavy on problems and solutions! What's
> >the closest Python equivalent?
>
> Maybe this:
>
> Python Cookbook
> Alex Martelli, David Ascher
> O'Reilly
I'd rather s
I like to keep my classes each in a separate file with the same name of
the class. The problem with that is that I end up with multiple imports
in the beginning of each file, like this:
from foo.Bar import Bar
from foo.Blah import Blah
from foo.Zzz import Zzz
What I'd like to do would be to repla
Thus spake Echo ([EMAIL PROTECTED]):
> I have been working on handling unhanded exceptions and making a
> detailed print out of the traceback after the exception. I found that
> traceback.extract_tb worked nice and was quite simple.
>
> During my searching around I found out that it might be poss
Steve -
Wow, this is a pretty dense pyparsing program. You are really pushing
the envelope in your use of ParseResults, dicts, etc., but pretty much
everything seems to be working.
I still don't know the BNF you are working from, but here are some
other "shots in the dark":
1. I'm surprised fun
Hey guys,
I want to make my python program be installable on a mac, however I
have no access to a mac myself. Is there any way I can still use
py2app to create the app? Otherwise what other options do I
have? (google turned up nothing for me)
I don't want to require the users to have python in
Gregory Piñero wrote:
> Hey guys,
>
> I want to make my python program be installable on a mac, however I have
> no access to a mac myself. Is there any way I can still use py2app to
> create the app?
I don't think it's possible out-of-box. You would have to have the
Python.framework unpacked o
I'm just starting out on Python but my primary goal is to provide
applications with some user interface (GUI).
Can someone point me to a good comparison of whether I should use
wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)?
I'd prefer open source (not necessarily GPL though) t
[EMAIL PROTECTED] wrote:
> I like to keep my classes each in a separate file with the same name of
> the class. The problem with that is that I end up with multiple imports
> in the beginning of each file, like this:
>
> from foo.Bar import Bar
> from foo.Blah import Blah
> from foo.Zzz import Zzz
On Monday 12 September 2005 10:09 pm, [EMAIL PROTECTED] wrote:
> I like to keep my classes each in a separate file with the same name of
> the class. The problem with that is that I end up with multiple imports
> in the beginning of each file, like this:
>
> from foo.Bar import Bar
> from foo.Blah
Steven D'Aprano wrote:
> On Mon, 12 Sep 2005 08:33:10 -0700, Frank Millman wrote:
>
> > My problem is that, if someone has access to the network and to a
> > Python interpreter, they can get hold of a copy of my program and use
> > it to knock up their own client program that makes a connection to
Erich Schreiber <[EMAIL PROTECTED]> wrote:
> In the Python Library Reference the explanation of the time.sleep()
> function reads amongst others:
>
> > The actual suspension time may be less than that requested because
> > any caught signal will terminate the sleep() following execution
> > of
Frank Millman wrote:
> Steven D'Aprano wrote:
>
>>On Mon, 12 Sep 2005 08:33:10 -0700, Frank Millman wrote:
>>
>>>My problem is that, if someone has access to the network and to a
>>>Python interpreter, they can get hold of a copy of my program and use
>>>it to knock up their own client program tha
Steve M wrote:
[...]
> 1. Based on your description, don't trust the client. Therefore,
> "security", whatever that amounts to, basically has to happen on the
> server.
That's the right answer. Trying to enforce security within your
software running the client machine does not work. Forget the
101 - 148 of 148 matches
Mail list logo