send email with bcc

2012-11-30 Thread Ed
Hi,

I have found many different suggestions on "how to" code python to send a bcc 
email. None of which have worked in my environment - yet. Following is what I 
have at this time, which is erroring. Most of the code I've found will 
successfully send the message to the TO & CC recipients, but not the BCC. Any 
help is very much appreciated. Thx, Ed .


from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from smtplib import SMTP

to = 'e...@domain.gov'
cc = 'e...@gmailmail.com'
bcc = 'e...@domain.net'
sender = 'edsb...@domain.gov'

msg = MIMEMultipart()
msg['To'] = to
msg['Cc'] = cc
msg['Subject'] = 'Monthly Report'
msg['From'] = sender

smtp = SMTP("smtp.server.com")
# Start the server:
smtp.ehlo()

# Send the email
smtp.sendmail(sender, [to] + bcc, msg.as_string())

The above generates the following error:
Traceback (most recent call last):
  File "/opt/batch/ebtest/example4.py", line 46, in 
smtp.sendmail(sender, [to] + bcc, msg.as_string())

Other iterations of the code have worked without error, but do not send mail to 
the BCC recipient.

Thanks in advance for any assistance!
~Ed
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: send email with bcc

2012-11-30 Thread Ed
Oops. Sorry 'bout that. I somehow didn't grab the entire traceback info. Well, 
turns out one if not more of my BCC attempts is working. Just thought to check 
my spam filter of the BCC email address and there are quite a few messages in 
there. I've got it working now.

Thanks to you both for the quick responses!!
~Ed
-- 
http://mail.python.org/mailman/listinfo/python-list


threads/sockets quick question.

2005-09-18 Thread ed
this script should create individual threads to scan a range of IP
addresses, but it doesnt, it simple ... does nothing. it doesnt hang
over anything, the thread is not being executed, any ideas anyone?
--

import socket
import threading
import traceback


MAX_THREADS = 50


class scanThread(threading.Thread):
def run(self):
try:
ss = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ss.connect((ip, port_counter))
print "%s | %d OPEN" % (ip, port_counter)
ss.close()
print "scanned: ",port_counter,"\n"
except:
traceback.print_exc()
# end class ---


def scan(ip, begin, end):
port_counter = 0
for port_counter in range(begin, end):
while threading < MAX_THREADS:
scanThread().start()
# end function ---
scan("localhost", 0, 1)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: threads/sockets quick question.

2005-09-19 Thread ed
import socket
import threading
import traceback


class scanThread(threading.Thread):
def run(self):
try:
ss = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ss.connect((ip, port_counter))
print "%s | %d OPEN" % (ip, port_counter)
ss.close()
print "scanned: ",port_counter,"\n"
except:
traceback.print_exc()
# end class ---


def scan(ip, thebegin, theend):
global ip
global thebegin
global theend
port_counter = 0
 for port_counter in range(thebegin, theend):
scanThread().start()
# end function ---
scan("localhost", 0, 1)

-- 
http://mail.python.org/mailman/listinfo/python-list


how to list files with extension .txt in windows?

2004-12-02 Thread ed
hi I ahve a simple question and is new to python.
I have a folder in windows that contains some .txt files.
the fucntion that i want to do is whenever there is new directory
created (say 249, thos enew directorys are always in numbers in 3
digit), i want to grap that 249 and the previous created one (say
230), then call a .btm script TWICE which accepts these two numbers as
parameters. so the script I called will be under 4NT and synatax under
4NT are:
script 230 249
script 230 249 A

How can i do that in python.

Those two folders sits on network drive and I have mapped that to G:\
drive.
platform I am on is windows 2000 or XP pro.

I have used batch script to do it but it has a lot of issues with
access denied... errors I pretty much given up using batch to do this.

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to list files with extension .txt in windows?

2004-12-03 Thread ed
I do have  permission toa ccess the file as that file is careted and read my me.
I have read/write access to that location. regards
Aaron Bingham <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> ed wrote:
> 
> >I have used batch script to do it but it has a lot of issues with
> >access denied... errors I pretty much given up using batch to do this.
> >  
> >
> If you do not have permission to access the files, switching to a 
> different language will not help you.  You need to determine the cause 
> of your access errors first.
> 
> Aaron
-- 
http://mail.python.org/mailman/listinfo/python-list


learn from the masters of python and other languages, free

2014-11-17 Thread ed
Hey all,

Wanted to let you know about a special opportunity for subscribers to this 
list..

I'm hosting a virtual conference called hack.summit() happening December 1-4, 
where you can learn from some of the best programmers in the world.  An 
unprecedented line-up of programmers are speaking, including creators of Ruby 
on Rails, CSS, Google Glass, the Java language spec, Agile, Extreme 
Programming, Test Driven Development, Heroku, Spark, Bittorrent, UML, the Wiki, 
and many more.

ALL proceeds go to support coding non-profits, such as ones that help drive 
inclusivity and diversity in the coding space.

I'm happy to offer you guys free passes to bypass the registration process and 
join for free.  Just visit hacksummit.org and register using the code 
REGISTERFREE.

Over 12,000 developers registered in the first few days -- if this continues, 
then this will be one of the largest developer events ever held.  You're not 
going to want to miss it.

Hope to see you at the summit, and thanks for your time :)
-- 
https://mail.python.org/mailman/listinfo/python-list


Building Python with gdbm support

2005-06-05 Thread Ed
I am trying to use a Perl script which requires a Database module other
than "dbm" to be the default Mod.  So, what the script is checking is

import anydbm
if (anydbm._defaultmod.__name__ == 'dumbdbm'
or anydbm._defaultmod.__name__ == 'dbm'):

First of, I'm doing this on a Sparc/Solaris 8 box.

So, I'm trying to get gdbm to be the default mod.  I've downloaded and
built gdbm-1.8.3.  It has not been build to /usr (I don't have root
access). I've built this fine.

When I build Python 2.4.1, it at first doesn't pick up on the gdbm
module ("dbm" is still the default module, and Modules directory in the
Python source doesn'thave a .o file for the gdbmmodule file).

I've nosed around, and found the a line commented out Modules/Setup
file, regarding building the gdbm module.  I uncommented it (being sure
that the approrpiate directories for the .h and lib files are
provided), and it looked like it built the module.  But when I attempt
to start python, I get an error:

ld.so.1: python: fatal: libgdbm.so.3: open failed: No such file or
directory
Killed


Look, the bottom line is I don't know what the correct steps are to get
the gdbm module built in as part of the Python installation (as well as
setting it as the default database module).  I've tried to piece
together bits and pieces of various newsgroup messages, as I haven't
found a decent spot for any doco.

Can anyone point me in the right direction, in regards to how to get my
Python installation set up the way I want?

Is it correct to edit the Modules/Setup file?  I would have thought
that the configure approach would support these types of isses, rather
than manually editing a file?  Should I be using the setup.py script?
I have no idea what that does, or where I would call it, but the name
of it sounds like it should be included?

Thanks for any help,
Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with gdbm support

2005-06-05 Thread Ed
I've actually sorted myself out.  I updated Modules/Setup.dist, so that
it has the following line...

gdbm gdbmmodule.c -I/ct/ctapp/gnu/bin/gdbm-1.8.3/include
-L/ct/ctapp/gnu/bin/gdbm-1.8.3/lib -lgdbm

Rebuilt everything in Python.  I also had to ensure that my environment
using the newly-built Python contained the gdbm/lib directory in it's
LD_LIBRARY_PATH (the same value as what's passed to -L in the above
line).

I'm assuming this is alright.  I guess if I change anything, I have to
remember to update Setup.dist.  If I'm missing a step, or if there's an
easier way, I'm all ears... :)

Thanks,
Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


Newbie question: how to get started?

2007-06-16 Thread ed
Hi,

I'm interested in starting to learn python.  I'm looking for any 
reccomendations or advice that I can use to get started.  Looking 
forward to any help you can give!

Thanks!

-e

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie question: how to get started?

2007-06-16 Thread ed
I should also mention that I know C/C++, Perl, Javascript, the basics 
of mySQL, and HTML/CSS.  If anyone has tried to enter python from these 
angles, I'd be grateful to hear from you.

On 2007-06-16 22:48:32 -0400, ed <[EMAIL PROTECTED]> said:

> Hi,
> 
> I'm interested in starting to learn python.  I'm looking for any 
> reccomendations or advice that I can use to get started.  Looking 
> forward to any help you can give!
> 
> Thanks!
> 
> -e


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The Modernization of Emacs

2007-06-19 Thread Ed
On 19 Juni, 07:14, Harry George
>
> I've used emacs since the 1980's.
...
> --
> Harry George
> PLM Engineering Architecture

I've asked this question on an emacs forum and got no response, so I
presume the answer is no, but I see, Harry, that you're a veteran, so
maybe you've seen things few others have.

Have you ever seen an, "Extract method," function for emacs? Whereby
you highlight some lines of code, press a key, and the code is whisked
into its own method, with the appropriate method invocation left in
its place. If you could post a link, that'd be just champion.

.ed

--

www.EdmundKirwan.com - Home of The Fractal Class Composition

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The Modernization of Emacs

2007-06-20 Thread Ed
Thanks, all, for the answers.

But, Lew: GWMF?

- Gardner Winter Music Festival? (You have to love the black'n'white
photo on the right at: http://www.gwmf.org/)

- Generalized Whitening-Matched Filter?

- http://www.gwmf.com/  ?

- http://www.gwmf.de/host/ ?

- http://www.goatworld.com/gwmf.shtml  

.ed

--

www.EdmundKirwan.com - Home of The Fractal Class Composition

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The best platform and editor for Python

2007-07-03 Thread ed
for my part, i'm a big fan of DrPython for writing python
code (especially on windows).
http://drpython.sourceforge.net/

you will need wxPython to have it running though

 It's not per se an IDE but it
has a lot of feature to help you writing with some interesting plug-
ins.
You can launch code in the IDE, you have an inserted console etc.

Oh and it's written in python :)

./ed


-- 
http://mail.python.org/mailman/listinfo/python-list


Why can't I assign a class method to a variable?

2008-10-22 Thread ed

I'm trying to make a shortcut by doing this:

t = Globals.ThisClass.ThisMethod

Calling t results in an unbound method error.

Is it possible to do what I want?  I call this method in hundreds of 
locations and I'm trying to cut down on the visual clutter.


Thank you!
--
http://mail.python.org/mailman/listinfo/python-list


Message box always appears on 2nd monitor

2009-09-11 Thread ed

No matter what I do, the MessageBox always appears on the 2nd monitor.
I've forced all the other widgets to monitor 1.
I thought that creating a class and forcing the position would help, but 
it hasn't.


I'm using Ubuntu Jaunty, python 2.6.

Any ideas what I can do to force widgets to a specific monitor?

Thank you.

class ConnectErrorMsgBox( wx.Frame ):
def __init__( self ):
wx.Frame.__init__(self,None, -1, '', pos=(0,0) )
self.SetPosition( (0, 0) )
wx.MessageBox(message='Connect Error',
 caption='Status',
 style=wx.OK | wx.ICON_EXCLAMATION| wx.CENTER,
 x=0, y=0)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Message box always appears on 2nd monitor

2009-09-14 Thread ed

Sean DiZazzo wrote:

On Sep 11, 8:27 am, ed  wrote:

No matter what I do, the MessageBox always appears on the 2nd monitor.
I've forced all the other widgets to monitor 1.
I thought that creating a class and forcing the position would help, but
it hasn't.

I'm using Ubuntu Jaunty, python 2.6.

Any ideas what I can do to force widgets to a specific monitor?

Thank you.

class ConnectErrorMsgBox( wx.Frame ):
 def __init__( self ):
 wx.Frame.__init__(self,None, -1, '', pos=(0,0) )
 self.SetPosition( (0, 0) )
 wx.MessageBox(message='Connect Error',
  caption='Status',
  style=wx.OK | wx.ICON_EXCLAMATION| wx.CENTER,
  x=0, y=0)


Did you try making the message box a child of whatever window called
it?  ie.  Pass in the "parent=" attribute.

~Sean


Now I have.  That did the trick.  Thank you.
--
http://mail.python.org/mailman/listinfo/python-list


Re: PEP8 79 char max

2013-07-29 Thread Ed Leafe
On Jul 29, 2013, at 3:08 PM, Joel Goldstick  wrote:

>> Would following
>> this recommendation improve script performance?
> 
> Not performance, but human readability

IMO, this isn't always the case. There are many lines of code that are 
broken up to meet the 79 character limit, and as a result become much less 
readable. 


-- Ed Leafe





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP8 79 char max

2013-07-29 Thread Ed Leafe
On Jul 29, 2013, at 5:30 PM, Devyn Collier Johnson  
wrote:

> Evidently, it is personal preference. I prefer to read computer code like a 
> book (yes, I am a weirdo (^u^)). The only time I exced 79 characters is when 
> I write a set of commands that perform similar tasks. I do not make too many 
> lines over 79 char. Thanks everyone for the comments and feedback.

I have heard this statement before, and so I'm wondering: do you read books 
printed in monospaced typefaces, or do they have proportional fonts? I've yet 
to come across anything meant to be read as literature that was monospaced, 
because it is much harder to read.

I had read about a developer who switched to using proportional fonts for 
coding, and somewhat skeptically, tried it out. After a day or so it stopped 
looking strange, and after a week it seemed so much easier to read. I only 
switched back because I found I lost productivity switching from vim to a 
graphical text editor.


-- Ed Leafe





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Foxpro goto command and deleted records

2012-07-18 Thread Ed Leafe
On Jul 17, 2012, at 5:57 PM, Ethan Furman wrote:

> In Foxpro if you do a
> 
> GOTO 7
> 
> with deleted off and record 7 is deleted, the record pointer doesn't
> move (at least in version 6).
> 
> I don't like that.
> 
> I see four other options:
> 
> 0) don't move the pointer (listed for completeness)
> 1) go to that record anyway
> 2) go to the next undeleted record
> 3) go to the seventh undeleted record (possibly the least practical)
> 4) raise an exception
> 
> Any opinions?

