You might want to take a look at the shelve module.
-Larry
Philipp H. Mohr wrote:
> Hello,
>
> I would like to store multiple dictionaries in a file, if possible one per
> line. My code currently produces a new dictionary every iteration and
> passes it on to another peace of code. In order to b
mmit to learning one language extremely well instead of
jumping all over with different languages that you can remember only
poorly. When new version of Python ships, you just learn what is new.
If you try to keep up with C, C++, Visual Basic, ... it gets to be
impossible.
Hope information helps.
a='test string'
print a.split()[:-1]
I'm assuming that you want the last space separated word?
Larry Bates
paulm wrote:
> Hi,
> In perl I can do something like:
>
> $a = 'test string';
> $a =~ /test (\w+)/;
> $b = $1;
> print
Take a look at py2exe it provides a way to "collect" all
necessary files together for you. Add Inno Installer to
the mix and you can create setup.exe insallation programs
that don't require a Python install to distribute software.
-Larry Bates
Guillaume Hiron wrote:
>
ilable on my machine.
Thanks in advance for any assistance.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
t
and then it is fixed in 100's (or 1000's) of existing programs
that use it.
-Larry Bates
[EMAIL PROTECTED] wrote:
> I've been reading the beloved Paul Graham's "Hackers and Painters".
> He claims he developed a web app at light speed using Lisp and lots
> of
-"
t=raw_input("Press return to continue")
sys.exit(2)
#
# set sys.excepthook
#
sys.excepthook=Myexcepthook
#
# create an uncaught divide by zero exception
#
a=1/0
-Larry Bates
Giles Brown wrote:
> For my sins I'm a MS Windows user at work and apart
pywin32 and COM is good. Seems to work for me.
Other methods (services, sockets, pipes, etc.)
can also work well, but it depends on what you
want to do and how you wish to communicate between
the modules.
Larry Bates
Philippe C. Martin wrote:
> Hi,
>
> I am looking for the pros an
Anybody have a copy they can share?
Thanks in advance,
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Never mind. Seems that the standard distribution at
www.python.org has it included (I was using ActiveState).
FYI, Larry
Larry Bates wrote:
> Well I'm still on my "quest". I've been putting this
> off for quite some time because I KNEW it was going to
> be hard
While not "curses" based this class will update screen as you
want. You could use it as a basis upon which to do a curses
version with your cursor positioning.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207
-Larry Bates
Mage wrote:
> Dear All,
>
"x=", x, " y=", y
return
def doanother(x, y, z):
print "x=", x, " y=", y, " z=", z
return
xdict={'dothat': dothat,
'doanother': doanother}
s='dothat'
t=(1,2)
xdict[s](*t)
results in:
x= 1
x27;)
#
# Strip out the punctuation characters
#
for line in ifp:
for punctuation in punctuations:
line=line.replace(punctuation,'')
ofp.write(line)
#
# I'll leave the other part for homework but
# you will need to use the .find method of the string
#
ifp.close()
ofp.c
seems to do any
good.
Has anyone else had this problem? Any ideas how I might fix
it?
Thanks in advance for your assistance.
Regards,
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
When I add files to my .ZIP files using python zipfile module
the date/time that is stored in mine is the one that comes from
the file's attributes. I'm not sure I understand why you think
yours are not.
-Larry Bates
Tim Williams (gmail) wrote:
> Using zipfile.Zipfile
>
> H
lways better performing and
support more features because ODBC is basically a lowest common
denominator approach. The native API can provide access to all
the (even unique) features of the particular database
IMHO-For Python to MySQL on Linux use the native interface is
the way to go.
Larry Bates
[
First you need to pick up a copy of Python Programming for Win32
book. It is a good starting place for GUI as well as COM and
writing services. It was well worth the price to me.
-Larry
Ernesto wrote:
> Hi all,
>
> Would anyone know a good place to start for learning how to build
> simple GUI'
n(x)-len(y))*[None],y)
I would probably wrap into function:
def foo(x,y):
if len(x) > len(y):
return zip(x,y+(len(x)-len(y))*[None])
return zip(x+(len(x)-len(y))*[None],y)
Larry Bates
David Isaac wrote:
> Newbie question:
>
> I have been generally open to the
ymedia
to play such files.
Here are some links that might be of interest:
http://www.win32com.de/index.php?option=com_content&task=view&id=141&Itemid=259
http://pymedia.org/tut/
Larry Bates
Jay wrote:
> Well, im not no expert on the python programming language but i just
> want
I adapted some code from David Boddie into a Python class to write
directly to Linux print queues. I have used it in one project and
it worked just fine. I've attached a copy for your use. You are
free to use it as you wish, with no guarantees or warranties.
Hope it helps.
Larry Bates
Python has built in eval function and doesn't require
a library.
Larry Bates
Dark Cowherd wrote:
> http://www.ucalc.com/mathparser/index.html
>
> There is a great library called UCALC which allows you to set up an
> expression and evaluate it
> for e.g. you an define an exp
Try something like:
class ludzik:
#
# Define an __init__ method that gets called when
# you instantiate the class. Notice also that I've
# allowed you to set x, and y parameters if you like.
# If you don't pass them they default to 1 and 2 as
# in your example.
#
them back apart anyway so keeping them as individual files
is a benefit.
Larry Bates
GMane Python wrote:
> Hello All.
> I have a program that downloads 'gigabytes' of Axis NetCam photos per day.
> Right now, I set up the process to put the images into a queue, and every 30
&g
s/clements/clements.html
http://forge.novell.com/modules/xfmod/project/?jythonnwkit
http://www.novell.com/products/openenterpriseserver/
Larry Bates
GMane Python wrote:
> Hello all. Looking, I have not found a version of Python which runs on
> Netware by Novell. I wonder, since Java the
use os.stat docs are here:
http://docs.python.org/lib/module-stat.html
Larry Bates
David Fickbohm wrote:
> People,
>
> I am trying to determine the creation date of files in a folder.
> I am using the following code to find the folder and confirm that files
> exist in the fold
You should download source for spambayes plug-in for
Outlook (written in Python) located at:
http://spambayes.sourceforge.net/windows.html
You might finds LOTS of good information for your
project.
-Larry Bates
Subir wrote:
> Hi,
>
> I am new to this group. I am trying to
Before you do too much work you should probably check out:
http://spambayes.sourceforge.net/
There has already been a lot of work done on this project.
FYI, Larry
David MacQuigg wrote:
> Are you as mad about spam as I am? Are you frustrated with the
> pessimism and lack of progress these last
an it would be to do in WebLogic or WebSphere. With
flexibility comes complexity. For less complex needs there are other
more lightweight things like CherryPy.
Hope info helps.
Larry Bates
Robert wrote:
> Hi,
> I know general Python pretty well and interested in using Python for a
> w
empty list. You can then do things
like:
a.one.append(something)
a.three.append(something)
Larry Bates
BBands wrote:
> I have a list with some strings in in it, 'one', 'two' 'three' and so
> on. I would like to add lists to a class with those names. I have no
May not be what you are looking for, but this works:
import os
s='setAttr ".ftn" -type "string" ' \
'/assets/chars/boya/geo/textures/lod1/ppbhat.tga";'
fname=os.path.basename(s.split()[-1])
BTW-It does depend on the file/path being the last it
Google turned up these links that might be of interest:
http://www.foretec.com/python/workshops/1998-11/demosession/hoegl/
http://www.webwareforpython.org/Webware/TaskKit/Docs/QuickStart.html
http://www.slac.stanford.edu/BFROOT/www/Computing/Distributed/Bookkeeping/SJM/SJMMain.htm
Larry Bates
Question: Why not just use Python to read the file?
f=open(filename, 'rb')
fcontents=f.read()
If you need to manipulate what is in fcontents you
can use struct module and/or slicing.
Larry Bates
Lil wrote:
> Hi Everyone! I've been trying to figure out this weird bug in my
&
Making a Python program into a service isn't all that "tedious".
Get a copy of Mark Hammonds "Python Programming on Win32" which
contains excellent examples on how to do this. I've written
several and after the first one, it is quite easy to do.
-Larry Bates
Are you sure the source directory exists and you
have rights to rename it? Because the rename works
for me.
But you may want to look at shutil.move and/or
use forward slashes (they work under Windows)
-Larry Bates
Tom wrote:
> I'm having a problem using a path with spaces as a para
The first question is why do you need tuples?
But this works:
import csv
filename=r'C:\test.txt'
fp=open(filename,'r')
reader=csv.reader(fp)
tlines=tuple([tuple(x) for x in reader])
fp.close()
Larry Bates
Luis P. Mendes wrote:
> Hi,
>
> I'm trying to so
h
better way to send 100Mb files.
Larry Bates
[EMAIL PROTECTED] wrote:
> Looking at the email package, it seems all the MIMExxx classes takes
> string but not file object as the payload. I need to handle very large
> MIME messages say up to 100M. And possibly many of them. Is email
> pa
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'm l
You might want to take a look at Webdrive (www.webdrive.com).
It does what I "think" you are describing for ftp, http,
https, and WebDAV.
-Larry Bates
Atila Olah wrote:
> On 1997/06/05 Peter Henning wrote:
>
>>SMB, ldap, imap4rev1
>>
>>Is there an SMB librar
I know Thomas Heller monitors this list but you should probably
post this to gmane.comp.python.py2exe as it is the py2exe
newsgroup.
FYI, Larry Bates
James Stroud wrote:
> Hello,
>
> My department has switched from vmware to wine/cxoffice. I have been playing
> with this all morni
ot x.endswith('DEL')]
This also is much easier to read (IMHO) than the loops, etc.
of the original code. In Python 2.4 list comprehensions are
also quite efficient.
Larry Bates
Dave Hansen wrote:
> OK, first, I don't often have the time to read this group, so
> apologies if this
Take a look at this recipe which is part of the latest
Python Cookbook. I think it will help you.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207
Larry Bates
Jeffrey E. Forcier wrote:
> This is a difficult issue to search for, and Googling (and reviewing
> the pertinent
(not tested):
import csv
.
.
.
outfile=open(r'D:\path\to\filename_sort1.csv', 'w')
CSVwriter=csv.writer(outfile, dialect='excel', delimiter='|')
CSVwriter.writerows(images)
Larry Bates
>
>
> if __name__ == '__main__':
> images = read_i
ReportLab Graphics.
-Larry Bates
Thierry Lam wrote:
> Let's say I have the following data:
>
> 500 objects:
> -100 are red
> -300 are blue
> -the rest are green
>
> Is there some python package which can represent the above information
> in a pie chart?
&
You need to tell us what library file (.dll) are you
accessing on Windows. The interface to whatever the
.dll is used for will most likely be completely
different on Linux.
-Larry Bates
Ernesto wrote:
> I'm in the process of moving a Python application from Windows to
> Linux. This
I've successfully used this toolkit to implement AES encryption in
a recent project.
http://www.amk.ca/python/code/crypto
-Larry Bates
Robert Kern wrote:
> Ed Hotchkiss wrote:
>
>>What's the best module for encryption with python, anyone out there
>>using py
If these were the lines what would the output look like?
>From your example it doesn't appear that any of the lines
would be eliminated.
Larry Bates
Reem Mohammed wrote:
> Hi
>
> Suppose we have data file like this one (Consider all lines as strings )
>
> 1 2 3 3 4 4
You don't define what you mean by "a lot". Python can read
a tremendous amount of information from files in a very short
amount of time so I wouldn't try to prematurely optimize this.
Just read the information and see how long it takes. If it
is really a long time, then look for alternatives. It
te a class with a interator that can
read the data from the file/table and return the PROPER data types
as lists, tuples, or dictionaries that are easy to manipulate.
-Larry Bates
York wrote:
> Hi,
>
> R language has very high-level IO functions, its read.table can read a
> total .csv
t;value2"
# "1","2","3"
# "2","4","5"
# "3","6","7"
table=csv.DictReader(fp)
for record in table:
#
# Record is a dictionary with keys as fieldnames
# and values of the data in each record
#
The prints can be done by defining an __str__ method on the
class, but I don't think you will get the type(obj) to work
the way you want.
class obj(object):
__default=1
y=2
def __str__(self):
return str(self.__default)
myobj=obj()
print "myobj=", myobj
print "myobj.y=", myobj
f, folders = None):
self.folders=folders or []
-Larry Bates
keithlackey wrote:
> I'm relatively new to python and I've run into this problem.
>
>
> DECLARING CLASS
>
> class structure:
> def __init__(self, folders = []):
>
'c:\test.txt','r')
inputfile=csv.DictReader(fp)
for record in inputfile:
print record
fp.close()
{'city': 'Atlanta', 'name': 'James R. Smith', 'zip': '30301',
'telephone': '4045551212', '
this area, YET.
I hope my random thoughts are helpful.
Larry Bates
sandy wrote:
Hi All,
I am a newbie to MySQL and Python. At the first place, I would like to
know what are the general performance issues (if any) of using MySQL
with Python.
By performance, I wanted to know how will the speed be, wh
What exactly do you want to happen when result
would be negative? I'll guess be zero:
pseudocode:
x=value
x=max(x-something, 0)
That way if it goes negative, it sticks to zero.
Larry Bates
Dirk Hagemann wrote:
Hi,
Is there a datatype in python which allows no negative values? I
subtract se
sted) also.
Larry Bates
Sean McIlroy wrote:
And now for a pair of questions that are completely different:
1) I'd like to be able to bind callbacks to presses of the arrow
buttons on the keyboard. How do you say that in Tkinter?
2) The function 'listdir' in os.path returns a list of a
orked with .DLLs
from many different manufacturers. Tricky part is having a
full definition of API to dll (e.g. argument types) and using
struct module to communicate between Python and the .DLL.
Larry Bates
Brent W. Hughes wrote:
I have a third-party DLL and it's associated .h file. The DLL w
ReportLab has pretty good Graphics Module. About the only thing
it needs is Python Imaging Library (which you would probably
want anyway).
Larry Bates
Erik Johnson wrote:
I am wanting to generate dynamic graphs for our website and would rather
not invest the time in developing the code to
Change the association for .pyc files to pythonw.exe
from python.exe.
Larry Bates
Philippe C. Martin wrote:
Hi,
For a few months now, I have been used .pyc script under XP without
getting the "DOS" box.
I just re-installed the scripts on another XP box and am now getting the
DOS box !
So
Tuples don't have all the nice methods that lists have
so convert it to a list.
tuple=('a','b','c','d')
l=list(tuple)
now you can do:
list.index('c')
which returns 2
Remember index returns -1 when nothing is found.
Larry Bates
Steve
this takes some getting accustomed to.
Larry Bates
Joseph Quigley wrote:
> hiya,
> i'm new to python (by a week) but am learning fast (that's what I like
> about python--it's simplicity). I got disgusted with C and C++ (i was
> learning) probably because of a bad co
Not exactly on point, but this is what I use in many of my
programs to show progress on long running console apps.
Larry Bates
class progressbarClass:
def __init__(self, finalcount, progresschar=None):
import sys
self.finalcount=finalcount
self.blockcount=0
)
I don't think I would never read 400,000 lines as a single
string and then split it. Just a suggestion.
Larry Bates
Jeremy Sanders wrote:
> I have a large string containing lines of text separated by '\n'. I'm
> currently using text.splitlines(True) to break the text
, 25 Feb 2005 10:57:59 -0600, Larry Bates wrote:
>
>
>>How did you get the string in memory in the first place?
>
>
> They're actually from a generated python script, acting as a saved file
> format, something like:
>
> interpret("""
> lots of l
egitimate reason for people to
be at that site.
Hope info helps.
Larry Bates
[EMAIL PROTECTED] wrote:
> Hello Kartic & NG,
>
> Thank you for your prompt answer. In effect, I'm trying to work on
> a NT network of 6 PC (plus the server). Sorry to not have been clearer.
>
On MS Windows use built in ODBC support to xBase files
which supports read and write access.
Larry Bates
Stan Cook wrote:
> Does anyone know how I can access and read data from a dbase (.dbf) file?
>
> Regards,
>
> Stan
--
http://mail.python.org/mailman/listinfo/python-list
There is a VERY large website that uses Zope/ZODB that takes up to
9000 hits per second when it gets busy. ZODB is very fast and
holds up well under load.
You should probably look at Plone. It is CMS already built on
top of Zope. Might safe you a LOT of work.
Larry Bates
Almad wrote
Take a look at python's struct module in the standard library.
Many people use it to manipulate binary objects at the byte
level with great success.
Larry Bates
cjl wrote:
> Hey all:
>
> I am working on a little script that needs to pull the strings out of a
> binary file, an
t;> x.value=11
error, x not in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> x.value=8
>>>
Larry Bates
M.N.A.Smadi wrote:
> does python support a C-like enum statement where one can define a
> variable with prespesified range of values?
>
> thanks
> m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
I see lots of others have made suggestions, but here is a method
that I use frequently:
define a dictionary that contains references to your functions:
def foo():
.
. whatever it does
.
def bar():
.
. whatever it does
.
xfer={'foo', foo, 'bar', bar}
Then you can write
for fname in fnames:
hon22\\lib\\site-packages\\wxPython']
error: 2.4.2.4: No such file or directory
The only thing that I can think of is that perhaps I've upgraded my
wxWindows version. I checked and 2.4.2.4 is the version, but I don't
know why py2exe is looking for such a directory.
Anybody out there have a clue?
Thanks in advance,
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Thomas,
Right on the mark. Thanks for the help.
Larry Bates
Thomas Heller wrote:
> Larry Bates <[EMAIL PROTECTED]> writes:
>
>
>>I had occasion to look back at a project I did over a year ago
>>and needed to make one small change. I use py2exe to package
>
d Windows tries to read a
directory and errors. Just follow what Peter Hansen has
suggested and write a wrapper function that calls os.walk
repeatedly for all the actual drives in your system
that are readable at all times. It isn't all that hard.
Larry Bates
rbt wrote:
> More of an OS
es that are required to registry or my .INI file.
4) Have Inno Installer compile everything together into setup.exe
viola' you have a single file that can be installed on any computer
that will run without Python installation.
-Larry Bates
[EMAIL PROTECTED] wrote:
> Hi All,
>
> I
are
> probably doomed to failure.
>
> Is there any way of injecting some of my code into the process of
> global name binding, or some other means of "capturing" global
> assignments ?
Suggestion:
Use ConfigParser to set your globals instead and you can track
yo
bs-mode: nil
>sentence-end-double-space: t
>fill-column: 70
>End:
I also don't miss a no-space option on print. I've always believed
that print statements with commas in them were for simple output with
little or no regard for formatting (like for debugging statements).
If I want precisely formatted output I use '%' formats or I build
the output line manually with joins or some other mechanism. The
''.join(seq) or ''.join([fn(x) for x in seq]) says exactly what
is being done to create the output string. I fail to see why
your proposed solution of:
for x in seq:
print fn(x),,
print
is clearer than:
print ''.join([fn(x) for x in seq])
Also your statement:
print 'The phone number is (',,extension,,')', number,,'.'
requires three double commas and can already be written
more clearly as:
print 'The phone number is ('+extension+') '+number'.'
or even more clearly (as you stated)
print 'The phone number is (%s) %s' % (extension, number)
Just my 2 cents.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
control you want and/or if it is a Windows GUI .exe.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
;)
f.SetOFNTitle("Open Text File")
result=f.DoModal()
if result == win32con.IDCANCEL: sys.exit()
print "path selected=", f.GetPathName()
print "Filename selected=", f.GetFileName()
Hope it helps.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
>
struct.pack is in the Standard Library and allows you to do what
you want. You may find that you must also do some "bit twiddling"
using << shift functions and | bit or function if you want to pack
tighter than on 4 bit boundaries.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
tartswith('password_')]
passwordentries.sort() # If you want to process them in order
or to get list of passwords
passwordlist=[INI.get(section, pk) for pk in passwordentries]
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
time object manually. However, if
> I try dir(d), where d is a DbiDate object, I get an empty list, so I
> cannot even see how to extract the elements.
>
> Does anyone know if this is possible, and if so, how?
>
> Many thanks
>
> Frank Millman
>
I've always used
ll take a shot.
fp=open(conf_data, 'r')
macro_lines=fp.readlines()
fp.close()
After this macro_lines will be a list with one line per element
such that macro_list[0] is the first line, macro_list[1] the
second, etc.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ReportLab Graphics module can produce graphics
and then save into many formats via Python Imaging
Library (PIL).
Larry Bates
Steven Feil wrote:
I am wondering if there is a light weight Python library for producing
web graphics on-the-fly. There is a C-language library called gd that
can be used
/adytumsolutions/HowToLoveZODB_PartII/HowToLoveZODB_PartI
http://www.h7.dion.ne.jp/~harm/ZODB-Tutorial.py
Larry Bates
Shivram U wrote:
Hi,
I want to store dictionaries on disk. I had a look at a few modules
like bsddb, shelve etc. However would it be possible for me to do the
following
hash[1] = [1, 2, 3] where
This eliminates the
need to have Python (and any extensions) installed on the
target machines. I (and many others) do this for all my
Windows software that is to be distributed.
Hope information helps.
Larry Bates
Omer Ahmad wrote:
Hi All,
I've been working with python for about 6 months now, and
mysql database if you want other
processing on the records.
The alternative is a good high-speed sort like Syncsort, etc.
Good Luck,
Larry Bates
Paul wrote:
Hi all
I have a sorting problem, but my experience with Python is rather
limited (3 days), so I am running this by the list first.
I have a large
Just because 2.4 arrives doesn't mean that ALL work is stopped
on 2.3. It is quite common to have releases overlap. The very
newest release is put out (2.4) , but bugs are still being fixed
in older (2.3).
Larry Bates
Luis M. Gonzalez wrote:
I'm confussed...
Python 2.4 (final) hs bee
necessary python .dlls.
2) Something to create a distribution. On Windows a
popular choice seems to be Inno Installer. It creates
a single setup.exe file that can be distributed and is
very flexible.
Hope info helps.
Larry Bates
Syscon, Inc.
Fredrik Lundh wrote:
Eddie Parker wrote:
What I’m
messages.
http://motion.technolust.cx/related/send_jpg.py
Here is a link to a class that wraps everything up very nicely. You
should be able to be sending SMTP emails with it in 10-15 minutes.
It supports binary attachments as well.
FYI,
Larry Bates
Chris wrote:
I'm trying to send an e-mail th
My method isn't elegant, but I use tempfile to create a
tempfile in the directory (inside a try block). If it
works, closing the file makes it go away.
Larry Bates
Syscon, Inc.
Qiangning Hong wrote:
I want to know if I can write files into a directory before I actually
perferm the write be
I just tried the link at it works from here. Site has
source and Windows binary versions of software. Looks
loke it is being maintained. Windows binary for Python
2.3 was added in September 2004. No 2.4 binary.
Larry Bates
Syscon, Inc.
Shawn Milo wrote:
Is anyone doing this? I would like to
will be precise.
Permisssion denied means that you don't have permission to
rename this file. Normally this is a rights issue.
BTW-os.rename works on XP.
Larry Bates
Syscon, Inc.
-g00t©- wrote:
--( oo )--
I don't know if there's a beginner board, just tell me if it
Steven,
Suggestion: It is a bad idea to name any variable
"map". When you do, you destroy your ability to call
Python's map function. Same goes for "list", "str",
or any other built-in function.
If you haven't been bitten by this you will, I was.
Larry
Great class for making this very easy located here:
http://motion.sourceforge.net/related/send_jpg.py
And is supports list of binary attachments that is
pretty tricky by hand.
Larry Bates
Syscon, Inc.
Philippe Reynolds wrote:
Hi,
I'm learning python...one of my tasks is to send out emails
self.mainFrame.Show()
self.SetTopWindow(self.mainFrame)
return True
This might not be the "best" way, but seems to work and models
what wxWindows appears to do internally.
Larry Bates
Syscon, Inc.
Martin Drautzburg wrote:
My wxPython program starts execution in mainFrame.py like this
thon than Java?
> - Is there anything similar to JSP in Java?
>
> Thanks,
> KanZen
>
You might want to take a look a Medusa. It is the basis for the
web server that is bundled in Zope.
http://www.nightmare.com/medusa/
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
CSV module (for reading comma delimited files)
or you might just be able to use simple .split() method (for
tab delimited files).
Hope info helps.
Regards,
Larry Bates
Ben wrote:
> I'm currently trying to develop a demonstrator in python for an
> ontology of a football team. At presen
ually the introduction of functions/classes that
divide the deeply nested grouping into more manageable
and debuggable pieces.
Larry Bates
Tim Tyler wrote:
> What do you guys think about Python's grouping of code via indentation?
>
> Is it good - perhaps because it saves space a
ng, but it is consistent with other languages
that allow single-line blocks this freedom and I don't
have a problem with "you can put one line after the colon
but not more than one" rule.
Larry Bates
James Stroud wrote:
> On Friday 25 March 2005 08:39 am, Ivan Van Laningham wrote
d, count in wordsLst:
outFile.write("%7s : %i\n" % (word, count))
I guess you assumed all your words were less than 7 characters long (which
I copied).
But there are many other "good" ways I'm sure.
Larry Bates
Qertoip wrote:
> Would you like to suggest me any improvem
'trace': 0, 'debuglevel': 2, 'outputfile': 'outfile.txt'}
F=foo(**global_dict)
Then if your nesting goes deeper, just pass **kwargs to functions or
classes that are lower down.
Hope this helps.
Larry Bates
bbands wrote:
> I've a 2,000 line and g
101 - 200 of 1109 matches
Mail list logo