visual gui ides for python/jythpn

2007-06-20 Thread kromakey
Hi,

Are there any free visual GUI IDE's available for python/jython, which
have a drag and drop form designer similar to Visual Studio or
Delphi ?

Cheers
kromakey

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


Re: visual gui ides for python/jythpn

2007-06-21 Thread kromakey
Thanks, I'll take a look at these.
Kromakey

On 20 Jun, 22:10, "Peter Decker" <[EMAIL PROTECTED]> wrote:
> On 6/20/07, kromakey <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Are there any free visual GUI IDE's available for python/jython, which
> > have a drag and drop form designer similar to Visual Studio or
> > Delphi ?
>
> Watch these screencasts, and then check out Dabo:
>
> http://leafe.com/screencasts/dataenvironment1.htmlhttp://leafe.com/screencasts/dataenvironment2.html
>
> Dabo's site ishttp://dabodev.com.
>
> --
>
> # p.d.


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


Re: Job Offer: Python Ninja or Pirate!

2007-12-10 Thread kromakey
On 10 Dec, 19:11, Stargaming <[EMAIL PROTECTED]> wrote:
> On Mon, 10 Dec 2007 16:10:16 +0200, Nikos Vergas wrote:
>
> [snip]
>
> >> Problem: In the dynamic language of your choice, write a short program
> >> that will:
> >>  1. define a list of the following user ids 42346, 77290, 729 (you can
> >> hardcode these, but it should
> >> still work with more or less ids)
> >>  2. retrieve an xml document related to each user at this url "http://
> >> api.etsy.com/feeds/xml_user_details.php?id="
> >>  3. retrieve the data contained in the city element from each xml
> >> document
> >>  4. keep a running total of how many users are found in each city 5.
> >>  display the total count of users living in each city
> [snip]
>
> > i wanted to make it a one liner, but i had to import modules :(
>
> > import sys, xml, urllib
>
> > dummy = [sys.stdout.write(city + ': ' + str(num) + '\n') for city, num
> > in set([[(a, o.count(a)) for a in p] for o, p in [2*tuple([[city for
> > city in
> > ((xml.dom.minidom.parseString(urllib.urlopen('http://api.etsy.com/feeds/
>
> xml_user_details.php?id='
>
> > + str(id)).read()).getElementsByTagName('city')[0].childNodes + [(lambda
> > t: (setattr(t, 'data', 'no city'),
> > t))(xml.dom.minidom.Text())[1]])[0].data.lower().replace('  ', ' ') for
> > id in [71234, 71234, 71234, 71234, 71234, 71234, 42792])]])]][0])]
>
> I suggest `__import__` in such cases.
>
> Even though I do not qualify for the job, I came up with this ()
> code (modified list values for demonstration, mixed together from
> previous post and original task):
>
> print '\n'.join('%s: %d'%(x,len(list(y))) for x,y in __import__
> ('itertools').groupby(sorted(__import__('xml').dom.minidom.parse
> (__import__('urllib').urlopen('http://api.etsy.com/feeds/
> xml_user_details.php?id=%d'%i)).getElementsByTagName('city')
> [0].lastChild.data.title() for i in (71234, 729, 42346, 77290, 729,
> 729
>
> I still find this rather readable, though, and there is no bad side-
> effect magic! :-)
>
> Output should be:
>
> | Chicago: 3
> | Fort Lauderdale: 1
> | Jersey City And South Florida: 1
> | New York: 1
>
> Cheers,

A simpleton's version:

#!/usr/local/bin/python

import urllib
from elementtree import ElementTree as et

userids = [71234,729,42346,77290,729,729]
url = 'http://api.etsy.com/feeds/xml_user_details.php?id='

if __name__ == "__main__":

  city = {}
  for userid in userids:
feed = urllib.urlopen(url+str(userid))
tree = et.parse(feed)
for elem in tree.getiterator('city'):
  if not city.has_key(elem.text):city[elem.text] = 1
  else: city[elem.text] += 1
  for k,v in city.items():
if not k == None:print k,':\t',v


Output:

Fort Lauderdale :   1
new york :  1
Jersey City and South Florida : 1
Chicago :   3

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


Module similar to Perl DBIx-PasswordIniFile ?

2008-10-23 Thread kromakey
Does python have a module with this sort of functionality:

http://search.cpan.org/~ecastilla/DBIx-PasswordIniFile-1.1/PasswordIniFile.pm

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