It's been many years since I fired up VFP, but the above doesn't sound 
correct. If you have SET DELETED OFF and the GOTO 7, the pointer should move to 
the 7th record, whether it is marked deleted or not. With SET DELETED ON, the 
pointer should not move, since 7 is not a valid record.


-- Ed Leafe



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Foxpro goto command and deleted records

2012-07-18 Thread Ed Leafe
On Jul 18, 2012, at 12:16 PM, Ethan Furman wrote:

> Your memory is good!  I typed it in wrong.

Well, I was an MVP for Visual Foxpro for 10 years, so... 

;-)

> I see four other options:
> 
> 0) don't move the pointer (listed for completeness)
> 1) go to that record anyway
> 2) go to the next undeleted record
> 3) go to the seventh undeleted record (possibly the least practical)
> 4) raise an exception
> 
> I still don't like it.  Any opinion on the other four choices?  I'm leaning 
> towards 1, possibly with 4 as an option:

#4 is probably the most Pythonic approach. The calling code can then 
decide how to react to attempting to access a deleted record. Even if you're 
accessing data stored in VFP tables, your module should be as Pythonic as 
possible.

> Part of the reason I feel this is reasonable is that with my dbf module it is 
> possible to create an index that does /not/ include certain records:

Deleting a record in VFP doesn't remove it from the index; I believe it 
marks that index entry as deleted, too. I think that as long as you treat the 
deleted status as the same as any other boolean column you'll be good.


-- Ed Leafe



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Foxpro goto command and deleted records

2012-07-18 Thread Ed Leafe
On Jul 18, 2012, at 12:57 PM, MRAB wrote:

>>  #4 is probably the most Pythonic approach. The calling code can then 
>> decide how to react to attempting to access a deleted record. Even if you're 
>> accessing data stored in VFP tables, your module should be as Pythonic as 
>> possible.
>> 
> I disagree. I think that if you can see it should be able to go to it.

The use case was a deleted record with SET DELETED ON, which means you 
shouldn't "see" it. 


-- Ed Leafe



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: dbf.py API question

2012-08-07 Thread Ed Leafe
On Aug 2, 2012, at 10:55 AM, Ethan Furman wrote:

> SQLite has a neat feature where if you give it a the file-name of ':memory:' 
> the resulting table is in memory and not on disk.  I thought it was a cool 
> feature, but expanded it slightly: any name surrounded by colons results in 
> an in-memory table.
> 
> I'm looking at the same type of situation with indices, but now I'm wondering 
> if the :name: method is not pythonic and I should use a flag (in_memory=True) 
> when memory storage instead of disk storage is desired.

When converting from paradigms in other languages, I've often been 
tempted to follow the accepted pattern for that language, and I've almost 
always regretted it.

    When in doubt, make it as Pythonic as possible.


-- Ed Leafe



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Quickie - Regexp for a string not at the beginning of the line

2012-10-25 Thread Ed Morton

On 10/25/2012 8:08 PM, Rivka Miller wrote:

On Oct 25, 2:27 pm, Danny  wrote:

Why you just don't give us the string/input, say a line or two, and what you 
want off of it, so we can tell better what to suggest


no one has really helped yet.


Because there is no solution - there IS no _RE_ that will match a string not at 
the beginning of a line.


Now if you want to know how to extract a string that matches an RE in awk, 
that'd be (just one way):


   awk 'match($0,/.[$]hello[$]/) { print substr($0,RSTART+1,RLENGTH-1) }'

and other tools would have their ways of producing the same output, but that's 
not the question you're asking.


Ed.


I want to search and modify.

I dont wanna be tied to a specific language etc so I just want a
regexp and as many versions as possible. Maybe I should try in emacs
and so I am now posting to emacs groups also, although javascript has
rich set of regexp facilities.

examples

$hello$ should not be selected but
not hello but all of the $hello$ and $hello$ ... $hello$ each one
selected

=
original post
=


Hello Programmers,

I am looking for a regexp for a string not at the beginning of the
line.

For example, I want to find $hello$ that does not occur at the
beginning of the string, ie all $hello$ that exclude ^$hello$.

In addition, if you have a more difficult problem along the same
lines, I would appreciate it. For a single character, eg < not at the
beginning of the line, it is easier, ie

^[^<]+<

but I cant use the same method for more than one character string as
permutation is present and probably for more than one occurrence,
greedy or non-greedy version of [^<]+ would pick first or last but not
the middle ones, unless I break the line as I go and use the non-
greedy version of +. I do have the non-greedy version available, but
what if I didnt?

If you cannot solve the problem completely, just give me a quick
solution with the first non beginning of the line and I will go from
there as I need it in a hurry.

Thanks



--
http://mail.python.org/mailman/listinfo/python-list


Re: Quickie - Regexp for a string not at the beginning of the line

2012-10-26 Thread Ed Morton

On 10/25/2012 11:45 PM, Rivka Miller wrote:

Thanks everyone, esp this gentleman.

The solution that worked best for me is just to use a DOT before the
string as the one at the beginning of the line did not have any char
before it.


That's fine but do you understand that that is not an RE that matches on 
"$hello$ not at the start of a line", it's an RE that matches on "char>$hello$ anywhere in the line"? There's a difference - if you use a tool 
that prints the text that matches an RE then the output if the first RE existed 
would be "$hello$" while the output for the second RE would be "X$hello$" or 
"Y$hello$" or


In some tools you can use /(.)$hello$/ or similar to ignore the first part of 
the RE "(.)" and just print the second "$hello", but that ability and it's 
syntax is tool-specific, you still can't say "here's an RE that does this", 
you've got to say "here's how to find this text using tool ".


   Ed.


I guess, this requires the ability to ignore the CARAT as the beginning of the 
line.

I am a satisfied custormer. No need for returns. :)

On Oct 25, 7:11 pm, Ben Bacarisse  wrote:

Rivka Miller  writes:

On Oct 25, 2:27 pm, Danny  wrote:

Why you just don't give us the string/input, say a line or two, and
what you want off of it, so we can tell better what to suggest



no one has really helped yet.


Really?  I was going to reply but then I saw Janis had given you the
answer.  If it's not the answer, you should just reply saying what it is
that's wrong with it.


I want to search and modify.


Ah.  That was missing from the original post.  You can't expect people
to help with questions that weren't asked!  To replace you will usually
have to capture the single preceding character.  E.g. in sed:

   sed -e 's/\(.\)$hello\$/\1XXX/'

