Re: Python + Some sort of Propel + Creole

2008-08-12 Thread Josh Bloom
http://sqlobject.org/ http://www.sqlalchemy.org/ Django's built in ORM is also quite good for web development tasks. -josh On Tue, Aug 12, 2008 at 3:18 PM, Samuel Morhaim <[EMAIL PROTECTED]>wrote: > Hi, I come from an extensive background developing webapps with Symfony... > Symfony uses Prope

Re: How to create a file on users XP desktop

2007-10-06 Thread Josh Bloom
I believe you can use something like '%USERPROFILE%\DESKTOP' as the path on a windows machine to get to the current users desktop directory. I'm not sure if the python open() command will expand that correctly, but give it a shot. -Josh On 10/6/07, goldtech <[EMAIL PROTECTED]> wrote: > > Can any

Re: Python memory handling

2007-05-31 Thread Josh Bloom
If the memory usage is that important to you, you could break this out into 2 programs, one that starts the jobs when needed, the other that does the processing and then quits. As long as the python startup time isn't an issue for you. On 31 May 2007 04:40:04 -0700, [EMAIL PROTECTED] <[EMAIL PROT

Re: progress indicator in a mod_python script

2007-05-17 Thread Josh Bloom
Hi Rajarshi, What you probably want to do is break this into multiple parts. When a request comes in to perform a query consider this a new job, give it an ID and set it off and running. Then return an HTML page that knows to keep checking a status URL (based on the ID) every few seconds to see

Re: how to find a lable quickly?

2007-05-04 Thread Josh Bloom
I haven't used it myself, but I'm pretty sure you're going to get a lot of pointers to http://pyparsing.wikispaces.com/ Also you may want to start naming your variables something more descriptive. IE testResultsFile = open('test.txt','r') testLines=testResultsFile.readlines() for line in testLin

Re: grabbing Pictures from the web

2007-04-10 Thread Josh Bloom
I don't have any experience with TK so I can't comment on that but for getting pics from the web, you will need to do the following: 1) Work with the flickr API or flickr feeds to get the url for each picture that you want to work with. 2) Either download the image to disk or read it into memory t

Re: Printing __doc__

