wxPython question
Hi Does anyone have some example code to create a wx dialog that apears off screen on the bottom right hand corner and slides up into the screen ? Thanx /vpr -- http://mail.python.org/mailman/listinfo/python-list
wxPython advice
Hi Guys I have a question re. socketserver and wx. I've written a p2p program using socketserver that's nice and quick. I'd like to give the user a tray applet (part of the p2p service) that will allow the user to activate / deactivate / config and exit the service. However I'm starting to bang my head on the mainloop funtions that manage wx and socket events. Anyone been down this road that can give me some advice Marinus -- http://mail.python.org/mailman/listinfo/python-list
Re: wxPython question
I've had some problems, it seems that they dont render well in Linux. I tried it with Ubuntu Breezy. -- http://mail.python.org/mailman/listinfo/python-list
slip beta code released
Hi All Just released the code from my little excusion in socket coding with Python. I still need many pointers esp wrt. the way I hacked wx into the code. Comments welcomed. Quick start --- start up the service: slip.py -s all hosts running slip will be discovered, to see who else is around: slip.py -l debug view: slip.py -la to send files: slip.py c:\mp3\alphavi* bob to send a message slip.py -m bob "catch this" if you use windows you can add an explorer extention by creating a link to: slip.exe -sendto and adding it to your sendto directory. if you use explorer you can now "sendto" and a wx window will popup asking you which peer to send it to. http://prdownloads.sourceforge.net/slip-p2p/slip_beta_0.3.zip?download Regards Marinus comments ? [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list
Re: slip beta code released
I forgot to say that this is my little P2P pet project. Need to send files quickly between systems without having to set up shares or start ftp servers. The idea is to make it easy to "slip" files between parties esp if they are on different OS's. -- http://mail.python.org/mailman/listinfo/python-list
Error managment question (Trace Backs ?)
Hi This is a noob question, but here goes. I have a class that calls a function. class test: def __init__(self): if foo(): print "it worked" else: print "error" def foo(): some test returns 1 or 0 Now in other langs like C / C++ I catch the error in foo and report and exit. However I suspect in python that I can raise it and the class can catch it ? Guess I'm new to Traceback's ,etc Seeking Python Zen :) Marinus -- http://mail.python.org/mailman/listinfo/python-list
slip python p2p program, developers wanted
Hi All Wanted, python coders to hack my p2p program posted at http://prdownloads.sourceforge.net/slip-p2p/slip_beta_0.3.zip?download slip is a simple P2P program that allows peers on a local area network to exchange files and messages. It was written to simplify file transfers by removing the need to set up shares or start FTP servers. help need with: --- wx issues (linux vs windows rendering) rate / connection limiting packaging testing tray application to control service / daemon comments If you are interested drop me a line. regards /vpr -- http://mail.python.org/mailman/listinfo/python-list
Amazon and Webservices
Hi All I've been trying to consume the webservices at Amazon using python. I have not been able to find a *good* webservices module and I've had a look at SOAPpy, etc. Yes I have googled etc, but there seems to be a lack of development in this space apart for one or two projects. Does anyone have a working webservices implementation (not pyamazon) ? /vpr -- http://mail.python.org/mailman/listinfo/python-list
Re: "groupby" is brilliant!
Hi Frank
This is one of the reasons why I love Python, you can write readable
code.
I strive to write clean code but I find that exception handling code
e.g. try:
makes my code ugly and significantly harder to read. Does anyone have
any good
pointers for a former C++ / Perl coder.
/vpr
Frank Millman wrote:
> Hi all
>
> This is probably old hat to most of you, but for me it was a
> revelation, so I thought I would share it in case someone has a similar
> requirement.
>
> I had to convert an old program that does a traditional pass through a
> sorted data file, breaking on a change of certain fields, processing
> each row, accumulating various totals, and doing additional processing
> at each break. I am not using a database for this one, as the file
> sizes are not large - a few thousand rows at most. I am using csv
> files, and using the csv module so that each row is nicely formatted
> into a list.
>
> The traditional approach is quite fiddly, saving the values of the
> various break fields, comparing the values on each row with the saved
> values, and taking action if the values differ. The more break fields
> there are, the fiddlier it gets.
>
> I was going to do the same in python, but then I vaguely remembered
> reading about 'groupby'. It took a little while to figure it out, but
> once I had cracked it, it transformed the task into one of utter
> simplicity.
>
> Here is an example. Imagine a transaction file sorted by branch,
> account number, and date, and you want to break on all three.
>
> -
> import csv
> from itertools import groupby
> from operator import itemgetter
>
> BRN = 0
> ACC = 1
> DATE = 2
>
> reader = csv.reader(open('trans.csv', 'rb'))
> rows = []
> for row in reader:
> rows.append(row)
>
> for brn,brnList in groupby(rows,itemgetter(BRN)):
> for acc,accList in groupby(brnList,itemgetter(ACC)):
> for date,dateList in groupby(accList,itemgetter(DATE)):
> for row in dateList:
> [do something with row]
> [do something on change of date]
> [do something on change of acc]
> [do something on change of brn]
> -
>
> Hope someone finds this of interest.
>
> Frank Millman
--
http://mail.python.org/mailman/listinfo/python-list
Python / Apache / MySQL
Hi All I want to build an Website using Apache / Python and MySQL. I dont want to spend to much time hacking html. I'm looking for some recommendations e.g. should I be using mod_python ? whats the best module for mysql ? any suggestings so I could get my site up in a day ? [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list
cross platform distribution
Hi All After a couple of experiments, searching around and reading Steve Holden's lament about bundling and ship python code, I thought I'd direct this to to the group. I'm using Python 2.6 btw. I've build a commercial application that I'd like to bundle and ship. I'd like to protect some of my IP and the py2exe and cx_freeze builds provide good enough protection for me. I'd like to provide a build for windows and a build for linux. Windows ironically has been easier to target and py2exe has given me a nice build that I can ship between XP, Vista & Server on both 32 and 64 bit. On linux I've build a build using cx_freeze which works well except it's not really portable betweem distributions. I've also been thinking about distributing bytcode versions but things get tricky quickly. Can anywone give me some pointers? Cheers vpr -- http://mail.python.org/mailman/listinfo/python-list
Re: cross platform distribution
On Sep 4, 3:19 pm, Philip Semanchuk wrote: > On Sep 4, 2009, at 4:44 AM, vpr wrote: > > > > > Hi All > > > After a couple of experiments, searching around and reading Steve > > Holden's lament about bundling and ship python code, I thought I'd > > direct this to to the group. I'm using Python 2.6 btw. > > > I've build a commercial application that I'd like to bundle and ship. > > I'd like to protect some of my IP and the py2exe and cx_freeze builds > > provide good enough protection for me. > > > I'd like to provide a build for windows and a build for linux. Windows > > ironically has been easier to target and py2exe has given me a nice > > build that I can ship between XP, Vista & Server on both 32 and 64 > > bit. > > > On linux I've build a build using cx_freeze which works well except > > it's not really portable betweem distributions. > > > I've also been thinking about distributing bytcode versions but things > > get tricky quickly. > > > Can anywone give me some pointers? > > I don't know how much "critical" code you have, but you might want to > look at Cython which will translate your Python into C with little > change to your Python source. Of course, compiled C code can still be > disassembled, but it's harder than Python bytecode. > > HTH > P Hi Peter Sounds like a plan, how portable will that be between Linux systems? Won't I run into some GLIBC problems? Can you force it to statically link the binary? Marinus -- http://mail.python.org/mailman/listinfo/python-list
Re: cross platform distribution
On Sep 4, 3:33 pm, Philip Semanchuk wrote: > On Sep 4, 2009, at 9:24 AM, vpr wrote: > > > > > On Sep 4, 3:19 pm, Philip Semanchuk wrote: > >> On Sep 4, 2009, at 4:44 AM, vpr wrote: > > >>> Hi All > > >>> After a couple of experiments, searching around and reading Steve > >>> Holden's lament about bundling and ship python code, I thought I'd > >>> direct this to to the group. I'm using Python 2.6 btw. > > >>> I've build a commercial application that I'd like to bundle and > >>> ship. > >>> I'd like to protect some of my IP and the py2exe and cx_freeze > >>> builds > >>> provide good enough protection for me. > > >>> I'd like to provide a build for windows and a build for linux. > >>> Windows > >>> ironically has been easier to target and py2exe has given me a nice > >>> build that I can ship between XP, Vista & Server on both 32 and 64 > >>> bit. > > >>> On linux I've build a build using cx_freeze which works well except > >>> it's not really portable betweem distributions. > > >>> I've also been thinking about distributing bytcode versions but > >>> things > >>> get tricky quickly. > > >>> Can anywone give me some pointers? > > >> I don't know how much "critical" code you have, but you might want to > >> look at Cython which will translate your Python into C with little > >> change to your Python source. Of course, compiled C code can still be > >> disassembled, but it's harder than Python bytecode. > > >> HTH > >> P > > > Hi Peter > > It's Philip, actually. =) > > > Sounds like a plan, how portable will that be between Linux systems? > > Very portable, but I should have mentioned that it requires you to > distribute a C file that's compiled on the user's machine. That's easy > to do via distutils but it adds a requirement to your app. > > > Won't I run into some GLIBC problems? > > Can you force it to statically link the binary? > > I don't know the answer to those questions, but it's just a regular C > file, albeit one that's autogenerated. It comes with all of the pros > and cons of a C file you'd written yourself. > > Good luck > Philip Thank Philip :) -- http://mail.python.org/mailman/listinfo/python-list
gaierror
Hi I have a working python app that consumers SOAP services on a 32bit platform. I've packaged it with cx_freeze and executed it on a 64bit plaform. If I use the IP address as the hostname I have no problem, it works as expected. However if I use a DNS name, which I can resolve manuallty i.e. nslookup I get the following error. The underlying code uses httplib. , gaierror(-2, 'Name or service not known') Has anyone had a similar experience? M -- http://mail.python.org/mailman/listinfo/python-list