but some RE engines (Perl's, for example) allow you specify zero-width
assertions.  You could, in Perl, write

   s/(?<=.)\$hello\$/XXX/

without having to capture whatever preceded the target string.  But
since Perl also has negative zero-width look-behind you can code your
request even more directly:

   s/(?
I dont wanna be tied to a specific language etc so I just want a
regexp and as many versions as possible. Maybe I should try in emacs
and so I am now posting to emacs groups also, although javascript has
rich set of regexp facilities.


You can't always have a universal solution because different PE
implementations have different syntax and semantics, but you should be
able to translate Janis's solution of matching *something* before your
target into every RE implementation around.


examples



$hello$ should not be selected but
not hello but all of the $hello$ and $hello$ ... $hello$ each one
selected


I have taken your $s to be literal.  That's not 100 obvious since $ is a
common (universal?) RE meta-character.


--
Ben.




--
http://mail.python.org/mailman/listinfo/python-list


Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Ed Leafe
Religious fervor is one thing; freedom of religion is another!  ;-)

We strive for readability in our code, yet every printed material designed to 
be read, such as books, newspapers, etc., uses a proportional font. I switched 
to proportional fonts years ago, and am only reluctantly using fixed width 
because of vim. It doesn't take as long to get used to as you might think. 

-- Ed

Sent from my iPhone, so please excuse any top-posting.

On Jul 21, 2011, at 8:12 PM, Roy Smith  wrote:

> There are very few things I am absolutely religious about, but 
> programming in a fixed width font is one of them.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Abandoning Python

2011-05-22 Thread Ed Keith
Have you looked at Falcon (http://www.falconpl.org/)? It seems to have a lot of 
what you are looking for. I do not have much experience with it but I like what 
I've seen so far, except that there are not any third party tools or libraries 
libraries. Which is where Python shines.

   -EdK

Ed Keith
e_...@yahoo.com

Blog: edkeith.blogspot.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
I do not have my library with me, but I remember a book that fits the bill 
exactly, is was from Microsoft Press, I think it was called "Writing Solid Code"

Hope this helps,

   -EdK

Ed Keith
e_...@yahoo.com

Blog: edkeith.blogspot.com


--- On Wed, 5/25/11, Matty Sarro  wrote:

> From: Matty Sarro 
> Subject: Kind of OT - Books on software development?
> To: "Python list" 
> Date: Wednesday, May 25, 2011, 11:40 AM
> Hey everyone,
> I am looking at some projects coming up, which may or may
> not involve
> python. So I figured I would throw the question out there
> and see what
> everyone thinks.
> I am looking for some books on software
> engineering/development...
> something that discusses techniques from ideation, up
> through testing,
> QA, production, and then maintenance. Is there such a
> book?
> -Matthew
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
--- On Wed, 5/25/11, Ed Keith  wrote:

> I do not have my library with me, but
> I remember a book that fits the bill exactly, is was from
> Microsoft Press, I think it was called "Writing Solid Code"

I have done some research at amazon.com, and while "Writing Solid Code" is an 
excellent book that I would also recommend highly, the book I was thinking of 
was "Code Complete".

   -EdK

Ed Keith
e_...@yahoo.com

Blog: edkeith.blogspot.com


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Ed Leafe
On Jan 26, 2021, at 18:16, Grant Edwards  wrote:
> 
>> How do you troubleshooting/debugging in Python?
> 
> Mostly I read exception trace and read the code and think about it.
> 
> If that doesn't work, I add some print() or syslog() calls.
> 
> If I really get stuck, I try to write as small a program as possible
> that demonstrates the problem.

I do the first two, but if I get really stuck, I use the pudb debugger 
(https://pypi.org/project/pudb/).

Using that, I can see all the locals, jump to any point in the stack and see 
the locals there, or shell into ipython if I need to run some quick code. For 
me, this is much faster than trying to write an additional program that is 
close enough to the problem code to be useful.

-- Ed Leafe






-- 
https://mail.python.org/mailman/listinfo/python-list


I need help with this python regex

2018-04-27 Thread Ed Manning
Here is the source code.


import re


log = open("csg.txt", "r") # Opens a file call session.txt
regex = re.compile(r'policy id \d+') # search for the policy ID
regex1 = re.compile(r'log count \d+') # search for the policy ID

for match in log:
x = regex.findall(match)
y = regex1.findall(match)

q = x + y
print(q)
 

The problem I am having i when it print out ti looks like this


L'Policy ID 243"|
[]
[]
[]
[]
[]
[]
[]
[]
{'log count 777,"]



How so I fix the code sone that it does not print empty []






Here so to the test file 


 get policy id 243
name:"csg to wes" (id 243), zone csg -> fwc,action Permit, status "enabled"
10 sources: "206.221.59.229", "206.221.59.246/32", "csg_205.144.151.107/32", 
"csg_205.144.151.177/32", "csg_205.144.151.24/32", "csg_205.144.152.50/32", 
"csg_205.144.153.55/32", "csg_206.221.59.244/32", "csg_206.221.59.250/32", 
"csg_206.221.61.29/32"
19 destinations: "MIP(204.235.119.135)", "MIP(204.235.119.136)", 
"MIP(204.235.119.243)", "MIP(204.235.119.34)", "MIP(204.235.119.39)", 
"MIP(204.235.119.40)", "MIP(204.235.119.41)", "MIP(204.235.119.42)", 
"MIP(204.235.119.43)", "MIP(204.235.119.44)", "MIP(204.235.119.45)", 
"MIP(204.235.119.46)", "MIP(204.235.119.47)", "MIP(204.235.119.50)", 
"MIP(204.235.119.51)", "MIP(204.235.119.52)", "MIP(204.235.119.79)", 
"MIP(204.235.119.82)", "MIP(204.235.119.83)"
1 service: "ANY"
Rules on this VPN policy: 0
nat off, Web filtering : disabled
vpn unknown vpn, policy flag 0001, session backup: on
traffic shaping off, scheduler n/a, serv flag 00
log close, log count 777, alert no, counter yes(79) byte rate(sec/min) 0/0
total octets 0, counter(session/packet/octet) 0/0/79
priority 7, diffserv marking Off
tadapter: state off, gbw/mbw 0/0 policing (no)
No Authentication
No User, User Group or Group expression se
 get policy id 602
name:"ID 36129" (id 602), zone csg -> fwc,action Permit, status "enabled"
src "csg_205.144.151.107/32", dst "MIP(204.235.119.191)", serv "ANY"
Rules on this VPN policy: 0
nat off, Web filtering : disabled
vpn unknown vpn, policy flag 0001, session backup: on
traffic shaping off, scheduler n/a, serv flag 00
log close, log count 0, alert no, counter yes(80) byte rate(sec/min) 0/0
total octets 0, counter(session/packet/octet) 0/0/80
priority 7, diffserv marking Off
tadapter: state off, gbw/mbw 0/0 policing (no)
No Authentication
No User, User Group or Group expression set
csg-vx-fw-n-12:csg-vx-fw-n-01(M)-> get policy id 420
name:"ID 12637" (id 420), zone csg -> fwc,action Permit, status "enabled"
1 source: "csg_204.235.119.78/32"
1 destination: "eg_csg"
6 services: "PING", "tcp_30001-30100", "tcp_6051-6055", "tcp_7041-7091", 
"TELNET", "TRACEROUTE"
Rules on this VPN policy: 0
nat off, Web filtering : disabled
vpn unknown vpn, policy flag 0001, session backup: on
traffic shaping off, scheduler n/a, serv flag 00
log close, log count 0, alert no, counter yes(81) byte rate(sec/min) 0/0
total octets 0, counter(session/packet/octet) 0/0/81
priority 7, diffserv marking Off
tadapter: state off, gbw/mbw 0/0 policing (no)
No Authentication
No User, User Group or Group expression set
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python web server weirdness

2018-06-07 Thread Ed Kellett
On 2018-06-07 14:32, Steven D'Aprano wrote:
> I'm following the instructions here:
> 
> https://docs.python.org/3/library/http.server.html
> 
> 
> and running this from the command line as a regular unprivileged user:
> 
> python3.5 -m http.server 8000
> 
> What I expected was a directory listing of my current directory.
> 
> What I got was Livejournal's front page.
> 
> W.T.F.???
> 
> 

Do you have LiveJournal's index.html in your current directory?



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why exception from os.path.exists()?

2018-06-09 Thread Ed Kellett
On 2018-06-08 03:42, Chris Angelico wrote:
> Apart from the one odd bug with SimpleHTTPServer not properly sending
> back 500s, I very much doubt that the original concern - namely that
> os.path.exists() and os.stat() raise ValueError if therels a %00 in
> the URL - can be abused effectively.
Dismissing HTTP 500s as "not a vulnerability" sounds reasonable enough
to me. But you're assuming that all other expressions of this bug in
applications will be at least as benign. I'm not sure that that's warranted.



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Splitting up large python module impact on performance?

2018-06-13 Thread Ed Kellett
On 2018-06-13 05:24, Chris Angelico wrote:
> Oh wait, your code isn't anything remotely sane. But for the rest of
> us, large files aren't a problem.

I don't like large files--I think mostly because files are an
organisational tool, they're quite good at that job, and one might as
well use them. But slightly more concretely, Python encourages us to use
module scope for things like imports, which can easily get messy and
confusing when files are large. A find feature isn't a replacement for a
global scope that's small enough to remember.



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Does inspect.getstack work on other Python implementations?

2018-06-17 Thread Ed Kellett
On 2018-06-17 10:19, Steven D'Aprano wrote:
> Anyone here use IronPython, Jython or PyPy?
> 
> Does inspect.getstack always work? Is it considered an implementation
> detail for CPython or something promised to work on any compliant
> Python interpreter?
> 
> I see that it doesn't even exist on Jython 2.5, does anyone know 
> whether it exists in later versions?

Well, inspect.currentframe says:

> CPython implementation detail: This function relies on Python stack 
> frame support in the interpreter, which isn’t guaranteed to exist in 
> all implementations of Python. If running in an implementation 
> without Python stack frame support this function returns None.

and presumably if stack frame support isn't guaranteed to exist for one
inspect function it's similarly un-guaranteed in others.



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-18 Thread Ed Kellett
On 2018-06-18 13:18, Chris Angelico wrote:
> 1) Parse the code, keeping all the non-essential parts as well as the
> essential parts.
> 2) Find the comments, or find the annotations
> 3) If comments, figure out if they're the ones you want to remove.
> 4) Reconstruct the file without the bits you want to remember.
> 
> Step 3 is removed if you're using syntactic annotations. Otherwise,
> they're identical.

It's likely that Python comments are much easier to remove than
arbitrary bits of Python syntax--you need to know the answer to "am I in
a string literal?", which is a lexical analysis problem you could hack
together a solution for over the course of about one coffee, as opposed
to "where exactly am I in the Python parse tree?", which is... harder.
The information you need to keep track of and later reconstruct is
substantially simpler, too.

I don't think "they're hard to mechanically remove" is a particularly
good argument against type hints, but considered on its own it probably
is true.



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-18 Thread Ed Kellett
are you someone's ironic 3rd-year art project



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-19 Thread Ed Kellett
On 2018-06-19 11:21, Chris Angelico wrote:
> Isn't it nice how comments, being terminated exclusively by
> end-of-line, allow the introduction of subtle bugs? Let's see how many
> people spot the (presumably deliberate) bug in Steve's code here.

Hardly subtle.

It does also make them considerably easier to remove from code. I think
we're all--still--missing the larger point that "easy to remove" is a
completely stupid metric for judging language features. Seriously. Not a
little bit stupid. What would Python look like if every new feature had
to be possible to grep out?



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Static variables [was Re: syntax difference]

2018-06-23 Thread Ed Kellett
On 2018-06-23 06:21, Chris Angelico wrote:
> Let's start finding all the edge cases that don't work, so I can work
> on fixing them :)

Very long functions (or, more specifically, functions with a very large
number of consts) will likely prove annoying.



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Static variables [was Re: syntax difference]

2018-06-24 Thread Ed Kellett
From: Ed Kellett 

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Xw5fa1GFtucLPGBT1sLtLtUpmbraGkiYl
Content-Type: multipart/mixed; boundary="lDyl22ZCUIEM3fl5YMnfJ3B8O9bwBCY9r";
 protected-headers="v1"
From: Ed Kellett 
To: python-list@python.org
Message-ID: <98ecd8c1-13b7-8317-8177-6a3592171...@kellett.im>
Subject: Re: Static variables [was Re: syntax difference]
References: <72edc16a-69e0-41a2-bec3-290083f6e...@googlegroups.com>
 
 
 
 <01092eb6-172f-5ee0-91fb-4e3e1df99...@gmail.com>
 
 
 <6eUVC.491716$Qg7.378011@fx08.am4> 
 
 
 
 
 
 
 <2937f981-e2dc-41d6-9d89-373496cb5...@googlegroups.com>
 
 
 
 
 
 
In-Reply-To: 

--lDyl22ZCUIEM3fl5YMnfJ3B8O9bwBCY9r
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 2018-06-23 06:21, Chris Angelico wrote:
> Let's start finding all the edge cases that don't work, so I can work
> on fixing them :)

Very long functions (or, more specifically, functions with a very large number
of consts) will likely prove annoying.


--lDyl22ZCUIEM3fl5YMnfJ3B8O9bwBCY9r--

--Xw5fa1GFtucLPGBT1sLtLtUpmbraGkiYl
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEECzNSP7n340AYaHPmcC7hJ3E8yBAFAlsuRkYACgkQcC7hJ3E8
yBBYbQf/fqEhdZWJoA/1Zq2x9dV0LgDTTAU0T8ze6jjMoq/Wxj/kzovLSgWODD8u
63tJgR9c2twEVdfILiWmgKD1BSzyLGXN/LOEjieFu62tqYVfDJOf6g0/pBzG5Ih3
rsGt9e1tx8S60xUR7pnEtbSrMtKruclUaUQQXnpJG4mHKwaLKgpQDSknTKyHzOec
ulf+iQxWb5v9pG8fwsygdrKYsObKdQJrCUI3ggeDFYkSJK/sDBYitIlpSaHNNaV+
QZQFaf0j9ACLttVIhOJxWxnlxmbbNQ7P5Z4QdznI1y5xUnEIAgNKPTMjjgsb1h5Y
Q8gx7MxYB6+reNHQNl7V2b5UxAWYwQ==
=rmC2
-END PGP SIGNATURE-

--Xw5fa1GFtucLPGBT1sLtLtUpmbraGkiYl--

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: variable scope in try ... EXCEPT block.