2007-03-21 Thread Josh Bloom
This will work, but I'm getting out of my depth as to whether its a good idea to do or not. import sys def testFunc(): ''' Here is my doc string''' n = sys._getframe().f_code.co_name print eval(n).__doc__ testFunc() The issue being that n is a simply a string containing the name of th

Re: writing dictionaries to a file

2007-03-21 Thread Josh Bloom
Where have you defined the relationship between the 2 dictionaries? If you know that all the someys are related to the somex you can do something like this: somex = {'unit':'00', 'type':'processing'} somey1 = {'comment':'fair', 'code':'aaa'} somey2 = {'comment':'fair', 'code':'bbb'} somey3 = {'

Re: List to string

2007-03-20 Thread Josh Bloom
That's pretty funny :) On 3/20/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: On Tue, 20 Mar 2007 13:01:36 +0100, Bruno Desthuilliers wrote: > Steven D'Aprano a écrit : >> On Mon, 19 Mar 2007 13:11:09 +0100, Bruno Desthuilliers wrote: >> >>> There's no "cast" in Python. It would make no sens i

Re: Python & Oracle

2007-03-14 Thread Josh Bloom
I would suggest using cx_Oracle as I have had good experience with it. http://www.cxtools.net/default.aspx?nav=cxorlb -Josh On 3/14/07, Facundo Batista <[EMAIL PROTECTED]> wrote: Hi! I need to connect to Oracle. I found this binding, http://www.zope.org/Members/matt/dco2 that is the recom

Re: Server-side script takes way too long to launch

2007-03-13 Thread Josh Bloom
Teresa, when you call a python script this way, the server needs to load the python interpreter for each call. If you need faster execution you should look into having a server process running already. Something like mod_python for apache or CherryPy will help you speed this up. -Josh On 3/13/

Re: IronPython with Apache

2007-03-08 Thread Josh Bloom
Hi Ed, Some more info about your environment will be helpful here. What OS version, apache version, etc. -Josh On 7 Mar 2007 15:05:54 -0800, edfialk <[EMAIL PROTECTED]> wrote: Hi all, I'm completely new to Python, but fairly experienced in PHP and few other languages. Long story short: The

Re: Python design project

2007-02-05 Thread Josh Bloom
Hi Solrick, This sounds like some interesting stuff. I'd love to discuss it some more with you and maybe work with you on it. Some things to think about: 1. Rules for Font interactions. What happens when fonts 'hit' each other, or 'live' long enough to reproduce andmutate maybe? 2. What p

Re: Recursive zipping of Directories in Windows

2007-02-04 Thread Josh Bloom
Hi Jandre, Your code is treating the directory as a file and trying to open it and read its bytes to zip them. You'll need to differentiate between files and directories. You'll need to check out the Zip module to see how it expects files that should be nested within folders. I believe you'll ne

Re: detecting that a SQL db is running

2006-12-01 Thread Josh Bloom
I think the main point is that your Python code should be written in such a way that when you attempt to connect to your local MSDE it will timeout correctly instead of hanging. Do you have a loop somewhere that just keeps retrying the connection instead of giving up at some point? Here are a co

Re: client/server design and advice

2006-12-01 Thread Josh Bloom
You may also want to take a look at Erlang http://www.erlang.org/ for some ideas of how to do distributed programming. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a way to stop execution of script, in the script

2006-11-14 Thread Josh Bloom
Thanks Fredrik, yeah the while loop for single run is pretty stupid. sys.exit() thats the call I was looking for. -JoshOn 11/14/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: Josh Bloom wrote:> Hi everyone, I'm looking for a way to stop execution of a script from> within the scrip

Looking for a way to stop execution of script, in the script

2006-11-14 Thread Josh Bloom
Hi everyone, I'm looking for a way to stop execution of a script from within the script. I'm familiar with this idiom:While 1:  doFirstThing()  doSecondThing()  if something:    break  doThirdThing()   breakBut that seems a little kludgy to me with extra breaks involved. Is there a way to do someth

Re: What's the best IDE?

2006-10-25 Thread Josh Bloom
I'm not going to call it the 'best' ide as thats just silly. But if your developing on Windows pyscripter http://mmm-experts.com/Products.aspx?ProductId=4 is a great IDE. -JoshOn 10/25/06, Bruno Desthuilliers <[EMAIL PROTECTED] > wrote:[EMAIL PROTECTED] a écrit :> Recently I've had some problems w

Re: MP3 files and Python...

2006-10-11 Thread Josh Bloom
Dive Into Python also has a little tutorial/code for reading and editing mp3 tags. http://www.diveintopython.org/object_oriented_framework/index.html -JBOn 10/10/06, Max Erickson <[EMAIL PROTECTED]> wrote: Karlo Lozovina <[EMAIL PROTECTED]> wrote:> I'm looking for a Python lib which can read and _w

Re: help on pickle tool

2006-10-06 Thread Josh Bloom
If you must build your web ui in Java, then Jython is probably the best way for you to go. Inside of your java code you need to create a Jython instance. Then you can use the Jython pickle module to deserialize the data you are receiving. Last I remember Jython was equivalent to about CPython 2.2

Debugging question: Print out program state (Variables)

2006-10-06 Thread Josh Bloom
Hello PyListers, I have a python script that runs nightly and fetches info from various webservers and does some processing on the data. Occasionally my script has a problem and is unable to finish its work. I have try blocks and logging for most of the errors that can happen. What I would like to

Re: python html rendering

2006-10-03 Thread Josh Bloom
Hey Pierre,I'm using this plug-in for wordpress to display Python code. http://blog.igeek.info/wp-plugins/igsyntax-hiliter/It works pretty well and can display a lot of other languages as well. -JoshOn 10/3/06, Pierre Imbaud <[EMAIL PROTECTED]> wrote: Hi, Im looking for a way to display some pytho

Re: XSLT speed comparisons

2006-09-28 Thread Josh Bloom
Hey Damian, I suggest you take a look at http://mmm-experts.com/Products.aspx?ProductId=4 which is a nice open source Python IDE for windows. After you've installed the version from that page, you should go to http://groups.google.com/group/PyScripter?lnk=oa and get the more recent unofficial rele