Re: Newbie Text Processing Question

2005-10-04 Thread Gregory Piñero
That's how Python works.  You read in the whole file, edit it, and write it back out.  As far as I know there's no way to edit a file "in place" which I'm assuming is what you're asking? And now, cue the responses telling you to use a fancy parser (XML?) for your project ;-) -Greg On 4 Oct 2005 2

Re: Pythoncard mental block

2005-10-07 Thread Gregory Piñero
The Python-Card guys are really helpful, <[EMAIL PROTECTED]>, you may have to register on sourceforge to get on their list. In the meantime I went ahead and cc'd them on this.  Python-Card guys, make sure to cc Steven as he may not be on the list. -Greg On 10/7/05, Steven D'Aprano <[EMAIL PROTECT

Windows memory pointers in Python?

2005-10-12 Thread Gregory Piñero
Hi guys, I'm really lost of on this one.  How can I turn this (VB?) code into Python?  Basically I call a function exposed from a dll and it returns me what I believe is a pointer to a location in memory?  Now I need to read that area to get the string I need.  This link has the solution but it is

Re: Windows memory pointers in Python?

2005-10-12 Thread Gregory Piñero
/crew/theller/ctypes/ -Greg On 10/12/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: Hi guys, I'm really lost of on this one.  How can I turn this (VB?) code into Python?  Basically I call a function exposed from a dll and it returns me what I believe is a pointer to a location in memory

Re: Looking for a Python mentor

2005-10-12 Thread Gregory Piñero
What kind of programming do you do, Len?  I'm by no means an expert Python programmer but I could look over a few of your programs anyway.  I'd reccomend to always try to challenge yourself.  Don't just program something one way just because it's all you know.  Take 20 minutes now and then to lea

Re: NYLUG meeting: The Python Object Model with Alex Martelli & Google(open bar and food!)

2005-10-14 Thread Gregory Piñero
A reasonable question ...  What date is it ? It isn't mentioned at the web site either.George --http://mail.python.org/mailman/listinfo/python-list-- Gregory PiñeroChief Innovation Officer Blended Technologies(www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-25 Thread Gregory Piñero
Hi guys, I was hoping some XML expert could help me make this code work.  Below is sample code with sample XML similar to what I'm dealing with. How can I make the weird characters in the XML not break the parser?  I'll do anything to make this work! (Note: the   broke my parser yesterday but do

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-26 Thread Gregory Piñero
Should I try some sort of XML group instead?  I'm still stuck on this. -Greg On 10/25/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: Hi guys, I was hoping some XML expert could help me make this code work.  Below is sample code with sample XML similar to what I'm dealing with. Ho

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-26 Thread Gregory Piñero
is not well formed, otherwise.The code then works.HTHJGregory Piñero wrote:> Should I try some sort of XML group instead?  I'm still stuck on this. >> -Greg>>> On 10/25/05, *Gregory Piñero* <[EMAIL PROTECTED]> [EMAIL PROTECTED] >> wrote:>> Hi guys,>>

syntax question - if 1:print 'a';else:print 'b'

2005-10-26 Thread Gregory Piñero
Any idea why I can't say: if 1:print 'a';else:print 'b' all in one line like that? It's just a random question I ran across a few days ago. -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com ) -- http://mail.python.org/mailman/listinfo/python-list

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-27 Thread Gregory Piñero
Thanks, John.  That was all very helpful.  It looks like one option for me would be to put cdata[ around my text with all the weird characters.  Otherwise running it through on of the SAX utilities before parsing might work. I wonder if the sax utilities would give me a performance hit.  I have 60

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
So much for writing my whole program on one line :-( j/k -GregOn 10/26/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: Gregory Piñero wrote:> Any idea why I can't say:>> if 1:print 'a';else:print 'b'>> all in one line like that?because ";"

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
block of code and use tabs. And I don't want to edit the function so it's not an option to put the try in there. -Greg On 10/27/05, Simon Brunning <[EMAIL PROTECTED]> wrote: On 27/10/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:> So much for writing my whole program

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
Not quite because if something(3) fails, I still want something(4) to run.  On 10/27/05, Micah Elliott <[EMAIL PROTECTED]> wrote: If you just want to ignore the exceptions while saving space/typing,you could equivalently do::try:something(1)something(2)# ...except: 

Pythonwin - Word automation - Removing watermark not working

2005-11-03 Thread Gregory Piñero
I thought I'd take a shot and see if anyone knows the answer to this?  I've been stuck for a while now on this. Would anyone happen to know why this my function removewatermark() in this code isn't working?  I copied it from a Word macro I recorded and it did work when I recorded the macro.  When

Re: Pythonwin - Word automation - Removing watermark not working

2005-11-04 Thread Gregory Piñero
Is there a different group/mailing list I should try?  Does anyone know if there is a pythonwin group/list for example? On 11/3/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: I thought I'd take a shot and see if anyone knows the answer to this?  I've been stuck for a while now

Re: Pythonwin - Word automation - Removing watermark not working

2005-11-05 Thread Gregory Piñero
Thanks Simon, I'll try that.  And if that doesn't work, why I'll try a Microsoft word group! -Greg On 11/5/05, Simon Brunning <[EMAIL PROTECTED]> wrote: On 04/11/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:> Is there a different group/mailing list I should try?  D

Function - Empty list as default parameter - not acting local?

2005-11-15 Thread Gregory Piñero
Hey guys, could anyone explain this behavior to me.  It doesn't seem right :-( def testfunc(parm1,parm2={}):     print 'parm2',parm2     parm2['key1']=5 >>testfunc('greg') parm2 {} >>testfunc('greg') parm2 {'key1': 5} def testfunc2(parm1,parm2=[]):     print 'parm2',parm2     parm2.append(5) >>

Re: Locking a file under Windows

2005-11-24 Thread Gregory Piñero
I'd be more worried about two users writing to the file at the same time.  I don't have much experience in that area though so maybe someone could chime in on if that's a legitimate worry or not. -Greg On 11/24/05, Tim Golden <[EMAIL PROTECTED]> wrote: [Guy Lateur]> I'm working on an application t

Detect Blank DVD or CD in CDROM Drive

2005-12-02 Thread Gregory Piñero
Hi guys, I'm thinking it will take a real expert to do this, probably someone who can use windows API's or directly poll the hardware or some such thing.  But if you think you know how then please let me know.  I'm trying to write an automation script that will burn an ISO file each night. By the

Re: Detect Blank DVD or CD in CDROM Drive

2005-12-02 Thread Gregory Piñero
not sure if this first email made it to the list.  Sorry if it ends up as a dupe.On 12/2/05, Gregory Piñero <[EMAIL PROTECTED] > wrote:Hi guys, I'm thinking it will take a real expert to do this, probably someone who can use windows API's or directly poll the hardware or some suc

Test - Please ignore

2005-12-05 Thread Gregory Piñero
Sorry for the disruption. My messages don't seem to be making it to the list. -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Database recommendations for Windows app

2005-06-22 Thread Gregory Piñero
I always figured a problem with using MySQL was distribution. Would you have to tell your users to install MySQL and then to leave the service running? I've never found an easy way to embed MySQL into a python app, and even if you could, would you then have to pay for it? -Greg On 6/22/05, Tho

os.system(cmd) isn't working

2005-06-22 Thread Gregory Piñero
Hi guys, I'm trying to run this statement: os.system(r'"C:\Program Files\Mozilla Firefox\firefox.exe"' + ' "www.blendedtechnologies.com"') The goal is to have firefox open to that website. When I type r'"C:\Program Files\Mozilla Firefox\firefox.exe"' + ' "www.blendedtechnologies.com"' in the py

Re: os.system(cmd) isn't working

2005-06-23 Thread Gregory Piñero
Thanks to everyone for all the help! After careful consideration I decided to go with os.startfile(url) It works just great! Here's my program in case anyone's interested. 5 points if you can guess what it does ;-) """Take a filepath from stdin and translate to the corresponding url and open

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Gregory Piñero
Make sure that line with name=="Nathan" is not indented. It's hard to tell from the code there. Also, I'm thinking that this won't work: if name == "Nathan": print "What a great name!" elif name == ["Madonna", "Cher"]: because the variable name is a string and not a list. You could t

Re: Modules for inclusion in standard library?

2005-06-29 Thread Gregory Piñero
I'd like to see some database API's to the most common databases included. It would make Python much more useful for web development. I've come across situations where a web host supports python and supports MySQL yet it's taken me days to get the MySQLAPI installed with running setup in my home

Python syntax high-lighting and preservation on web

2005-06-29 Thread Gregory Piñero
Hey guys, Does anyone know where I can pick up a style sheet (css) and/or other files/programs I might need to display python code on my website with tab preservation(or replace with spaces) and colored syntax? I want something similar to the python code on a page like this: http://aspn.activest

Re: Python syntax high-lighting and preservation on web

2005-06-29 Thread Gregory Piñero
This is perfect! Thanks! On 6/29/05, Daniel Dittmar <[EMAIL PROTECTED]> wrote: > Gregory Piñero wrote: > > Hey guys, > > > > Does anyone know where I can pick up a style sheet (css) and/or other > > files/programs I might need to display python code on my web

Re: Modules for inclusion in standard library?

2005-06-29 Thread Gregory Piñero
langauges so forgive me if I am too bold. -Greg On 6/29/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > Gregory Piñero <[EMAIL PROTECTED] > writes: > > > >>I'd like to see some database API's to the most common databases &

Re: Modules for inclusion in standard library?

2005-06-29 Thread Gregory Piñero
ries included" means Python MUST be useful for common tasks right out of the box. Perhaps the only debate should be, what are the most common tasks? Just some more ideas to consider... Greg On 6/29/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: > While that policy does make sense

Re: Modules for inclusion in standard library?

2005-07-08 Thread Gregory Piñero
Has anyone recommended ftputil? Either add that to the library or make the existing ftp module more high level would be my suggestion. http://www.sschwarzer.net/python/python_software.html -Greg On 7 Jul 2005 05:38:28 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: > 1. LDAP module shoul

Re: Web client, https and session management

2005-07-12 Thread Gregory Piñero
How's this for an answer, it even uses yahoo in the example! http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/391929 Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: how to build email message with attachment?

2005-07-26 Thread Gregory Piñero
I wrote a module to do this a while back. I put the script on my website just now. Let me know if it helps. http://www.blendedtechnologies.com/how-to-send-emails-with-python/19 -- Gregory Piñero CEO and Founder Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org

Distutils Question - Creating an "installer" for python users?

2005-08-01 Thread Gregory Piñero
me to a good tutorial (probably more newbie friendly than the one in the python docs). I already made a py2exe version for windows users without python installed so I already have a somewhat working setup.py file. Thanks in advance for your help. -- Gregory Piñero CEO and Founder Blended

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
? > | > | -- > | Grant Edwards grante Yow! .. I think I'd > | at better go back to my > DESK > | visi.com and toy with a few > common > |

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
On 8/2/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Vincent, I'm not sure I completely understand your question but this > link may be the answer nonetheless: > http://www.jrsoftware.org/isfaq.php#workingdir I meant to say Grant, ... , Vincent wasn't the one with the q

Re: py2exe windows apps path question

2005-08-02 Thread Gregory Piñero
> If you need something that works both on a frozen app as well as an > (unfrozen) python > script, you'd be better off using something like: > > def getAppPrefix(): > """Return the location the app is running from > """ > isFrozen = False > try: > isFrozen = sys.frozen >

Re: Splitting a string into groups of three characters

2005-08-08 Thread Gregory Piñero
ROTECTED]" > > Translating to Python is left as homework. > > -- > William Park <[EMAIL PROTECTED] >, Toronto, Canada > ThinFlash: Linux thin-client on USB key (flash) drive >http://home.eol.ca/~parkw/thinflash.html > BashDiff: Super Bash shell > http://freshmeat.net/projects/bashdiff/ > -- > http://mail.python.org/mailman/listinfo/python-list > -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Gregory Piñero
>>lst1 [1,2,3,4] >>func2(bool1) >>bool1 True Why does my list variable get changed for the rest of the program, but my boolean variable doesn't. What am I not understanding? -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- h

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Gregory Piñero
EMAIL PROTECTED]> wrote: > On Tue, 9 Aug 2005 10:53:15 -0400, Gregory Piñero <[EMAIL PROTECTED] > > declaimed the following in comp.lang.python: > > Is this the third time this week that this has come > up? > > > Hey guys, would someone mind giving me a quick r

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Gregory Piñero
inked earlier[1], but > now I'm a little embarrased to find out that isn't, and I have no clue > where it's from. > > [1] http://starship.python.net/crew/mwh/hacks/objectthink.html > -- > http://mail.python.org/mailman/listinfo/python-list > -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: (OT) Is there something that people can use instead of full blown Python to run Python programs?

2005-08-18 Thread Gregory Piñero
I'm no expert, but I'm guessing you could compile a python with less libraries.  I bet that would slim it down a lot. -Greg On 8/18/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: Hi all,   Is there something besides the full blown version of Python that people can use to run Python programs,

Re: Python jobs (was Re: Python for Webscripting (like PHP))

2005-08-19 Thread Gregory Piñero
I'd love Python work, just like everyone else here.  On a related topic, what's the policy/etiquette of posting a resume on here, or mentioning what kind of work you're looking for?  And what's the policy in general for most newsgroups and mailing lists? -Greg On 8/19/05, Steve Holden <[EMAIL PROT

Re: global interpreter lock

2005-08-19 Thread Gregory Piñero
KM, I eagerly await the answer to this question as well.  I'd love to see this explained in laymen's terms.  From what I understand of this issue, your best bet for getting parrelism is to use whatever the OS provides and just have multiple python instances running... but then I didn't understan

Re: global interpreter lock

2005-08-19 Thread Gregory Piñero
Would a cheap solution just be to run two python interpreters and have the scripts communicating over COM or some other such thing?  I'd imagine that would give you true parallelism. -GregOn 8/19/05, Donn Cave <[EMAIL PROTECTED]> wrote: In article <[EMAIL PROTECTED] >, Bryan Olson <[EMAIL PROTECTE

Re: High Level FTP library

2005-08-23 Thread Gregory Piñero
I reccomend ftputil (http://www.sschwarzer.net/python/python_software.html) also.  I went through the same thing you did about 2 months ago and ftputil was the best I found.  Here's a short script I wrote using ftputil: http://www.blendedtechnologies.com/instant-gratification-for-a-home-web-develop

Re: Embedding Python in other programs

2005-08-26 Thread Gregory Piñero
How do I get it into VB6?  Now that's an answer that would save my life many times over. -GregOn 8/26/05, Alessandro Bottoni <[EMAIL PROTECTED]> wrote: Thomas Bartkus wrote:> Name: lib64python2.4-devel> Summary: The libraries and header files needed for Python development>> Description: The Python

Re: Embedding Python in other programs

2005-08-26 Thread Gregory Piñero
ied for those arguments in the declaration for the routine. Your Declare statement for a Windows DLL includes CDecl. Any ideas? -Greg On 8/26/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: How do I get it into VB6?  Now that's an answer that would save my life many times over. -GregOn 8/26/

Re: Embedding Python in other programs

2005-08-26 Thread Gregory Piñero
Oh, by the way, here's the VB code I'm using: http://www.blendedtechnologies.com/wp-content/VB_uses_Python.zip I wonder if this question should go to some kind of VB list instead? -Greg On 8/26/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: Hey guys, This question inpsired m

Re: Embedding Python in other programs

2005-08-27 Thread Gregory Piñero
on this? I'll do a search later today. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in other programs

2005-08-28 Thread Gregory Piñero
gt; Overviews) along with the needed > win32all module. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in other programs

2005-08-28 Thread Gregory Piñero
do to use this com server thingy from within VB? I'd really appriciate any help. Thanks, Greg On 8/28/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Thanks Ravi, I'll take a look > > > On 27 Aug 2005 22:55:40 -0700, Ravi Teja <[EMAIL PROTECTED]> wrote: >

Re: To the python-list moderator

2005-08-31 Thread Gregory Piñero
I got this same message.  I'm using gmail. GregOn 8/31/05, Terry Reedy <[EMAIL PROTECTED]> wrote: For a couple of years, I have been reading and posting and posting topython-list and c.l.p via gmane.news.orgs gmane.comp.python.general group.Today I got this from 'python-list-bounces', which I pres

Re: Bicycle Repair Man usability

2005-09-01 Thread Gregory Piñero
How would you setup BRM in VIM?  And bonus points for explaining it for Windows users ;-)  > I recently got PyDev for Eclipse, which comes with BRM.I use it from VIM. -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com) -- http://mail.python.org/mailman/list

Re: Python compiled?

2005-09-05 Thread Gregory Piñero
Hmm, this may be offtopic, but does anyone know how pyinstaller actually works?  Does it just unpack everything into a temporary directory at runtime?  How can it work in Windows and Linux?  Their website was sparse... Well I'm trying it now.  Let me know if anyone has these answers in the meantim

Re: pretty windows installer for py scripts

2005-09-12 Thread Gregory Piñero
How do you do this with the disutils module?  I'm looking to make an installer that will install a python library. Isn't that already available in the distutils module ?-- http://mail.python.org/mailman/listinfo/python-list-- Gregory PiñeroChief Innovation OfficerBlended Technologies( www.blendedte

py2app without a mac?

2005-09-12 Thread Gregory Piñero
Hey guys, I want to make my python program be installable on a mac, however I have no access to a mac myself.  Is there any way I can still use py2app to create the app?  Otherwise what other options do I have?  (google turned up nothing for me) I don't want to require the users to have python in

Re: py2app without a mac?

2005-09-13 Thread Gregory Piñero
That's an interesting idea, Tony.  My program uses things like wxPython, PythonCard, etc, so would distutils know to package that stuff?  Do you know what distutils commands I would use?  If not, I'll look it up later today. Thanks, Greg Recent versions of OS X include Python - there's a pretty g

Re: Create and display an email

2005-09-14 Thread Gregory Piñero
I looked into this same question many months ago and got stuck just where you are.  Indeed the webbrowser.open('mailto:...') command seems like a great idea, but I lost 6 hours of my life trying to figure out how to do attachments :-(  Here's my guess at what your two best options are: 1. Work wit

Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
newfreq[key]=value+freq1.get(key,0) return newfreq freq1={ 'dog':1, 'cat':2, 'human':3 } freq2={ 'perro':1, 'gato':1, 'human':2 } print add_freqs(freq1,freq2) answer_I_want={ 'dog':1, 'cat':2, 'perro':

Re: Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
unction. -Greg On 12/14/05, Peter Otten <[EMAIL PROTECTED]> wrote: > Gregory Piñero wrote: > > > def add_freqs(freq1,freq2): > > """Addtwowordfreqdicts""" > > newfreq={} > > forkey,valueinfreq1.items(): > > newfreq[key]=va

Re: Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
r Otten <[EMAIL PROTECTED]> wrote: > Gregory Piñero wrote: > > > Here's a question about your functions. if I only look at the keys in > > freq2 then won't I miss any keys that are in freq1 and not in freq2? > > No. As I start with a copy of freq1, all keys of freq1

Re: Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
OK, I ran Peter's add_freq3 and it ran four times on really large dictionaries in about 3000 seconds. So I'd say that at a minimum that's ten times faster than my original function since it ran all last night and didn't finish. Much obliged, Peter! -Greg On 12/14/05, Gr

Re: Robotics and parallel ports

2005-12-15 Thread Gregory Piñero
the parallel port (serial ports are > said to be slow when sending a lot of data (I think)). I think I'll start > off with something very simple, for example controlling a motor and then > move up to more advance models. > > Thanks again. > > Regard

Re: pyExcelerator - Can I read and modify an existing Excel-WorkBook?

2006-07-11 Thread Gregory Piñero
preadsheet. > > Here are a few links that might help: > > http://mathieu.fenniak.net/plotting-in-excel-through-pythoncom/ > http://www.markcarter.me.uk/computing/python/excel.html > http://mathieu.fenniak.net/plotting-in-excel-through-pythoncom/ > > Hope info helps. >

Urllib.encode() - How does it Treat a List?

2006-07-27 Thread Gregory Piñero
s=form.getlist('value') and values will equal a list with 1,2, 3 or at least '1', '2', '3' Much thanks in advance! -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Urllib.encode() - How does it Treat a List?

2006-07-27 Thread Gregory Piñero
Ok, nevermind, I figured it it, see below On 7/27/06, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Hi Wise Python Folk, > > Here's my code: > >>> p={'type':'bar','title':'Gregs Chart 1','values':[1,2,3],'labels

Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
you might have. I'm also open to options I haven't thought of too. -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
On 5 Aug 2006 15:27:03 -0700, Simon Forman <[EMAIL PROTECTED]> wrote: > Out of curiosity, why do you want to _backup_ a gmail account? (I use > my gmail account to backup files and documents I never want to lose.) > I could think of some reasons, but I'm wondering what yours are. : ) Here are a f

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
On 8/5/06, Neil Hodgson <[EMAIL PROTECTED]> wrote: > While you can write a script, its quite easy to turn on POP and run > a client side mail client like Thunderbird. Good point, Neil. This is a very tempting option, I just wanted to include it in a backup script rather than having to open up

How do I put % in a format sting?

2006-10-05 Thread Gregory Piñero
e "", line 1, in ? TypeError: not enough arguments for format string -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I put % in a format sting?

2006-10-05 Thread Gregory Piñero
Thanks guys, putting it twice is all it took! -- http://mail.python.org/mailman/listinfo/python-list

WSGI - How Does It Affect Me?

2006-10-08 Thread Gregory Piñero
So I keep hearing more and more about this WSGI stuff, and honestly I still don't understand what it is exactly and how it differs from CGI in the fundamentals (Trying to research this on the web now) What I'm most confused about is how it affects me. I've been writing small CGI programs in Pytho

Re: WSGI - How Does It Affect Me?

2006-10-09 Thread Gregory Piñero
Thanks for all the answers everyone. It's finally starting to come together for me. Bruno, I tried reading some tutorials but perhaps I made the content out to be more complicated than it really was and got confused. So my final question is if WSGI will work on any web hosting company that suppo

PIL - Pixel Level Image Manipulation?

2006-11-08 Thread Gregory Piñero
image as needed. I'm hoping someone has some experience on this and could offer some advice or code. I thought it would be easy in PIL but I'm not sure. Much Appreciated, -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.pyt

Re: PIL - Pixel Level Image Manipulation?

2006-11-08 Thread Gregory Piñero
On 11/8/06, Gregory Piñero <[EMAIL PROTECTED]> wrote: > I want to be able to randomly change pixels in an image and view the > results. I can use whatever format of image makes this easiest, e.g., > gray scale, bit tonal, etc. > > Ideally I'd like to keep the pixels in a

Re: Heap Memory

2006-11-16 Thread Gregory Piñero
On 11/16/06, Bugra Cakir <[EMAIL PROTECTED]> wrote: > Hi my name is Bugra Cakir, > > I have a question. How can we increase heap memory or total memory Python > interpreter > will use in order to avoid memory problems ? I've wondered the same thing myself. Even if it turns out it's just not possi

Re: Heap Memory

2006-11-16 Thread Gregory Piñero
On 11/16/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > what are you guys talking about? there are no artificial memory > limitations in Python; a Python process simply uses all the memory it > can get from the operating system. I wish I could easily reproduce one of these errors I'm thinking of.

Re: Heap Memory

2006-11-16 Thread Gregory Piñero
On 11/16/06, Thinker <[EMAIL PROTECTED]> wrote: > What is your OS? Maybe you should show out the memory usage of your python > process. In FreeBSD, you should set evironment variable > 'MALLOC_OPTIONS=P' to > print out usage of malloc()。Maybe you can find a way, in your system, > to print out usage

tempfile Question

2006-06-06 Thread Gregory Piñero
TPATH,filepath,outfilename) result=os.popen(command).read() pdftext=outfile.read() outfile.close() return pdftext Much thanks! -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Psyco performance

2006-06-20 Thread Gregory Piñero
What's the reasoning behind requiring everything to be in functions? Just curious. On 6/20/06, Christophe <[EMAIL PROTECTED]> wrote: > > Place all the code in a function. Even without psyco you might get > somewhat better performances then. And I doubt psyco can optimise code > that isn't in a fu

Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Gregory Piñero
is but it doesn't have numbers and I can't tell if it's even what I'm looking for: http://docs.python.org/lib/module-errno.html Much thanks! -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Built-in Exceptions - How to Find Out Possible Errno's

2006-07-05 Thread Gregory Piñero
58, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067, > 10068, 10069, 10070, 10071, 10091, 10092, 10093, 10101] > >>> print errno.errorcode[10] > ECHILD > > or > > >>> import os > >>> print os.strerror(10) > No child processes &g

Web Browser Pygame Plug-in?

2006-07-06 Thread Gregory Piñero
Hi guys, I was just idley curious on what it would take to make a web plug-in for Pygame. I'm picturing it working the way my browser currently shows flash games. Is such an idea even possible? Has anyone attempted this? -- Gregory Piñero Chief Innovation Officer Blended Technol

Re: Web Browser Pygame Plug-in?

2006-07-07 Thread Gregory Piñero
t;[EMAIL PROTECTED]> wrote: > Gregory Piñero wrote: > > I was just idley curious on what it would take to make a web plug-in > > for Pygame. I'm picturing it working the way my browser currently > > shows flash games. Is such an idea even possible? Has anyone > &g

Re: Web Browser Pygame Plug-in?

2006-07-07 Thread Gregory Piñero
Shane Wrote: > Ah, so you also want to distribute untrusted Python code. That's fairly > hard. There's a discussion about it on Python-Dev right now. Well, I want to write a game in Pygame, and people can just go to my website and play it within their browser. I guess that would be untrusted co

Re: pyXLWriter - grid lines and if formula

2006-07-07 Thread Gregory Piñero
On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote: > Hi, > > I know that pyExelerator is the supported project now, but I can't use > it because I'd need it to generate files from a web platform. Since I > can not save a file to a file-like object, I have to use pyXLWriter. I don't really know w

Re: Web Browser Pygame Plug-in?

2006-07-10 Thread Gregory Piñero
AIL PROTECTED]> wrote: > Gregory Piñero wrote: > > I was just idley curious on what it would take to make a web plug-in > > for Pygame. I'm picturing it working the way my browser currently > > shows flash games. Is such an idea even possible? Has anyone > > a

Re: pyExcelerator - Can I read and modify an existing Excel-WorkBook?

2006-07-11 Thread Gregory Piñero
uld like to keep the "formatting" in the template. > > > > Did I miss a "load", "read" or "open" function in pyExcelerator that > > would hand me back a WorkBook? > > > > Greetings, > > Marco > > > > > If you are o

Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
Hey Folks, Some import questions that a search didn't turn up for me. 1. Will "from somemodule import onething" take as long to start up as import somemodule? 2. Is there anyway I can get at onething more quickly? 3. If I put an import statement hidden away in some function, will Python only do t

How to Interpret Hotshot Stats

2006-08-31 Thread Gregory Piñero
Would someone mind giving me a quick explanation on what this is telling me? How much is 201 CPU seconds? Watching the clock the run seems to take 7 seconds all the way from clicking on the batch file to run my hotshot script. Does that mean most of that time was in loading the interpreter? Am

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > several seconds? sounds bad. what does the following script print on > your machine? > > import time, subprocess, sys > > t0 = time.time() > for i in range(10): > subprocess.call([sys.executable, "-c", "pas

Re: Basic import Questions (with bonus profiling question)

2006-08-31 Thread Gregory Piñero
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > what module is this? if it takes 5.5 seconds to import a single module, > something isn't quite right. Ok, I know it sounds bad but it has a good purpose! Basically it provides access to about 100mb of data. It serves as a cache of QuickBoo

Removing from a List in Place

2006-09-05 Thread Gregory Piñero
>>> Bonus Question: Can we make this behave more intuitiviely in Python 3000? -Greg -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing from a List in Place

2006-09-05 Thread Gregory Piñero
On 9/5/06, Tim Williams <[EMAIL PROTECTED]> wrote: > > It does already, you just haven't grasped list fully yet :):) > > > > when you remove 2 from alist, the list becomes length 2, there is no > > longer a 3rd item in the list to iterate over. > > > > Try this > > > > > >>> alist=[1 ,2 ,3, 4] >

How to get a Fix to an Abandoned Project?

2006-09-19 Thread Gregory Piñero
ate the project so others can use it, but I can't seem to login to the trac page to change the code? Just wondering if there's some obvious way to change the source code, or register? Otherwise any other advice is welcome. Should I just post the code somewhere else, etc? Thanks,

Re: How to get a Fix to an Abandoned Project?

2006-09-19 Thread Gregory Piñero
On 9/19/06, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > Gregory Piñero <[EMAIL PROTECTED]> wrote: > > Otherwise any other advice is welcome. Should I just post > > the code somewhere else, etc? > > Maybe you can fork and maintain it somewhere else... Forking

Re: How to get a Fix to an Abandoned Project?

2006-09-19 Thread Gregory Piñero
Say hello to pydelicious's new home ;-) http://code.google.com/p/pydelicious/ -Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a Fix to an Abandoned Project?

2006-09-20 Thread Gregory Piñero
On 20 Sep 2006 08:08:01 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > Gregory Piñero wrote: > > Say hello to pydelicious's new home ;-) > > http://code.google.com/p/pydelicious/ > > > > -Greg > > Unless you are the original project's maintain

  1   2   >