2018-07-12 Thread Ed Kellett
On 2018-07-12 10:59, Steven D'Aprano wrote:
> On Thu, 12 Jul 2018 01:37:24 -0700, aleiphoenix wrote:
> 
>> My question is, does except ... as ... create a new scope from outer
>> block, causing 'err' be hidden from outer scope? Is this intentional?
> 
> No, it is not a new scope, and yes, it is intentional. It's a nasty hack, 
> but a *necessary* nasty hack: when the except block exits, the "err" 
> local variable (or whatever it happens to be called) is implicitly 
> deleted.
> 
> You can work around this by explicitly assigning to another local 
> variable:
> 
> try:
> ...
> except Exception as e:
> err = e  # only "e" will be deleted when we exit the block
> 
> 
> This is necessary in Python 3 [...]

"necessary" is debatable. When we have reference counting, general
garbage collection, *and* nasty hacks like this, one could be forgiven
for thinking Python has chosen the worst of all memory-management worlds.

That said, in this case it's entirely livable-with once one knows about it.

Unrelatedly, having stared at this email for a moment, I really wish
Thunderbird had an option to avoid orphan
words

Ed
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: variable scope in try ... EXCEPT block.

2018-07-12 Thread Ed Kellett
On 2018-07-12 14:03, Chris Angelico wrote:
> Dealing with reference cycles is generally done *periodically* rather
> than immediately (CPython disposes of unreferenced objects immediately
> upon last deref). You can avoid having a dedicated cycle detection
> pass by using a mark-and-sweep GC, but that just means that *all*
> garbage is dealt with periodically rather than immediately. I can
> imagine having some sort of flag on every object that's involved in a
> cycle, and then doing a mini-GC every time any of those objects gets
> any dereferencing, but that would be ridiculously expensive. There are
> ALWAYS tradeoffs. How is Python's arrangement "the worst"?

It pays the cost of a reference counter and a garbage collector and the
language designers *still* feel like they have to add weird hacks like
the implicit del. I agree there are always tradeoffs. But it feels like
Python has made tradeoffs that should allow it to never worry about
cycles ever, and then it goes ahead and worries about cycles anyway.

> Personally, I think this would be better with an *actual* subscope.
> But apparently that's a ridiculously insane suggestion with no chance
> whatsoever of being accepted. Kinda like assignment expressions.

FWIW, I'd vastly prefer some kind of reconsidering of the scoping
approach to assignment expressions. I don't want to have a 1th
iteration of the same old argument about them, but I think subscoping is
way more applicable: at least to me, it'd make all code more readable by
default, because it'd tend to make namespaces emptier and therefore
easier to hold in memory.

Could we fix:

  for x in something:
blah(lambda a: a + x)

while we're at it?

Also, since we're well into the realm of crazy here, when are we making
nonlocal the default?

Ed
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: variable scope in try ... EXCEPT block.

2018-07-13 Thread Ed Kellett
On 2018-07-12 18:00, Chris Angelico wrote:
> What do you mean by "fix"? Make the 'x' bind eagerly? That would break
> basically every other use of closures.

No. I mean make each x a new variable--closures would work as before,
for-loops would change. If we have subscopes, it seems natural that
entering a subscope multiple times creates a new instance of that
subscope's namespace.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Cult-like behaviour [was Re: Kindness]

2018-07-15 Thread Ed Kellett
On 2018-07-15 15:52, Steven D'Aprano wrote:
> On Sun, 15 Jul 2018 14:17:51 +0300, Marko Rauhamaa wrote:
> 
>> Steven D'Aprano :
>>
>>> On Sun, 15 Jul 2018 11:43:14 +0300, Marko Rauhamaa wrote:
 Paul Rubin :
> I don't think Go is the answer either, but it probably got strings
> right.  What is the answer?
>>>
>>> Go strings aren't text strings. They're byte strings. When you say that
>>> Go got them right, that depends on your definition of success.
>>>
>>> If your definition of "success" is:
>>>
>>> - fail to be able to support 80% + of the world's languages
>>>   and a majority of the world's text;
>>
>> Of course byte strings can support at least as many languages as
>> Python3's code point strings and at least equally well.
> 
> You cannot possibly be serious.
> 
> There are 256 possible byte values. China alone has over 10,000 different 
> characters. You can't represent 10,000+ characters using only 256 
> distinct code points.
> 
> You can't even represent the world's languages using 16-bit word-strings 
> instead of byte strings.

I think you're tearing down a straw man here. (So is Marko.)

The byte-string-only argument is to use byte strings containing encoded
text. This does always work. It's just very easy to make mistakes like
double-encoding.

The "do what Python 3 does" argument is, as I see it, that it's better
to deal with text independently of its encoding, and explicitly
converting to and from byte representations. I'm very much in favour,
not particularly because it prevents errors (though it does), but
because it saves me from having to manage irrelevant details like the
encoding of the text in question.

Imagine if people made the same argument: "byte strings are better than
a representation-independent type" about, say, integers. Using byte
strings instead of integers is great! You can roundtrip any integer and
not care how it's encoded! You can print it to a terminal or a file or
anything without having to pointlessly re-encode it! Okay, so things get
a bit hairy if someone uses hex instead of the obviously-superior
decimal, but nobody does that. And when they do, you can just
bytes.decode('int-hex'). Just remember not to do it more than once, a
famously easy problem in programming that has never bitten anyone ever,
and you're golden. Look at all the problems this solves! Now we can even
parse a file format with integers in it and emit them again without
having to know what encoding the integers are, which doesn't actually
save us from any encoding headaches because we need to figure out the
encoding to work with those integers at all, but will make for good
ammunition against those ridiculous integer zealots.

On a more serious note, I think this particular aspect of Python causes
quite a lot of difficulty for Python 2 programs that make heavy use of
the bytes-text duality, and quite a lot of peace of mind for every other
case. So, Marko, I don't know what code you work on, but I think it's
unfair to attack Python 3's unicode handling too hard if you haven't
written a new project with it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to force "python -m site" ENABLE_USER_SITE to false?

2019-06-21 Thread Ed Leafe
On Jun 21, 2019, at 8:49 AM, Malcolm Greene  wrote:
> 
> Any suggestions on how one can force the "python -m site" ENABLE_USER_SITE 
> value to false?
> 
> Is it possible to globally force this setting - across all users - when 
> installing a system wide version of Python ... or via a command line option 
> when starting a Python session?

>From StackOverflow: 
>https://stackoverflow.com/questions/25584276/how-to-disable-site-enable-user-site-for-an-environment

-- Ed Leafe





-- 
https://mail.python.org/mailman/listinfo/python-list


Request help w/pip install jq

2020-07-19 Thread Ed Walser
Hi all,

I've tried installing jq several times in my local environment, but it
fails, saying it can't find a file that pip downloads.  Here is the entire
pip output:

(base) C:\Users\edwal>pip install jq

Collecting jq

  Downloading jq-1.0.2.tar.gz (57 kB)

 || 57 kB 703 kB/s

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

Preparing wheel metadata ... done

Building wheels for collected packages: jq

  Building wheel for jq (PEP 517) ... error

  ERROR: Command errored out with exit status 1:

   command: 'C:\Users\edwal\anaconda3\envs\planet1\python.exe'
'C:\Users\edwal\anaconda3\envs\planet1\lib\site-packages\pip\_vendor\pep517\_in_process.py'
build_wheel 'C:\Users\edwal\AppData\Local\Temp\tmpd0skcxv2'

   cwd: C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq

  Complete output (7 lines):

  running bdist_wheel

  running build

  running build_ext

  Downloading
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

  Downloaded
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

  Executing: ./configure CFLAGS=-fPIC
--prefix=C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq\_deps\onig-install-6.9.4

  error: [WinError 2] The system cannot find the file specified

  

  ERROR: Failed building wheel for jq

Failed to build jq

ERROR: Could not build wheels for jq which use PEP 517 and cannot be
installed directly

-- 
Ed Walser
e...@walseranalyticsconsulting.com
571.364.9618
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which SQL module to use?

2005-10-04 Thread Ed Hotchkiss
I'm using MySQLdb. I use a FREE MySQL server at freesql.org. I also have an example class and some functions that use the module. even a simple script that turns a .cvs into a mysql table. 

contact me if interested. 
 
-edward
-- 
http://mail.python.org/mailman/listinfo/python-list

[ANN] Dabo 0.4.2 released!

2005-10-08 Thread Ed Leafe
 We are pleased to announce the 0.4.2 release of Dabo, the 3-tier  
application framework for Python.

 The primary focus of our work for this release has been a  
tightening up of the various properties of many of the UI controls to  
create a more consistent interface. Since these controls were  
developed one at a time as needed, they had some subtle but  
significant differences in the way they worked. This release  
addresses a lot of those concerns.

 We've also added auto-binding of methods to events. For example,  
if you want to have your code react to MouseEnter event, all you need  
to do is add a method named onMouseEnter(), and Dabo will bind it to  
that event. Thanks to the PythonCard folks for this idea!

 Work on the Report Writer continues to proceed; it now supports  
groups and report variables. These improvements have been integrated  
it into the wizard-generated apps, too.

 Needless to say, there have also been a few bug fixes. A list of  
all the changes follows my sig. You can grab the latest, as always,  
from http://dabodev.com/download.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dabo-0.4.2 (2005-10-07) (Revision 1418):
Added PrimaryBizobj property to dForm, which can replace calls to  
getPrimaryBizobj().

Added Accepted property to dOkCancelDialog, which gets set  
automatically if the
user pressed "OK".

Added AutoSQL, UserSQL, CurrentSQL, LastSQL properties to dCursor and  
dBizobj.
When time to requery, the SQL will come from UserSQL if set, or  
AutoSQL will
be regenerated.

Fixed a bug that kept changes to a new record from getting committed.

Added DefaultValues property to bizobj.

Added ListSelection and ListDeselection events to dListControl. Added  
properties
MultipleSelect, HitIndex, LastSelectedIndex, HeaderVisible,  
HorizontalRules,
and VerticalRules. Changed the behavior of both dListControl and  
dListBox so that merely selecting an item doesn't raise the Hit  
event; instead, it raises a ListSelection event, and if another item  
had been previously selected, it raises a ListDeselection event. Hit  
is only raised from double-clicking on an item, or by pressing Enter.

Added new property to dTextBox: StrictDateEntry. Changed the code for
interpreting dates entered by the user to allow for some less explicit
formats (MMDD, YYMMDD, and MMDD). If StrictDateEntry is False (the
default), these other formats will be used when interpreting dates
entered by the user.

Added field-level validation to the framework.

Improved support for decimal.Decimal, both at the database level and in
dTextBox.

Added new auto event binding, which automatically binds events based  
on any
defined callback functions. For example, if you have a method  
onMouseEnter()
defined, the dEvents.MouseEnter will automatically be bound to that  
method.
Inspired by PythonCard.

Added RegID property to forms, that allows for object registration
with the form. Not all objects require RegIDs, but if they have one,
they must be unique among all objects in a form. A reference to that
object can then be gotten from any other object by calling
'self.Form.getObjectByRegID()'.

Linked RegID to the auto event binding, so that if a form has a method
of onHit_cmdOK(), and has a button with a RegID of 'cmdOK', the
cmdOk's Hit will get bound to the form's callback, automatically.

Improved dGrid and dColumn. Many properties added, and you are now in  
much
finer control over the display of grid column headers, grid cell  
attributes,
grid cell editors and renderers, and the grid itself.

Began work of allowing case-insensitive property values for  
properties that
take string values, and for properties that take a limited number of  
values
where the first letter is unique, you can set the property by just  
using the
first letter. dTextBox.Alignment = "c" sets the property to "Center",  
for
example.

Modified dBizobj, dCursorMixin, and dBackend so that the user can  
specify
the Unicode Encoding to use. Changed the default encoding from  
latin-1 to
utf-8.

Added feature to optionally draw sizer outlines on any form that uses  
dSizers.
This is currently accessible via an option in the View menu when the  
base
menu bar is in use, or you can turn it on/off programatically.

Grids now remember the column that is sorted, and resort when next  
instantiated.

Added support in dReportWriter for report groups and report  
variables, and
dynamic band heights (based on the height of contained objects).  
Added showExpr,
which is an expression that evaluates at runtime and if true, shows  
the object
in the report, and not if false.

Improved the automatic print preview report format in datanav. It now:

 + prints column headers

 + mirrors the font size, column width, cell vertical and horizontal
   alignment, and 

Re: UI toolkits for Python

2005-10-19 Thread Ed Jensen
Claudio Grondi <[EMAIL PROTECTED]> wrote:
> I haven't seen any really platform-independent software yet and I don't
> expect to see any in the future.
> It is simply not possible to have one, even if much progress was done lately
> in many areas in order to try to approach it as close as possible.

Java + Swing is probably as good as it gets when the goal is to write
platform independent software.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: UI toolkits for Python

2005-10-20 Thread Ed Jensen
Kenneth McDonald <[EMAIL PROTECTED]> wrote:
> I'd have to agree with this. Unfortunately, the only way to use Swing  
> (in a
> reasonable manner) from Python is to use Jython, and Jython has other
> shortcomings that make me not want to use it.

What shortcomings?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python vs Ruby

2005-10-21 Thread Ed Jensen
Sion Arrowsmith <[EMAIL PROTECTED]> wrote:
> I have here a library (it's the client side of a client-server
> interface including a pile of class definitions) which has
> implementations in pure C++, Java and Python, taking about 3000,
> 3500 and 1500 loc respectively. And there's an associated module
> (with no C++ implementation) that I remember being particular
> "impressed" while writing it to find being 3 times as long in Java
> as Python despite (a) extensive (and pretty much common) Javadoc/
> docstrings and (b) implementing in the Python version a feature
> present in the standard Java library (scheduling a thread to run
> at specified intervals and time out). Strip the Javadoc/docstrings
> out and it's about at that 5:1 ratio.

This claim seems pretty dubious to me.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python vs Ruby

2005-10-21 Thread Ed Jensen
Bryan <[EMAIL PROTECTED]> wrote:
> i would not say sion's ratio of 5:1 is dubious.  for what it's worth, i've 
> written i pretty complex program in jython over the last year.  jython 
> compiles 
> to java source code and the number of generated java lines to the jython 
> lines 
> is 4:1.

Most code generators are known to produce non-optimal code.
-- 
http://mail.python.org/mailman/listinfo/python-list


testing for modules?

2005-10-25 Thread Ed Hotchkiss
i have a generic script that is using several modules on windows and linux boxes. i need to have the scripts test if a module is installed, and then if not - then to install the module. can anyone give me a headsup on how to test for a module, returning something to indicate whether or not it is installed, then after that executing file to install the module.? just somewhere to start would be helpful! thanks in advance.
-- edward hotchkiss 
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Rename files with numbers

2005-11-01 Thread Ed Singleton
The best free app I've found for this is MusicBrainz [www.musicbrainz.com].

This has a huge database of obsessively correct details of albums
which can be formatted in anyway you choose.  It can automatically
recognise which song an MP3 is!

This is a similar script I wrote to renumber files in sequential
order.  It assumes that everything before the first underscore can be
replaced.

from path import path
import re

def renumberfiles(filesdir, startnum=1):
d = path(filesdir)
print d
x = startnum
for f in d.files():
fname = f.name.split('_', 1)
fname = str(x).zfill(2) + "_" + fname[-1]
fname = re.sub(r" ",r"_",fname)
fname = re.sub(r"__",r"_",fname)
x = x + 1
print f.name, "==>",
f.rename(f.parent + "\\" + fname)
print fname

As you can see, I use the path module rather than os.path.  it's a
much more intuitive way of handling files.

http://www.jorendorff.com/articles/python/path/

Ed

On 01/11/05, Dave Benjamin <[EMAIL PROTECTED]> wrote:
> On Mon, 31 Oct 2005, Micah Elliott wrote:
>
> > On Oct 31, Micah Elliott wrote:
> >> Now I need to go beautify my collection.  :-)
> >
> > While a fun exercise, there are probably already dozens (or
> > thousands?) of utilities in existence that do this and much more.
>
> Seconded. I initially considered writing a script to rename a huge pile of
> MP3 files, but halfway through, I thought, "there's *got* to be a better
> way". I found this app: http://www.softpointer.com/tr.htm
>
> Bought it the next day. Holy crap, what a gigantic timesaver. It looks up
> albums based on track lengths, downloads titles from freedb and Amazon,
> does ID3 tagging, renaming, moves files into separate directories... I
> busted through about 20 gigs of MP3s in three days. I kid you not.
>
> If this is just a fun toy Python project, don't let me discourage you, but
> if you have more than a handful of albums to rename, trust me. This
> problem has been solved.
>
> Here's a list of apps, including Tag&Rename, that can query freedb:
> http://www.freedb.org/freedb_aware_apps.php
>
> --
>   .:[ dave benjamin: ramen/[sp00] ]:.
>\\ "who will clean out my Inbox after I'm dead[?]" - charles petzold
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WTF?

2005-11-01 Thread Ed Hotchkiss
happens to me too.
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python's website does a great disservice to the language

2005-11-02 Thread Ed Singleton
I think I'm going to back you up a little bit here.

You've gone about this in a bit of a half-assed way (and pissed off a
fair few people in the process) but you are right that the site needs
a redesign.

It uses tables for layout with inline styles and font tags and doesn't
really use CSS.  It has invalid html, and doesn't even attempt xhtml.

>From an accessiblity point of view it has a poor choice of font and a
poor choice of colours (blue links on a blue background).

Design issues such as what logos to use and such aren't really my
forte, but from a web developers point of view it's a badly made
website.

Ed

On 01/11/05, CppNewB <[EMAIL PROTECTED]> wrote:
> I was trying to advocate using Python for an upcoming prototype, so my boss
> went out to take a look at the documentation and try and get a feel for what
> the language is all about.
>
> First comment; "I hope the language is designed better than the site."  The
> site is readable, but is amateurish.  If I had an ounce of design skills in
> me, I would take a stab at it.
>
> Maybe we could round up a couple of designers to donate some time? Maybe we
> could build a basic CMS on top of Django or TurboGears (displaying Python's
> capability as a web development stack)?
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to modify code while debugging it without having to stop and then restart debugger

2005-11-10 Thread Ed Singleton
I used Visual Basic a long time in the past and I know what you mean.

The ability to step through code line by line was very useful in a
language where you often didn't know what was happening.  I
particularly loved the ability to hover the mouse over any variable or
expression and see the value at that point in the code.

As a learning tool it would be excellent for Python, as would the
ability to step through the code, hit an error, step back one line,
change the line that caused the error and then continue stepping
forward again.

However I have to say that since using Python, I haven't needed these
features as much (though I still would have liked to have them
available).

Ed

On 08/11/05, python <[EMAIL PROTECTED]> wrote:
> hello and thanks for reading this,
>
> i have been a dos/windows user using some form of the basic language for 30 
> years now.
> i own and run a small programming company and there is one feature that keeps 
> me in the windows/basic world.
>
> while i will agree that it has not evolved well, it does have one awesome 
> feature that i have yet to see replicated in
> any linux product that i know about so far.
>
>
> i am a long time windows user and have had a great way to learn new api.
> to write some code and then run it.
> if there is an error, the debugger will load.
> then i can figure out what the eror is, just touch up the ocde and continue 
> to run the code.
> i do not have to stop the code, modify the code, rerun  the code.
> often an error will only happen after a complex set of conditions and not 
> have to completely stop the app is a fantastic
> way to debug.
>
> there are several applications that can do this.
> in fact, the free version of the visual studio 2005, which is free, have this 
> ability.
>
> so how can i use python to debug code and change that code without having to 
> restart the code.
>
> thanks so much,
> dave
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python obfuscation

2005-11-16 Thread Ed Jensen
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> I'm not sure if that is meant to be a rhetorical 
> question or not, but something of the order of 95% of 
> all software written is never distributed to others, 
> and so copyright or the lack of copyright is not an issue.

Can you cite your source(s) for this information?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote:
> That would be "free as in freeloading", right? (And no, I'm not
> intending to start a licensing flame war with that remark, but I think
> it's inappropriate to ignore central licensing concepts such as
> end-user freedoms, and then to make sweeping statements about how
> "free" the GPL is or isn't. If people want to use the GPL as a
> convenient punchbag, I think they have to work a bit harder justifying
> their gym subscription.)

Blame the GPL and FSF for the confusion.

Try this little experiment: Walk up, at random, to 100 people on the
street.  Show them a software CD-ROM -- a game, a word processor,
whatever.  Tell them it's free.  Then ask them what they think that
means.

99 times out of 100, they'll think it means it's free-as-in-beer.
They *won't* think it means they'll get the source code, and the right
to tweak that source code.  They *won't* think it means they have the
right to infinitely redistribute it.

At best, the GPL/FSF engaged in what I consider false advertising.
Free Software (note the capital 'F' and 'S') *isn't*, by the most
widely understood and assumed definition of "free".  They should have
called it "liberated software" or "share and share alike software" or
"free as in herpes" software.  Free Software is certainly not free
software, since it comes heavily encumbered by licensing issues.

The success of things like Python -- which is not GPL licensed, afaik
-- pretty much proves the GPL is unnecessary for the success of free
projects.  The GPL is just some bizarre social agenda being pushed by
some crazies, and a lot of programmers (who are not lawyers) fell for
the hippie nonsense.

So, you may like to bandy around the mildly offensive "free as in
freeloading", but then that gives me the right to refer to GPL'd
software as "free as in pushing my personal social agenda".
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote:
> It's interesting that you bring this tired thought experiment up in the
> context of the original remark: "Its license is far more "free" than
> GPL is." If we were focusing on the "vox pop" interpretation of the
> word "free", that remark wouldn't make any sense at all: after all,
> what's more gratis than gratis (to use a less ambiguous word)?

My only intention was to point out that "Free Software" is a rather
misleading term.

I still think of the term "Free Software" as false advertising.

> Python is moderately successful, yes, but the GPL is a useful tool to
> ensure that certain freedoms are preserved. I've been made aware of a
> certain level of dissatisfaction about whether organisations porting
> Python to other platforms would choose to share their modifications and
> improvements with anyone, or whether binary downloads with restrictive
> usage conditions would be the best even the customers of such
> organisations would be able to enjoy. Ensuring some of those freedoms
> can be an effective way of making open source software projects
> successful.

I'm aware of this concern.  I don't think it's justified.  Unless
you'd like to point out all those closed, proprietary Python
implementations that are destroying civilization as we know it.

> At least when it comes to software licensing, what probably upsets the
> anti-GPL "pragmatic licensing" crowd the most is that Stallman is quite
> often right; the BitKeeper debacle possibly being one of the more
> high-profile cases of some group's "pragmatism" (or more accurately,
> apathy) serving up a big shock long after they'd presumably dismissed
> "the hippie nonsense".

Stallman thinks selling closed, proprietary software is evil.
Stallman thinks buying closed, proprietary software is evil.

I find these opinions and "morals" fundamentally and obviously wrong.

> Well, from what I've seen of open source software usage in business, a
> key motivation is to freeload, clearly driven by people who neither see
> nor understand any other dimension of software freedom than your "vox
> pop" definition. Such users of open source software could make their
> work a lot easier if they contributed back to the projects from which
> they obtained the software, but I've seen little understanding of such
> matters. Of course, businesses prefer to use euphemisms like "cost
> reduction" or "price efficiency" rather than the more accurate
> "freeloading" term, and they fail to see any long-term benefits in
> anything other than zero cost, zero sharing acquisition and
> redistribution of code. But then in some sectors, the game is all about
> selling the same solution over and over again to the same customers, so
> it's almost understandable that old habits remain.

Wah, wah, I gave this software away for free, and people are actually
using it without giving anything back!  Wah, wah!

>> but then that gives me the right to refer to GPL'd software as "free as in 
>> pushing my
>> personal social agenda".

> Pushing on whom, though? No-one makes you use GPL'd software by, for
> example, installing it on almost every computer you can buy from major
> vendors. If, on the other hand, you mean that some social agenda is
> being imposed on you because, in choosing to redistribute someone's
> work, you are obliged to pass on those freedoms granted to you by the
> creator (or distributor) of that work, then complaining about it seems
> little more than a foot-stamping exercise than anything else.

Now you're just trying to put words into my mouth.

I never said anything was being "pushed on" me.  I never said anything
was being "imposed on" me.  I said an agenda was being pushed.
Stallman and company have an agenda, and the GPL is their instrument
of choice for pushing that agenda.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-23 Thread Ed Jensen
Grow up, Steven.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-24 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote:
>> I'm aware of this concern.  I don't think it's justified.  Unless
>> you'd like to point out all those closed, proprietary Python
>> implementations that are destroying civilization as we know it.

> Well, there was some concern voiced at EuroPython that a certain large
> software-patent-lobbying organisation wouldn't release the shiny port
> of Python that they'd done for their mobile telephone products. Now,
> one can either emulate that well-practised foot-stamping routine of
> yours...

Has this seriously harmed the Python community?  Or CPython?  Has it
caused evolution of Python/CPython to stall?  Did it have the
unfortunate consequence of causing any CPython code to become closed
source or proprietary?

Show me the harm done.

> In another recent licensing spat, some people are apparently unhappy
> with one Python-related project's use of the GPL, since the code they
> originally contributed to an older, related project ends up being
> redistributed under the GPL in the former project whereas the latter
> project cannot redistribute the former project's original code without
> putting a GPL licence on the distributed work. Now, if the latter
> project, with its advantage of having come into existence first had
> chosen a GPL-incompatible licence, it's quite possible that they would
> have avoided the situation that some seem to bemoan, but then one has
> to consider the likelihood that people actually do want GPL
> compatibility in their favourite open source projects.

I agree that mixing and matching licenses can be a problem, which is
yet another reason I lament the proliferation of source code licenses.

It's like a whole generation of software developers have become
armchair lawyers, which I find unfortunate.  Think how much farther
along free software could be if all this energy and concern weren't
expended on source code licenses.

> My point about the freeloading was that business understandably likes
> to do it. I don't feel any sympathy for participants in various Apache
> projects that are hugely popular in business, for example, if those
> participants dislike the lack of contributions from those companies
> using their software to make money, because those who founded those
> projects made a conscious licensing decision and that decision defines
> the kind of sharing (or otherwise) around such projects.

I don't feel sorry for them either, and I don't think they feel sorry
for themselves.  And the success of projects like Apache are even more
proof, in my opinion, that heavy handed licenses like the GPL aren't
necessary for the success of free software projects.

> So if you're not personally affected, as you claim, why does it bother
> you?

Because I think a lot of well meaning software developers writing free
software don't performance due diligence to determine the true
motivation behind, and the chilling effect of, the GPL.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote:
> We'll have to wait and see what happens. There's a risk that versions
> of Python with different semantics or characteristics to the original
> could cause the development of parallel communities, instead of
> everyone working on/with the same project. The "harm done" is
> adequately described by paraphrasing your comment on licences: think
> how much farther along free software could be if all this energy and
> concern weren't expended on separate and sometimes proprietary code
> bases.

I think free software/open source has existed long enough and with
enough varied licenses (GPL, LGPL, modified LGPL (see wxWidgets), BSD,
X11, MIT, Apache, etc.) that we'd basically know without question if
less restritive licenses (like BSD) were causing projects to fail vs.
projects that use very heavy handed licenses (like GPL).  Apache and
Python are two of my favorite examples, followed by the *BSD operating
systems.

> Well, despite your protestations, I think the GPL and LGPL are fairly
> easy and safe choices for a lot of developers who know enough about
> Free Software (ie. haven't just seen the name and thought "that's the
> thing for me"), know what the characteristics of those licences are,
> and who don't have the time or legal experience to "performance due
> diligence".

To be honest, I don't dislike the LGPL that much.  The static vs.
dynamic linking issues bother me somewhat (which is why I like the
modified LGPL used by wxWidgets), but all in all, I can live (albeit
uncomfortably) with LGPL.  It seems much more sane.  Whereas including
one line of GPL code into your 10,000,000,000 line project can have
disasterous consequences (which I find ridiculous), at least with LGPL
you're only asked to share the changes you've made to that particular
library.

> Meanwhile, all this "hippie" and "chilling effect" talk is, I imagine,
> like having a discussion on software licensing with some cold war
> propagandist.

Sorry for my initial post on this subject being flamey.  I must've
been cranky that day, and I'm glad we were able to continue the
discussion.  :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Christophe <[EMAIL PROTECTED]> wrote:
> If you don't like the GPL, then by all means, *do not use GPL code !*
> 
> Please, I mean, when you use without authorisation some code in your 
> project, you are in trouble, no matter what licence the code was using.

I'm not sure why you felt compelled to state the obvious...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Rubin  wrote:
> Python and *BSD are getting far less volunteer development love than,
> say, GCC or Linux, and the licensing is at least part of the reason.

I disagree.  I believe *BSD gets less volunteer development because of
some legal wrangling in the early 90s that didn't affect Linux.

I believe GCC gets more volunteer development than Python because C
and C++ were (and are) much more widely used.

> Also, numerous GCC ports done by hardware companies (for their CPU's)
> have been released under the GPL that would definitely have been
> proprietary if it had been permitted.  That is not speculation, it is
> known from discussions with those hardware companies at the time.

Even if this is true, GCC would have continued to exist.  Just because
an entity takes some open source code and places it in a closed source
product, the original open source code continues to exist.

Frankly, I suspect those hardware companies would have relented their
decision once they realized it was harder to keep re-integrating their
code into newer GCC releases, than it was to just release the code.

> G++
> (the original C++ front end for GCC) also would have been proprietary.

I'm not saying you're wrong, but since you're providing no evidence,
I'll remain skeptical about this claim.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: Dabo 0.5 released!

2005-11-30 Thread Ed Leafe
at not only will  
you be able to control how your forms look, but also how they behave.

The Report Designer continues to improve: it now has an integrated  
Property Sheet for altering the appearance of objects, as well as  
improved layering. It also supports full 2-way editing: both visual  
and XML editing changes are reflected in the other.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: General question about Python design goals

2005-12-01 Thread Ed Singleton
On 29/11/05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
> > on the other hand, it's also possible that there are perfectly usable ways
> > to keep bikes and bike seats dry where Christoph works, but that he prefers
> > not to use them because they're violating some design rule.
>
> Depends on how you understand "perfectly usable." My collegue always
> carries his expensive racing bike to our office in the 3rd floor out of
> fear it may get wet or stolen. But I think this is not very convenient
> and I want to avoid discussions with our boss about skid marks on the
> carpet and things like that. Probably that collegue would not complain
> as well if he had to cast tuples to lists for counting items - you see,
> people are different ;-)

If you're leaving skid marks on the floor, maybe you need better underwear?

http://www.google.co.uk/search?q=skid+marks+slang

Sorry to lower the tone.

Ed
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Ed Leafe
On Dec 3, 2005, at 3:37 PM, Scott David Daniels wrote:

> They appear in different positions on different terminals (older hard-
> copy),

 Is anyone still using such devices to program Python?

> do different things on different OS's,

 Such as? I use OS X, Windows and Linux daily, and tabs work just  
fine on all of those. Which OS is it that is aberrant, and how  
exactly does it pose a problem?

> and in general do not behave nicely.

 Again, specifics would be welcome. I've been using tabs for  
indentation for over a decade, and have not once run into the horror  
stories that everyone who hates tabs says will happen, but who never  
give specifics as to how they cause "problems".

 If you want to use spaces, great. I'm certainly not going to  
make up reasons why spaces are bad, just to make me feel better about  
my preference. Just don't make general damning comments without any  
specifics to back them up.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-04 Thread Ed Leafe
On Dec 3, 2005, at 5:55 PM, Sybren Stuvel wrote:

> That depends on your editor. Mine (vim) can be instructed to insert
> the appropriate amount of spaces on a tab, and remove them on a
> backspace.

 So let's say that you are using 4 spaces as your standard, but  
by accident type 5. You hit backspace, which deletes 4 spaces, and  
you now have to mentally compute the difference in order to keep  
things aligned.

 See, I can make up bizarre scenarios where spaces cause  
problems, too.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-05 Thread Ed Leafe
On Dec 5, 2005, at 3:13 PM, Paul McNett wrote:

> Indeed, there is only one user interface that needs no  
> documentation whatsoever.

 Yeah, and it sucks!  ;-)

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is it possible to open a dbf

2005-01-03 Thread Ed Leafe
On Jan 3, 2005, at 11:55 AM, Helmut Jarausch wrote:
I've been using
http://www.fiby.at/dbfpy/
without any problems including writing/modifying dbf files.
	The problem, of course, is that there is no single DBF format. The 
only product out there that still uses DBFs, Visual FoxPro, supports 3 
separate and incompatible formats: 2.x, 3.0, and later. What's more, 
the later versions introduced new data types, so even those are not 
compatible with older formats.

	Because VFP has not fallen off the face of the earth, but instead has 
continued to thrive, it has added things such as auto-increment fields 
and BLOB support that were never even envisioned by the folks at JPL 
when they created Vulcan. As a result, there is no single DBF reader 
that can read all DBF files.

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Port blocking

2005-01-10 Thread Ed Leafe
On Jan 10, 2005, at 8:00 PM, Steve Holden wrote:
Ah yes, but is there really? For example, I did a search of the TOC 
of GTK+ Reference Manual:
http://developer.gnome.org/doc/API/2.0/gtk/index.html
for the word "data", and there's apparently no widget which is 
explicitly tied to databases. So in GTKs case, for instance, it looks 
like one has to roll one's own solution, rather than just using one 
out of the box.
There isn't, IMHO, anything with the polish of (say) Microsoft Access, 
or even Microsoft SQL Server's less brilliant interfaces. Some things 
Microsoft *can* do well, it's a shame they didn't just stick to the 
knitting.
	Though it's certainly not anywhere near the polish of 
Access, you should check out Dabo. It's designed from the ground up to 
be a database application framework, and is on its way to achieving 
that goal. Right now you still have to do all the UI stuff in code, but 
we're just starting to develop the visual UI Designer. Stay 
tuned!

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Dabo 0.3 Released

2005-01-10 Thread Ed Leafe
We are pleased to announce Dabo 0.3, the third major release of our 
data application framework. The Dabo framework is a true 3-tier design, 
with data access and UI code separated from your business logic. And 
since it's Python, and uses wxPython for its UI, it is completely 
cross-platform, having been tested on Linux, Windows and OS X.

Download from http://dabodev.com/download
This marks the first major release of Dabo since we changed the 
licensing of Dabo. It is now released under the MIT License, which 
gives you much more freedom to do what you want with the code. See 
http://www.opensource.org/licenses/mit-license.html for the exact terms 
of the license. It is our hope that this will remove any reservations 
that people may have had about working with GPL software, and as a 
result grow the user base of the framework.

Over the past few months we have gotten some wonderful feedback from 
people who are interested in our work and who are interested in a solid 
application framework for developing database apps. The framework is 
now very solid and reliable, and Dabo applications are being used 
daily. But there is still more we plan on adding, so like all 
pre-release software, use with caution.

Anyone interested in contributing to Dabo, or who just want to find out 
what it is all about is encouraged to join our mailing lists:
	dabo-users: for those interested in learning how to work with Dabo to 
create applications, and for general help with Dabo.   
http://leafe.com/mailman/listinfo/dabo-users
	dabo-dev: for those interested in the ongoing development of Dabo. 
This list contains lots of lively discussion on design issues, as well 
as notices of all commits to the code repository.   
http://leafe.com/mailman/listinfo/dabo-dev

Here is a brief summary of what's new in Dabo 0.3:
Dabo Framework:
Support for PostgreSQL added in addition to existing support for MySQL 
and Firebird databases.

Improved unicode support in data cursors.
Support for fulltext searches added.
Child requeries and transaction support added to bizobj and cursor 
classes.

Several new controls have been added, including a window splitter and a 
grid-like list control.

The GridSizer has been added, making laying out of controls in a 
grid-like pattern a breeze. The API for all the sizers has been greatly 
simplified, too.

Menus have had wxPython-specific code removed, and are now much simpler 
to create and manage.

A 'Command Window' has been added to the base menu. This allows you to 
enter commands interactively in a running application, which makes 
debugging and testing so much simpler. Once you've developed an app 
with a Command Window at your disposal, you'll never want to develop 
without it!

And, of course, more bug fixes than we'd like to say!
Dabo IDE:
The appWizard has been moved from the Demo project to here, as well as 
the FieldSpecEditor. There is a new connection editor for visually 
setting up database connection information and storing it in an XML 
file.

The appWizard can now generate parent/child/grandchild/... 
relationships. The FieldSpecEditor (for visually controlling the 
appearance and behavior of wizard-generated apps) has been greatly 
improved, with interactive ordering and live previews of changes.

The editor can now toggle word wrap, jump to any line in the file, and 
comment/uncomment blocks of code.

Dabo Demo:
There's now a MineSweeper game - written in Dabo, of course!
All of the other demos have been updated to work with the changes in 
the rest of the framework.

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


py2exe Excludes

2005-01-12 Thread Ed Leafe
	I'm trying to make a Windows runtime for Dabo, and I want to exclude 
the framework code itself from the exe file, so that people can update 
with new releases as they are made. The relevant section of setup.py 
has:

setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.3.0",
description = "Dabo Runtime Engine",
name = "daborun",
# targets to build
console = ["daborun.py"],
#exclude the actual framework
options = { "py2exe": {"excludes" : ["dabo"]} },
)
	Yet the generated library.zip still contains all of the Dabo module 
code. Why is this? What am I doing wrong?

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython and CheckListBox

2005-01-13 Thread Ed Leafe
On Jan 13, 2005, at 5:54 AM, [EMAIL PROTECTED] wrote:
I am trying to add a caption or title to the box drawn around a
checklistbox and having no luck. Is there a way to do this?
I am using python 2.3.4 and wxPython 2.5 on a windows platform.
	I don't think you can do it directly. What you might want to try is to 
create a StaticBoxSizer with the label you want, and add the checkbox 
to that sizer. Then add the StaticBoxSizer to the panel's layout 
instead of the checkbox.

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: py2exe Excludes

2005-01-13 Thread Ed Leafe
On Jan 13, 2005, at 12:04 AM, vincent wehren wrote:
Just a guess: What happens if you remove everything that's in the 
"build" directory before running setup.py? There may still be files 
around from an earlier build that *did* include the Dabo modules.
	Ah, that was it! I didn't realize that it would still pull those 
things in there. I wiped out the build directory and re-ran setup, and 
it's now what I expected. Thanks!

 ___/
    /
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Dabo Windows Runtime 0.3 Available

2005-01-13 Thread Ed Leafe
	For all of you who have been curious about Dabo, but who don't want to 
go through the work of installing Python, wxPython, MySQLdb, etc., on 
your machines, I'm pleased to announce the release of the Dabo Runtime 
for Windows v. 0.3.

	The Dabo Runtime comes in the form of a standard Windows Installer. It 
will install the runtime in the directory you choose, along with the 
Dabo framework. It will also install the Dabo Demo and IDE directories, 
so that you can try out some of the stuff we've come up with to show 
what Dabo can do. The framework and other files are installed as source 
code, so not only can you look at the code to see what's going on, you 
can also update it as new releases are made without having to 
re-install anything.

	The Dabo Runtime installer is available from our Download page: 
http://dabodev.com/download. Enjoy!

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie inheritance question.

2005-01-16 Thread Ed Leafe
On Jan 16, 2005, at 9:08 AM, bwobbones wrote:
class two(one):
   def __init__(self):
   print "two"
	You need to specifically call the superclass's __init__ here in order 
for it to fire. Just add the line

   super(two, self).__init__()
as the first line of the subclass's __init__.
 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Native widgets for Python

2005-01-17 Thread Ed Leafe
On Jan 17, 2005, at 10:19 AM, Steve Holden wrote:
It looks like dabo uses, not replaces, wxPython
  http://dabodev.com/about
Actually I think it *layers* wxPython, with the intention of being 
able to replace wxPython with other GUI kits at a later date. So, 
there should be a simpler graphical API, but since I haven't yet done 
more than dabble (dabole?) with dabo I can't be sure.
	That's correct. We are basing the UI on wxPython initially, but 
wrapping wx for two reasons: to make it simpler to code UIs, and to 
make it possible to use other UI toolkits instead of wx. The first 
reason is by far the more important of the two, but an eventual goal 
for Dabo post-1.0 release (we're at 0.3 now!) will be to allow TkInter 
and other toolkits to be used as well.

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: wx.BoxSizer problem

2005-01-21 Thread Ed Leafe
On Jan 21, 2005, at 10:07 AM, Laszlo Zsolt Nagy wrote:
My problem is that only one of the buttons is visible and that one is 
not expanded. (System: Windows, Python 2.3.4, wxPython 2.5.3)
Works as expected on Mac OS X 10.3.7, python 2.3.4, wxPython 2.5.2.8.
 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter vs wxPython

2005-01-27 Thread Ed Leafe
On Jan 27, 2005, at 12:17 PM, Gabriel Cosentino de Barros wrote:
Now going back on topic: A think that neighter Tk nor wxWindow is a 
good choice for python. They both suck much of it when it came to 
abstraction. They're still better than glade or gtk. But could improve 
a lot. wxWindow has simple an ugly API, and Tk has a huge sin in the 
syntax to pass actions to the buttons.
	I agree with that assessment, although I preferred wxPython over Tk. 
One of the fundamental design goals of the Dabo framework is to wrap 
the UI toolkits to hide all that ugliness, and present a uniform, 
simple API for all the UI controls. We are using wxPython initially as 
our UI toolkit of choice, but the long-term plan is to wrap Tk, too, so 
that the interface to both is the same. IOW, the same app code will 
work with wxPython or Tk. That's a lofty goal, but one that I think is 
essential to bring Python UI development up to level available to other 
languages.

 ___/
/
   __/
  /
 /
 Ed Leafe
 http://leafe.com/
 http://dabodev.com/
--
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-18 Thread Ed Jensen
Grant Edwards <[EMAIL PROTECTED]> wrote:
>> I've guessed that python is purely an interpreted language unless its
>> compiled into another language (ie. it needs python installed in order
>> to run programs). Is this correct?
> 
> It's just like Java.  It's compiled into bytecode and then the
> bytecode is executed on a virtual machine.

Keep in mind that all modern JVMs "just-in-time" compile Java bytecode
to native code.  It looks something like this:

Java source -> Java bytecode -> Java virtual machine -> Native code

So, in the end, users are typically running natively compiled code.

(Warning: This is a simplification, but this description seems
adequate for the OP.)

Java typically outperforms Python by a very wide margin.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-18 Thread Ed Jensen
Renato Ramonda <[EMAIL PROTECTED]> wrote:
> The only system (apart from solaris, I guess) that has a JVM by default 
> is OSX, and it's _NOT_ sun's one, but the internally developed one.

Apple licenses Sun's JVM and makes the modifications necessary to run
it on OSX.  I know I'm being a pedant, but I don't want people to
think Apple writes their own JVM from scratch.  Also, Java is
installed on lots of systems by companies like Dell and HP; however,
you usually can't predict which version of the JVM is installed or how
the Java auto update features are configured.

That being said, I think Sun is being foolish by not ensuring Java is
free enough to be included with every Linux distribution.  Talk about
letting a golden opportunity slip through their fingers...

As others have pointed out, Python's non-restrictive licensing allows
it to be installed far and wide, and it's easy to bundle a Python
interpreter with your application, which is great.  These are big
advantages for Python.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python exception hook simple example needed

2005-07-06 Thread Ed Leafe
On Jul 6, 2005, at 8:59 AM, Fuzzyman wrote:

> Wax has a brilliant prebuilt dialog/handler. It's a wrapper over
> wxPython - so you still use wxPython objects, it's jsut all a lot
> easier.

And don't forget Dabo, which wraps all of wxPython's dialogs into 
simple calls. No need to create/show/destroy; just call the appropriate 
function.

I know I'm biased, being one of the authors, but I've used both 
extensively, and find Dabo so much easier to work with. And if there's 
a part of wxPython that we haven't wrapped yet, let us know, as we are 
actively working on Dabo and improving it all the time.

  ___/
 /
__/
   /
  /
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Do a "Python beginners e-mail list" exist?

2005-07-07 Thread Ed Leafe
On Jul 7, 2005, at 3:24 AM, Alessandro Brollo wrote:

> 1. I don't want to post banal questions about Python
> to main Python list. Does a "banal Python questions
> list" or a "Python beginners list" exist?
>
> 2. There is somewhere a very patient fellow willing to
> be my free "python tutor" by personal e-mailing
> outside the mail list? . The ideal candidate would be
> someone, sharing with me some other fields of interest
> (I'm a middle-aged Italian pathologist, with some
> dBase III and dBase IV past programming experience,
> and I like nature and mainly horses).

There is an email list called ProPython 
(http://leafe.com/mailman/listinfo/propython) that was started by a 
group of Visual FoxPro developers who are taking up Python. So it is 
definitely newbie-friendly, and has many people willing to help walk 
you through the learning process. And with your database programming 
background, you're sure to fit in with a Fox-flavored crowd!

  ___/
 /
__/
   /
  /
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python exception hook simple example needed

2005-07-07 Thread Ed Leafe
On Jul 7, 2005, at 7:27 AM, Fuzzyman wrote:

> Do you have an exception handling dialog ?

Not per se, as there hasn't been a request for one; we have several 
dialogs ranging from simple messages to alerts to interactive dialogs, 
much as wxPython offers. But I'll make this offer: give me a spec as to 
what you need this "exception handling dialog" to do, and I'll have it 
added to the framework within 24 hours. Deal?

> Can you use the UI layer without being tied to the rest of the
> framework ? They seemed pretty integrated to me.

They are integrated, but nothing forces you to use anything you don't 
want. I know of several people who have developed UI-only apps, with no 
need for business objects or database connectivity. They started in 
plain wxPython, and switched to Dabo because it was so much easier, and 
so much more Pythonic.

      ___/
 /
__/
   /
  /
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python vs. Access VBA

2005-07-17 Thread Ed Leafe
On Jul 15, 2005, at 11:19 PM, William Lodge wrote:

> Finally, does anybody know of any Web sites having examples of 
> database apps
> in Python?

You might want to look at Dabo, which is a database application 
framework for Python. In about 30 seconds you can create an application 
that queries a database, displays the results, and allows for 
editing/updating/inserting/deleting records.

Currently we do not have an ODBC interface, which is what you'd need 
if the data is in Access, since no one involved has written that 
module. However, if you are interested in developing your app in Dabo, 
we'd be glad to add that module as long as you're willing to give us 
the feedback we need to get it working smoothly.

BTW, I wouldn't suggest scaling up to Oracle - why get involved with 
all that licensing? There are many open-source databases, such as 
PostgreSQL, MySQL and Firebird that can handle large data sets without 
getting stuck with huge license fees.

  ___/
     /
__/
   /
  /
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 12:28, Peter Decker wrote:

> It would be great if the wxPython folks would adopt Dabo, and
> eventually integrate it so that there is but a single, Pythonic way of
> working with wxPython, but it seems that they have their hands full
> just wrapping the C++ code of wxWidgets.

 Thanks for the vote of encouragement!
 
 Our goal isn't to muddy the waters; it is simply to create a consistent API 
for coding. There is already a great GUI toolkit for Python; we're just 
trying to make it easier to code.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The state of OO wrappers on top of wxPython (was Re: Wheel-reinvention with Python)

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 13:41, Peter Hansen wrote:

> The last time I checked (as I recall), at least Wax and possibly Dabo
> both either lagged well behind recent wxPython developments of provide
> relatively limited support, leaving out a sizable and (to me) important
> number of features from what they wrapped.
>
> Is this a remotely accurate and current picture of things?  Or is it
> more fair to say that by adopting Dabo (or Wax?) one really loses
> nothing in terms of flexibility, and gains only improved write- and
> readability?

 I can't speak for Wax, but you don't lose anything from wxPython when you 
work with Dabo. At the very least, if there is something that wxPython has 
added that has not been integrated into Dabo yet, you can still code in 
native wxPython. I've taken that approach in my current work on the Visual 
Designer: some of the things that I needed to do couldn't be done in Dabo. 
But in the spirit of 'eating your own dogfood', I then go back into the UI 
framework code and add those things, so that the Designer is ultimately 100% 
Dabo code.

 There are also several classes in wxPython that Dabo has not wrapped, 
primarily the lower-level drawing classes and some of the newer graphics 
classes, mainly because they weren't needed for a database application 
framework. However, if there's a need, we'll be glad to add it.  

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The state of OO wrappers on top of wxPython (was Re: Wheel-reinvention with Python)

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 16:06, Jorge Godoy wrote:

> If it is added, let us know.  I can't think of a better way to visualize
> database reports in an easy and fast way.  Specially for BI.

 What specifically are you looking for? We are working on the report writing 
engine now, tying in ReportLab. 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The state of OO wrappers on top of wxPython (was Re: Wheel-reinvention with Python)

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 17:44, Jorge Godoy wrote:

> Bar and line graphics, mainly.  In an easy and portable way.  Something
> that calculates the axis scales automatically, that allows users to change
> some information, add legends, put values in specific points and all those
> things that are common to business graphs.

 OIC - I thought that you were referring to a specific part of wxPython that 
we haven't wrapped yet.

 I'll defer this to my partner, Paul McNett. He's spearheading the reporting 
module for Dabo, and may know of some tools that are already out there that 
could generate the image, which Dabo could then display.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 21:16, EP wrote:

> Ed Leafe wrote in response to the "Python vs. Access VBA" thread:
> >  You might want to look at Dabo, which is a database application
> > framework for Python. In about 30 seconds you can create an application
> > that queries a database, displays the results, and allows for
> > editing/updating/inserting/deleting records.
>
> This is a nice pitch.  Can you provide simple, example code that does this?

 It isn't so much a matter of code, but running the AppWizard. You can see a 
description of it at http://dabodev.com/wiki/AppWizard.

> As a non-professional programmer (I write to create my own business tools,
> and for the enjoyment, but no one pays for my code) the ability to generate
> quick db apps like this would constitute a real win, even if the 30 seconds
> is a "Guido 30 seconds" and it takes me 5 minutes (which might
> underestimate Guido by some magnitudes).

 There are additional tools, such as the FieldSpecEditor, that takes the 
generated code and allows you to customize it by setting user-friendly 
captions for field names, hiding/showing various fields in different parts of 
the app, and so forth.

 The wizard isn't the only way to create Dabo apps, but for simple table 
maintenance-type apps, it's certainly the quickest and easiest. Your UI is 
limited by the wizard, though, so if you want something that deviates from 
the standard, you'd best skip the wizard and create it from scratch.

 Dabo UI controls are made to be bound to data. To do this, just set two 
properties: DataSource (the table) and DataField (the field in that table). 
That's it. The framework then takes care of populating the controls with the 
correct values, and propagating any changes you make back to the database.

 You can also set the business rules for your app by editing the 
'bizobj' (business object) scripts. These are generated for you with wizard 
apps. For example, if you have a field named 'zipcode' and you wanted to 
ensure that it was exactly 5 digits long, you edit the 'validateRecord()' 
method of the bizobj as follows:

def validateRecord(self):
 errText = ""
 zip = self.zipcode.strip()
 if len(zip) != 5:
  errText += "Zip Codes must be 5 digits long\n"
 if not zip.isdigit():
   errText += "Zip Codes can olny contain digits\n"
 return errText

 'validateRecord()' is called iteratively on each row of your data set. The 
convention in Dabo business objects is that returning any non-empty value 
will prevent the data from being saved. If you return a string, it will be 
passed back to the UI layer, where it can be displayed to the user. 

 This is a very quick overview of  Dabo. I hope it gives you a basic 
understanding of what the framework offers.

> I suspect there may be others in my shoes, both inside and outside the
> Python community.  If I tell such a person "Oh, you have the choice of many
> database application frameworks in Python" such a person's eyes would glass
> open; if I show them "30 seconds" of clean simple code that does as you
> say, such a framework might not only get more widespread adoption, Python
> could gain wider adoption as well.

 At the PyCon DC 2005, I did such a demo. Originally, I had planned on just 
showing the code behind the framework and explaining our design goals, but as 
the session went on, I felt that the audience wanted to be "wowed", so I ran 
the wizard and created an app that accessed a MySQL database back on the 
server in my home. I have one table that archives email list messages that 
had over 250K records and 1/3 Gig of text, so I entered the appropriate 
values for this table in the wizard, and it completed in just about 30 
seconds (it probably would have been faster if I hadn't been explaining each 
step!). I then ran the generated app, and searched the archive for all 
records containing a certain word. Fortunately, the internet connection was 
good, and it returned the result in less than a second! 

 I spoke with several people afterwards who said that they didn't realize that 
such a tool was available for Python. So while I'm pleased with Dabo's 
technical progress, I'm hoping that its mindshare in the Python world catches 
up soon!
-- 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Dabo in 30 seconds?

2005-07-30 Thread Ed Leafe
On Saturday 30 July 2005 23:29, James Stroud wrote:

> I am going to go ahead and throw out Dabo with all of the others that claim
> quick development of an application. You try them and then you get bugs,
> bugs, bugs. Or they don't compile without 16000 dependencies. Forget it. My
> advice is to choose something, one thing, that is REAL standard, and in the
> standard library (e.g. Tkinter).

 Sorry you feel that way. You'll miss out on really great Python products that 
aren't in the standard Library, such as Twisted, Zope/Plone, Dabo, and many 
others.

 Python is a base. You build from there.
-- 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 01:02, phil hunt wrote:

> You mightn't have, but I suspect more Python programers who've
> written GUI apps have used Tkinter than any of the other APIs.
>
> Not that I'm a particular fan of it, it's just I like
> standardisation, because then you get network effects.

 At PyCon DC 2004, Guido was asked about wxPython: "wxPython is the best and 
most mature cross-platform GUI toolkit, given a number of constraints. The 
only reason wxPython isn't the standard Python GUI toolkit is that Tkinter 
was there first."

 I don't think that this is a sign that we should discourage further work with 
wxPython.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 10:32, Torsten Bronger wrote:

> > I know I'm diving into this conversation late, and I haven't read
> > the whole thread, but has someone yet mentioned the "anygui"
> > project?  This has stalled, but it was IMHO a good idea.
> 
> > I don't know exactly why this project died, but I'd start with a
> Pythonic variant of wxPython.  I've read many discussions about the
> people who didn't like the wxPython's C++ style, so there are
> chances to get fellow developers and users.  You must reach the
> critical mass quickly in order to get a survivable project, and
> being not too far away from an existing one is a good stating point.
>
> Possibly Dabo manages such a thing.

 We certainly are striving for such a goal. And while Dabo only supports 
wxPython now, we've designed the UI layer so that it is toolkit-agnostic (in 
theory, at least). After we have a full, robust implementation using 
wxPython, we then plan on implementing Tkinter and Qt, assuming that there is 
demand for those toolkits. But since UIs are incredibly complex beasts, we've 
chosen to tackle one at a time, and after looking at them all and considering 
different issues, we chose wxPython as the best toolkit for creating 
platform-independent apps.

-- 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 12:03, Paul Rubin wrote:

> How on earth did you decide that, since tkinter actually runs out of
> the box when you install Python on most platforms, and wxPython doesn't?

 Because Tkinter looked like crap on OS X. Sorry, but it's hard to sell an 
application that looks bad. Our target for the framework is to build 
cross-platform apps that look native on each platform. Tkinter didn't measure 
up in that regard.

> I can't even think about trying out Dabo unless I'm willing to go through
> some enormous pain of getting wxPython to work.

 There are step-by-step instructions on the wxPython site for building it if 
you need to go that route. There are also pre-built binaries for many 
platforms. On my Ubuntu system, the Synaptic Package Manager installed it 
with a couple of mouse clicks.

  Hey, if this is really too difficult for you, fine. But I don't think it's 
fair to insist that everyone else follow your particular preferences in 
Python. The only one who gets to do that is Guido, and he's already endorsed 
wxPython, and that's good enough for me and most of the Python community.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 19:51, André Roberge wrote:

> On a somewhat unrelated note: is there any "overlap"/"possibility of
> collaboration" between Dabo-UI and Wax?  (I have use neither, sticking
> to pure wxPython so far.)

 I've contacted Hans and we've discussed the possibility, but he didn't seem 
to feel that it would worth it to him. He works on Wax as he needs to, and is 
kind enough to share his work with the rest of us. It certainly isn't his 
main focus, though. 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 13:07, Kay Schluehr wrote:

> My objection with wrappers around wrappers around wrappers is that I
> have no hope ever watching the ground. If some error occurs, which
> layer has to be addressed? Which developing group is reponsible? My own
> or that of team A, team B, team C ... ?

 FWIW, we view errors that occur in Dabo as our responsibility. We've had 
several reported that were our fault, and we corrected them. Others were the 
result of underlying bugs in wxPython, and we reported them to Robin, who 
quickly fixed them. 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 15:48, Kay Schluehr wrote:

> Ed promised to support many GUI toolkits

 I promised nothing of the sort. I said that we had designed our UI layer to 
be toolkit-agnostic, with the design goal of making choice of UI toolkit 
irrelevant. I also said that we recognize the sheer size of such a task, and 
have no current plans to support any toolkit besides wxPython.

 There is a difference in designing a project to make something *possible*, 
and promising to implement all those possibilities.

-- 

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 19:38, Paul Rubin wrote:

> I can put up a Tk gui in about 5 lines of code from a stock Python
> distro without having to install anything additional.  How do I do
> that with wxPython?

import dabo
app = dabo.dApp()
dApp.start() 

 Sorry, I couldn't do it in 5.  ;-) Oh, and that includes a full menu, too.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   3   4   >