Making Python the Best App Dev Platform

2020-09-18 Thread gMail
Hello, All We all know Python is a wonderful environment, with fantastic packages for App Dev like Flask, SQLAlchemy and Django. Now let’s make it the only reasonable choice for building database-oriented systems. I’d like to introduce 2 new capabilities: Build a web app in 10 minutes: this g

Logic Bank

2020-10-23 Thread gMail
Hello, All I am pleased to announce the release of Logic Bank. Logic Bank introduces spreadsheet-like rules for multi-table derivation and constraint logic for SQLAchemy databases - 40X more concise than legacy code, extensible and manageable using Python. Described in this article

file events using fsevents for mac

2010-04-10 Thread gmail
Hi Everyone, I m using python3 for my application and i need to capture file events using fsevents. Is ter anyone knows to access fsevents in python3. thanks for help in advance rgds mathan -- http://mail.python.org/mailman/listinfo/python-list

Issue with PyUnicodeObject type variables

2010-05-17 Thread gmail
A variable whose data type is PyUnicodeObject checked whether it is a UnicodeObject type. Got output as false example : PyUnicodeObject *p; if (PyUnicode_Check(path)) { printf("\nTrue.\n"); } else { printf("\nfalse.\n"); } output: false Confused what went wrong. re

Convert PyUnicodeObject to PyBytesObject in python3.x?

2010-05-18 Thread gmail
Hi All, A variable whose data type is PyUnicodeObject needs to passed to a function as an argument whose data type should be PyBytesObject type example : PyUnicodeObject *p = ...whatever...; function (PyByteObject* a); function((PyBytesObject *)p); compiled and got a Bus Error. Thanks for

Re: Selecting unique values

2011-07-26 Thread sparky gmail
On 7/25/2011 3:03 PM, Kumar Mainali wrote: Greetings I have a dataset with occurrence records of multiple species. I need to get rid of multiple listings of the same occurrence point for a species (as you see below in red and blue typeface). How do I create a dataset only with unique set of l

Re: Community Involvement

2011-08-04 Thread sparky gmail
On 8/3/2011 8:14 PM, Steve Holden wrote: [Ccs appreciated] After some three years labor I (@holdenweb) at last find myself approaching the completion of the Python Certificate Series with O'Reilly School of Technology (@OReillySchool). At OSCON last week the team fell to talking about the fi

Re: how to get PID from subprocess library

2011-05-22 Thread GMail Felipe
On 22/05/2011, at 10:41, TheSaint wrote: > Kushal Kumaran wrote: > >> You could look for a way to make aria2c not become a daemon and use >> subprocess.Popen to start it. That gives you the PID and ways to see >> if the process is still running > > I see. It's a step that I've to get on my a

Document Entire Apps

2019-09-14 Thread Sinardy Gmail
Hi Python Gurus, I am in earlier stage in my apps development, What tools or how is the Python community standard good practice in documenting the apps especially the packages that import another packages. I understand that we can use pydoc to document procedures how about the relationship bet

Re: PyQT: QWebView with custom QNetworkAccessManager

2011-02-02 Thread Gelonida Gmail
Hi Phil, On 02/02/2011 09:28 AM, Phil Thompson wrote: > On Wed, 02 Feb 2011 02:37:06 +0100, Gelonida wrote > > In fact my first experiments failed horribly due to a tiny PyQt detail. > > I expected that, the variable new_manager does not have to be > persistent. >> I naively assumed, that a call

Re: subprocess pipe question

2011-02-22 Thread GMail Felipe
On 22/02/2011, at 20:44, Rita wrote: > I have a process like this, > > def run(cmd): > #cmd=a process which writes a lot of data. Binary/ASCII data > p=subprocess.Popen(cmd,stdout=subprocess.PIPE) > > I would like to get cmd's return code so I am doing this, > > def run(cmd): > p=subpro

Re: float from numbers in text file

2010-06-21 Thread GMail Felipe
On 21/06/2010, at 20:26, davidgp wrote: On Jun 21, 4:18 pm, Stephen Hansen wrote: On 6/21/10 4:03 PM, davidgp wrote: sorry :) Okay, I should be more specific: include full tracebacks and some real copied and pasted code :) Don't throw away nice debugging information Python gave you,

Re: Help installing Python 2.3 on Win2K

2005-09-23 Thread Tim Williams (gmail)
On 23/09/05, D.S. Hein <[EMAIL PROTECTED]> wrote: > I have tried various ways to set PYTHONPATH with the various directories > where I have python programs (i.e. xx.py) but no matter how I set > PYTHONPATH I keep getting a message that python can't open the python > file. If I try to specify t

Re: socketServer questions

2005-10-08 Thread Tim Williams (gmail)
On 07/10/05, rbt <[EMAIL PROTECTED]> wrote: > I have written a python socketServer program and I have a few questions This is a multithreaded non-blocking version of your server (not tested), with a basic attempt to hande errors. from socket import * from SocketServer import * import time, threa

Re: Send password over TCP connection

2005-10-10 Thread Tim Williams (gmail)
On 10 Oct 2005 13:31:51 -0700, dcrespo <[EMAIL PROTECTED]> wrote: > Hi. I found TSL, a Python Library that supports SRP. > Do you know where can I find a sample client and server code? Thanks > for your help. http://trevp.net/tlslite/ It comes with examples. I use it in several servers and clie

Re: do cc list from smtplib

2005-10-21 Thread Tim Williams (gmail)
On 21 Oct 2005 02:34:40 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > def email(HOST,FROM,TO,CC,SUBJECT,BODY): > import smtplib > import string, sys > body = string.join(( > "From: %s" % FROM, > "To: %s" % TO, > "CC: %s % CC, > "Subject: %s" % SUBJECT, > "", >

Re: do cc list from smtplib

2005-10-21 Thread Tim Williams (gmail)
On 21/10/05, Steve Holden <[EMAIL PROTECTED]> wrote: > > Assuming that TO and CC are single addresses it would be saner to use: > :) Assuming that the envelope TOs (inc CCs) are the same as the Header-TOs and Header-CCs Actually, I think this would be safer ! > def email(HOST,FROM,TO,CC, RECI

Re: dictionary that have functions with arguments

2005-11-02 Thread Tim Williams (gmail)
On 1 Nov 2005 20:02:41 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i have a dictionary defined as > > execfunc = { 'key1' : func1 } ## def __HELLO(x=' '): print 'HELLO',x def __BYE(x=' '): print 'BYE',x def __PRINT(x=None, y=None): print 'PRINT',x,y c

Re: Spambayes modifications with web services

2005-11-02 Thread Tim Williams (gmail)
On 02/11/05, Steve Holden <[EMAIL PROTECTED]> wrote: > Personally I didn't regard the reply as unhelpful, and I believe the > replier was honestly trying to get you to see that your rather naive > suggestion was most unlikely to make things better. > To the OP A tip for curing your own problem -

Re: Adding through recursion

2005-11-18 Thread Tim Williams (gmail)
On 18 Nov 2005 06:30:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:> I still don't get it. I tried to test with x = 0 and found that to Informative print statements can help you to see and understand  the program flow, especially if the problem is conceptual,  with no *real*  errors in yo

Re: query domain registry from python?

2005-11-20 Thread Tim Williams (gmail)
On 19 Nov 2005 19:40:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:hi, does anyone know of a library that can query domain registry or any site that provide information to such an activity? as i want to build asimple domain name searching program for my own benefit.. thanks alot :D [TW]  

How to find the port a server is listening on (from within the server)

2005-11-25 Thread Tim Williams (gmail)
How can I find the port a server is listening on - at the commented line in the code below. (ie  self.serving_on_port_num =  ? ) I have googled a lot. :-( -- class BaseSrvr(SocketServer.ThreadingMixIn, SocketServer.TCPServer):  

Re: [Forged?] Re: How to find the port a server is listening on (from within the server)

2005-11-25 Thread Tim Williams (gmail)
On 26/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:    If I understand correctly, you're looking for the socket methodgetsockname(), documented at http://docs.python.org/lib/socket-objects.htmlJeff Many thanks Jeff, self.server.socket.getsockname() did the trick. -- -- http://mail.py

Re: Constructing RFC2822 Message

2005-12-05 Thread Tim Williams (gmail)
On 5 Dec 2005 06:27:44 -0800, Narendra <[EMAIL PROTECTED]> wrote: Hi All,This is narendra from india doing my engineering.i need to develop an E-mail client in python,which connects to my MTAon port 25 and sends email from there.I was able to do that but my e-mail is ending in bulk when i'm trying

Re: Validating an email address

2005-12-09 Thread Tim Williams (gmail)
On 09/12/05, Ben Finney <[EMAIL PROTECTED]> wrote: The only validation you should be doing before sending the message ison the domain part. Since there are records available in DNS toverify, you can check those. Is there an MX record? Is the addressvalid? Do the mappings both way for that record ma

Re: Using print with format to stdout generates unwanted space

2005-06-20 Thread Tim Williams (gmail)
On 6/20/05, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Paul Watson wrote: > > > While printf() does tightly control formatting in C, it does not in > > Python. > > There is no printf() in Python. You should not think of print as being a > Python version of printf. For quick and simple removal

Re: Python & firewall control (Win32)

2005-06-27 Thread Tim Williams (gmail)
On 6/17/05, Tim Williams <[EMAIL PROTECTED]> wrote: > > > - Original Message - > > From: "Tom Anderson" <[EMAIL PROTECTED]> > > > re: http://wipfw.sourceforge.net/?page=home > > Tom, this looks good. I had it downloaded, installed and running some > custom rules in under 5 minutes. V

Re: Plain text email?

2005-06-27 Thread Tim Williams (gmail)
On 27 Jun 2005 15:38:59 -0700, Inkiniteo <[EMAIL PROTECTED]> wrote: > Hi guys. I have a script that sends the info by email, but i'd like to > avoid the convertion to HTML by the email client or Gmail, because it > ruins all the formatting i did (with tabs, mostly). Briefing,

Re: Dictionary to tuple

2005-06-28 Thread Tim Williams (gmail)
On 28 Jun 2005 14:45:19 GMT, Odd-R. <[EMAIL PROTECTED]> wrote: > I have a dictionary, and I want to convert it to a tuple, > that is, I want each key - value pair in the dictionary > to be a tuple in a tuple. > > If this is the dictionary {1:'one',2:'two',3:'three'}, > then I want this to be the r

Re: POP3 and "seen" flag

2005-06-30 Thread Tim Williams (gmail)
> > > Hello All, > > Is there a way to know in a POP session of a message was seen (old) or not > (new)? > You have to keep a persistant local list of viewed messages , UID into a text file is often the simplest method. HTH :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-04 Thread Tim Williams (gmail)
On 7/4/05, Guy Lateur <[EMAIL PROTECTED]> wrote: > > Anything else I could try? Lateral thinking ? === untested === import imaplib, time, sys f = open(msg_file) r = f.readlines() f.close() msg1 = ''.join(r) server = 'my.exchangeserver.com' # or IP address user = 'user' pw = 'pw' M = imaplib.

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-05 Thread Tim Williams (gmail)
On 7/5/05, Guy Lateur <[EMAIL PROTECTED]> wrote: > Thanks for the suggestion, Tim. Unfortunately, I get a 'connection refused' > error on the line 'M = imaplib.IMAP4(server)'. It says "socket.error: > (10061, 'Connection refused')". I've tried both the external IP adress and > the internal one (10.

Re: Outlook COM: how to create a MailItem from a .msg file

2005-07-05 Thread Tim Williams (gmail)
On 7/5/05, Guy Lateur <[EMAIL PROTECTED]> wrote: > > I just tried this and it failed with IP addresses but not > > hostnames/machine names, try it again with the server name. :) > > Nope, same problem. I think TJG might be right, and our server probably > doesn't have IMAP running (yet). Could y

Date & time in a Zip File

2005-07-13 Thread Tim Williams (gmail)
Using zipfile.Zipfile How can I add a file to a zip file and keep its date and time correct? Currently the date/time change to the time the file was added to the zip.Zipinfo doesn't have a write method! Solutions other than zipfile are welcome, with snippets if possible :) ginmf in this ins

Re: open a mail and...

2005-07-15 Thread Tim Williams (gmail)
On 7/15/05, Alberto Vera <[EMAIL PROTECTED]> wrote: > > Hello > > Is it possible to open a mail and download its files attached in a hard-disk > using a python script? > > Regards > -- > http://mail.python.org/mailman/listinfo/python-list > yes, use the email module. >>> msg = email.message_from_

Re: dictionary that discards old items

2005-07-22 Thread Tim Williams (gmail)
On 7/21/05, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Will McGugan wrote: > > > I need a collection class that behaves like a dictionary but when it > > reaches 'n' items it discards the oldest item so that the length never > > goes above 'n'. (Its for caching search results) > > > > I have a v

Re: how to build email message with attachment?

2005-07-26 Thread Tim Williams (gmail)
On 7/26/05, praba kar <[EMAIL PROTECTED]> wrote: > Dear All, > >Can any one let me know? How to build > email in python? with some some examples. > > regards > Prabahar The email module is what you need. http://docs.python.org/lib/module-email.html hth :) -- http://mail.python.org/mail

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, Chris Dewin <[EMAIL PROTECTED]> wrote: > > s = smtplib.SMTP("server") > s.sendmail(fromaddress, toaddresess, msg) > > I know that in this instance, the toaddresses variable can be a variable > of type list. > > Suppose the list contains well over 100 emails. Would that create some >

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, Daniel Dittmar <[EMAIL PROTECTED]> wrote: > Chris Dewin wrote: > > Hi. I've been thinking about using smtplib to run a mailing list from my > > website. > > > > s = smtplib.SMTP("server") > > s.sendmail(fromaddress, toaddresess, msg) > > > > Not really an answer to your question, bu

Re: mailing from with python

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, M.N.A.Smadi <[EMAIL PROTECTED]> wrote: > hi; > if i want to send a mail message using the "mail" client on a machine > that has smtp protocol is there an easy way (i.e. like bash where you > would just type mail -s SUBJECT message RECIPIENT) to do it from a > python script? Any mail c

Re: information needed to make a connection between computers

2005-12-11 Thread Tim Williams (gmail)
On 11/12/05, John Walton <[EMAIL PROTECTED]> wrote:  Hello again! I'm still working on that instant messenger (for science fair), and I have been reading about networking in some Java tutorials. In one part of it, it said to have a connection with another computer, you need to know the IP name of t

Re: Displaying error message in a try except?

2005-12-11 Thread Tim Williams (gmail)
On 11/12/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote:> Fairly new to python.  In a try except how do you display the true> (raw) error message so it can be displayed back to the user? assuming that "true" means "the message you would get if you hadn'tused a try/except", the

Re: How to get the path of current running python script?

2005-12-20 Thread Tim Williams (gmail)
On 20/12/05, Kevin Yuan <[EMAIL PROTECTED]> wrote: I tried the following  getFilePath = lambda name: os.path.normpath('%s\\%s' % (sys.modules[name].prefix, sys.modules[name].__name__)) getFilePath('__main__') getFilePath =  sys.argv[0]    ?? :) -- http://mail.python.org/mailman/listinf

Re: checking if a string contains a number

2005-12-20 Thread Tim Williams (gmail)
On 20/12/05, Suresh Jeevanandam <[EMAIL PROTECTED]> wrote: Hi,I have a string like,s1 = '12e3's2 = 'junk'Now before converting these values to float, I want to check if theyare valid numbers.s1.isdigit returns False. Is there any other function which

Re: Queueing in Python (ala JMS)

2005-12-20 Thread Tim Williams (gmail)
On 20 Dec 2005 15:01:02 +0100, Stefan Arentz <[EMAIL PROTECTED]> wrote: Is there a JMS-like API available for Python? I would like toquickly receive messages through the network and then processthose slowly in the backgound. In the Java world I would simplycreate a (persistent) queue and tell the J

Re: coverting EST to PST

2005-12-21 Thread Tim Williams (gmail)
On 21 Dec 2005 03:15:47 -0800, Narendra < [EMAIL PROTECTED]> wrote: Hi All,i got a problem. I need to convert time from EST standard to PSTstandard.Thu, 15 Dec 2005 09:24:19 -0500 to PST Quick and dirty,   might not work for times at the end of DST >>> import time >>> from email import Utils >>>

Re: Parsing a date-time string?

2005-12-22 Thread Tim Williams (gmail)
On 21 Dec 2005 01:43:13 -0800, Tim N. van der Leeuw <[EMAIL PROTECTED]> wrote: Hi,I want to parse strings containing date-time, which look like thefollowing: "Mon Dec 19 11:06:12:333 CET 2005"[snipped]What I want to get is some sort of sortable date; either as a number or(if nothing else) as a str

Re: A simple list question.

2005-12-22 Thread Tim Williams (gmail)
On 22 Dec 2005 10:14:10 -0800, KraftDiner <[EMAIL PROTECTED]> wrote: Is there a cleaner way to implement this code?if len(self.listOfObjects) == 0:self.listOfObjects.append(self.currentObject)elif:  

Re: A simple list question.

2005-12-22 Thread Tim Williams (gmail)
On 22/12/05, Tim Williams (gmail) <[EMAIL PROTECTED]> wrote: On 22 Dec 2005 10:14:10 -0800, KraftDiner < [EMAIL PROTECTED]> wrote: Is there a cleaner way to implement this code?if len(self.listOfObjects) == 0:self.listOfOb

Re: File object question

2005-12-22 Thread Tim Williams (gmail)
On 22/12/05, S. D. Rose <[EMAIL PROTECTED]> wrote: Hello all.  If I read a binary file:file = open('c:\\logo.gif', 'rw'') # Read from FS as one way to get theobject, d/l from website another...file.read()is there anyway I can determine the 'size' of the object file? (Without going to the filesystem

Re: Windows and python execution

2005-12-26 Thread Tim Williams (gmail)
On 26/12/05, Mark Carter <[EMAIL PROTECTED]> wrote: What I would like to do it type something like > myscript.pyinstead of > python myscript.py Open an explorer window or open "My Computer" Click on TOOLS then FOLDER OPTIONS Select the "FILE TYPES tab and click on NEW Enter  PY as the file

Re: Modifying values in a list

2005-12-29 Thread Tim Williams (gmail)
On 29 Dec 2005 08:43:17 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:The following code:numbers = [1, 2, 3]for value in numbers: value *= 2print numbers Above,  you are modifying "value", not the item in the list >>> numbers = [1, 2, 3] >>> for x in range(len(numbers)): ...     num

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
On 30/12/05, rbt <[EMAIL PROTECTED]> wrote: What's a good way to write a dictionary out to a file so that it can beeasily read back into a dict later? I've used realines() to read textfiles into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to fil

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
On 30/12/05, Giovanni Bajo <[EMAIL PROTECTED]> wrote: >>> d = {'.\\sync_pics.py': 1135900993, '.\\file_history.txt': 1135900994, '.\\New Text Document.txt': 1135900552}>>> file("foo", "w").write(repr(d))>>> data = "" >>> data"{'.sync_pics.py': 1135900993, '.file_history.txt': 1135900994

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
A further thought, if you write the data to a file in the correct format, you can use import and reload to access the data later instead of repr. On 12/29/05, Tim Williams (gmail) <[EMAIL PROTECTED]> wrote: > On 30/12/05, Giovanni Bajo <[EMAIL PROTECTED]> wrote: &g

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
don't know how gmail-CE will format this!! Save your dict to a file with a .PY extension using outdata = 'mydict =' + repr(dict) # or somesuch similar dictfile.py --- mydict = {'key1':'a', 'key2':'b'} --

Re: reading files into dicts

2005-12-30 Thread Tim Williams (gmail)
On 30/12/05, Chris F.A. Johnson <[EMAIL PROTECTED]> wrote: On 2005-12-30, Tim Williams (gmail) wrote:> Apologies for the top post, it was my first attempt at using gmail's> pda-enabled web interface. There is no option to bottom post.Can you not move the cursor? Nope,  th

Re: compare dictionary values

2005-12-30 Thread Tim Williams (gmail)
In <[EMAIL PROTECTED]>, rbt wrote: > What's a good way to compare values in dictionaries? Do you need to compare dictionaries, if its an option it would be simpler/cheaper  to compare  each entry from your file listing with entries in a single dict and act accordingly, mainly because you will alrea

Re: compare dictionary values

2006-01-03 Thread Tim Williams (gmail)
On 30/12/05, rbt <[EMAIL PROTECTED]> wrote: What's a good way to compare values in dictionaries? I want to find[snip]My key-values pairs are filepaths and their modify times. I want toidentify files that have been updated or added since the script last ran. You don't need to store each file's upda

Re: smtplib error('Connection reset by peer')

2006-01-05 Thread Tim Williams (gmail)
On 4 Jan 2006 15:47:34 -0800, Van_Gogh <[EMAIL PROTECTED]> wrote: Hi,I am learning how to use the smtplib module, but am having some veryearly problems, maybe because I don't understand it.So, am I correct that by following the example in the Python: [snip]  When I try to create the server(the li

Re: python create mail

2006-01-12 Thread Tim Williams (gmail)
On 12 Jan 2006 04:28:44 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: hey I need help in sending email,It seems that while using  this set of commands from smtplib import SMTP s = SMTP() s.set_debuglevel(1) s.connect('outmail.huji.ac.il')I should be able to get a connection but what I get is

Re: how to improve this simple block of code

2006-01-12 Thread Tim Williams (gmail)
On 11/01/06, Mike Meyer <[EMAIL PROTECTED]> wrote: "py" <[EMAIL PROTECTED]> writes:> Say I have...> x = "132.00"> but I'd like to display it to be "132" ...dropping the trailing > zeros...I currently try this Is it likely that  x might not have any decimal places?    If so all the above solutions f

Re: How to remove subset from a file efficiently?

2006-01-12 Thread Tim Williams (gmail)
On 12 Jan 2006 09:04:21 -0800, fynali <[EMAIL PROTECTED]> wrote: Hi all,I have two files:  - PSP320.dat (quite a large list of mobile numbers),  - CBR319.dat (a subset of the above, a list of barred bumbers)# head PSP320.dat CBR319.dat ==> PSP320.dat <==96653696338  

Re: How to remove subset from a file efficiently?

2006-01-12 Thread Tim Williams (gmail)
On 12/01/06, Tim Williams (gmail) <[EMAIL PROTECTED]> wrote: On 12 Jan 2006 09:04:21 -0800, fynali < [EMAIL PROTECTED]> wrote: Hi all,I have two files:  - PSP320.dat (quite a large list of mobile numbers),  - CBR319.dat (a subset of the above, a list of barred bumber

Re: python create mail

2006-01-12 Thread Tim Williams (gmail)
on 1/12/06, Tim Williams (gmail) < [EMAIL PROTECTED]> wrote: On 12 Jan 2006 04:28:44 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: hey I need help in sending email,It seems that while using  this set of commands from smtplib import SMTPs = SMTP()s.set_debuglevel

Re: multiple email recipients

2006-02-20 Thread Tim Williams (gmail)
On 20 Feb 2006 01:01:38 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:hii currently am using this email function that can send single email address[SNIP]was wondering how to modify the code so as i can send to multiple emailrecipients using "TO"? thanks. You are making the common mistake of t

Re: multiple email recipients

2006-02-20 Thread Tim Williams (gmail)
On 20/02/06, Rene Pijlman <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED]:>was wondering how to modify the code so as i can send to multiple email >recipients using "TO"? thanks.You add RFC 2822 headers.http://www.ietf.org/rfc/rfc2822.txt("3.6.3. Destination address fields") RFC 2822 relates to the f

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread Tim Williams (gmail)
On 21 Feb 2006 08:00:03 -0800, Michele Simionato <[EMAIL PROTECTED]> wrote: For easy of use nothing beats CherryPy, but I am not sure how stable itis. If CherryPy is of interest then don't discount Karrigell,  it has a smaller learning curve and appears stable.   Overall I found it quicker to becom

Re: problem(s) with import from parent dir: "from ../brave.py import sir_robin"

2006-02-24 Thread Tim Williams (gmail)
On 24 Feb 2006 05:10:37 -0800, per9000 <[EMAIL PROTECTED]> wrote: SHORT VERSION:I tried three variants of "from ../brave.py import sir_robin", oneworks. I want to use it in a py-file to execute command-line-style andthat does not work.Can someone please give me, not a bucket with the desert(s) on t

Re: regular expresson for Unix and Dos Lineendings wanted

2006-02-24 Thread Tim Williams (gmail)
On 24/02/06, John Zenger <[EMAIL PROTECTED]> wrote: Franz Steinhaeusler wrote:>> Thank you all for the replies.> But I still don't have a solution.>re.sub(r"\s+[\n\r]+", lambda x: x.expand("\g<0>"). \ lstrip(" \t\f\v"),text).rstrip() But I think your code is a lot easier to read.  :) How about:

Re: string stripping issues

2006-03-03 Thread Tim Williams (gmail)
On 3 Mar 2006 00:20:21 -0800, P Boy <[EMAIL PROTECTED]> wrote: This seems like a web page parsing question. Another approach can be asfollows if you know the limiting token strings:a.split('SIZE=2>')[1].split('\r\n')[0] As others have mentioned , you really need a an HTML parser.   But the fo

Re: IMAP Folder Size Information

2006-03-20 Thread Tim Williams (gmail)
On 20/03/06, Kevin F <[EMAIL PROTECTED]> wrote: I'm trying to use the following code to get my remote server's foldersize information.  Unfortunately, i'm getting the error:Traceback (most recent call last):   File "/Life/School/Homework/Spring 2006/OPIM 399/Tutorial/IMAP/mailboxsize.py", line 23,

Re: IMAP Checking Folder Size

2006-03-20 Thread Tim Williams (gmail)
On 20/03/06, Kevin F <[EMAIL PROTECTED]> wrote: Traceback (most recent call last):   File "/Life/School/ Homework/Spring 2006/OPIM 399/Tutorial/IMAP/mailboxsize.py", line 23, in -toplevel- number_of_messages_all += int(number_of_messages[0])ValueError: invalid literal for int(): The requested

Re: Server.sendmail with no "to_addrs" parameter.

2006-03-22 Thread Tim Williams (gmail)
On 22 Mar 2006 03:18:41 -0800, EdWhyatt < [EMAIL PROTECTED]> wrote: Hi all, I have searched the group with no answer to this particularproblem.In my sendmail program, I would like to have the ability to send a mailmessage with no-one email address in the To field. I do this by adding the mail to th

Re: string.upto() and string.from()

2006-03-22 Thread Tim Williams (gmail)
On 22 Mar 2006 06:41:32 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I often need to re-code for myself a small code snippet to definestring.upto() and string.from(), which are used like : [snip] # if not found, return whole string> "hello, world !".upto("#") "hello, world !"> u"hello, wo

Re: string.upto() and string.from()

2006-03-22 Thread Tim Williams (gmail)
On 22/03/06, Tim Williams (gmail) <[EMAIL PROTECTED]> wrote: > if  u"h" in u"hello, world !" and u"hello, world !".from("h"): >  return " u"hello, world !" >else:   # not really required, used for demonstration only >

Re: Server.sendmail with no "to_addrs" parameter.

2006-03-22 Thread Tim Williams (gmail)
info/python-listPython will quite happily do this too.  The RFC issue is a red herring,  in practice there are very few SMTP servers that will refuse an email that is missing 1 or more of the required headers.  Whether the email passes spam filters is a different matter. For fun,  try this. (add you

Re: Uploading files from IE

2006-03-22 Thread Tim Williams (gmail)
On 22/03/06, AB <[EMAIL PROTECTED]> wrote: >> try something like this:> filename = os.path.basename(fullpathname) I tried the following with the same result:myName = ulImage.filenamenewFile = file (os.path.join(upload_dir, os.path.basename(myName)), 'wb')Any other ideas?  Seems like it shouldn't be

Re: raw_input (was "no subject")

2006-03-23 Thread Tim Williams (gmail)
On 23/03/06, cm012b5105 <[EMAIL PROTECTED]> wrote: Hi there i am hoping some one could help me out with a small problem i am in the process of learning python. I am trying to write an interactive programme, This is a short example. if s = raw_input ("hello what's your name? ") if

Re: raw_input

2006-03-23 Thread Tim Williams (gmail)
On 23/03/06, cm012b5105 <[EMAIL PROTECTED]> wrote:     if s = raw_input ("hello what's your name? ") if s=='carmel ': print "Ahh the boss's wife"  What i would like to know is what if she doesn't write carmel she rights say carm short of me writing if s=='carm': on a ne

Re: Receiving emails with attachments

2006-04-09 Thread Tim Williams (gmail)
On 8 Apr 2006 13:24:20 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: want to develop a script which will receive emails with attachmentsfrom my POP3 account, perform certain actions on it and email it back to someone else.However, I'm not familiar with any Python library which does it. Coul

Re: New Karrigel page in Wikipedia

2006-04-13 Thread Tim Williams (gmail)
On 13/04/06, Roel Schroeven < [EMAIL PROTECTED]> wrote: There's something I don't quite get regarding the Karrigell- andCherryPy-style frameworks. With PHP or mod_python I can put any numberof different applications in different directories on a web server, which is very convenient: [SNIP]How do

Re: New Karrigel page in Wikipedia

2006-04-13 Thread Tim Williams (gmail)
On 13/04/06, Roel Schroeven <[EMAIL PROTECTED]> wrote: Tim Williams (gmail) schreef:> Karrigell will happily run multiple karrigell "applications" on a single> server .  In your example simply by having different applications at > http://foo.example.com/app1 and http://

Re: New Karrigel page in Wikipedia

2006-04-13 Thread Tim Williams (gmail)
On 13/04/06, Tim Williams (gmail) <[EMAIL PROTECTED]> wrote: In Karrigell you could write the host mappings into a karrigell script (.ks) application, so you wouldn't  even need to use virtual-hosts in the config file.  and of course, you could just write a single ..ks  that contains (a

Re: Forms with multiple submit buttons vs 'form' objects with single 'submit' methods

2006-04-13 Thread Tim Williams (gmail)
On 13 Apr 2006 12:26:52 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:Hi all,  I'm using pywin to write a script that will commandeer internet explorer to go to a certain website, where it will navigate menus, postforms, and eventually retrieve certain data.  Here's my question:  Suppose a fo

Design philosophy of HTTPServer and BaseHTTPRequestHandler

2007-08-22 Thread tzuchien chiu gmail com
Hello, everyone. Several instances of a same script, which accepts parameters and does a lengthy job, are executed on a remote machine. I want to couple the script with a tiny HTTP server so that I can connect to the machine with a browser and monitor the progress of jobs. The HTTP server of each

debugging xmlrpc servers

2005-01-22 Thread alan dot ezust at gmail dot com
Problems with XMLRPC I have an xmlrpc server with a method called results() which returns an XML message. I've been able to use this function without problems when I had only one client talking to one server. I have recently introduced a P2P aspect to this process and now I have servers calling e

Re: debugging xmlrpc servers

2005-01-23 Thread alan dot ezust at gmail dot com
Understandable - i had difficulties understanding my problem too! I don't really understand why I got that error message before - I believe it was due to the fact that some other exception was being raised inside results(). Anyway, the solution was to call rpdb.set_trace() inside the actual metho

try / except not worknig correctly

2005-03-12 Thread '@'.join([..join(['fred', ';dixon']), ..join(['gmail', 'com'])])
the code below will not execute the except section when i enter a number. what am i missing ? # .while 1: . print 'Pump Protection ? ' . #line 133 .try: .myInput = raw_input('A B C D E F G H I J K L ? ') .myInput = string.upper(myInpu

Re: try / except not worknig correctly

2005-03-12 Thread '@'.join([..join(['fred', ';dixon']), ..join(['gmail', 'com'])])
1) the tutor list is really slow. but thanks. 2) Thanks Brain, i was missing the string bit. the code i posted (opps) was not exactly where i was having problems, it just looked like it. also thanks for the 'in' test, that will come in handy. i am using chain because i need to do something differ

help with getting selection from wxChoice with out after it has changed

2005-03-27 Thread '@'.join([..join(['fred', ';dixon']), ..join(['gmail', 'com'])])
I want to get the selection of several wxChoice boxes. But i do not want to have to catch the events for all the boxes I should be able to access the current selection outside of an event,but i am not seeing how to do this. This is a hack of the wxpython choice demo to demonstrate my question #-

Re: Cross platform distribution of standalone executable

2005-03-27 Thread '@'.join([..join(['fred', ';dixon']), ..join(['gmail', 'com'])])
don't count out py2exe, especially if your using pywin32's -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem in designing a global directory in python

2005-03-29 Thread '@'.join([..join(['fred', ';dixon']), ..join(['gmail', 'com'])])
noob warning: what is so wonderful about the NEW class over the old ? -- http://mail.python.org/mailman/listinfo/python-list

Decorator behavior

2011-07-22 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
I am just trying to wrap my head around decorators in Python, and I'm confused about some behavior I'm seeing. Run the code below (slightly adapted from a Bruce Eckel article), and I get the following output: inside myDecorator.__init__() inside aFunction() Finished decorating aFunction() inside

accessing parts of large files with File.seek()

2007-08-08 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
I'm having a problem with the File object's seek() method. Specifically, I cannot use it to seek to a location in a binary file that is greater than 2^31 (2147483648). This seems unnecessarily limiting, as it is common these days to have files larger than 2 GB. Is there some LargeFile object out

Re: accessing parts of large files with File.seek()

2007-08-08 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 8, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 8, 11:46 am, "mhearne808[insert-at-sign-here]gmail[insert-dot- > > > > here]com" <[EMAIL PROTECTED]> wrote: > > I'm having a problem with the File object'

fcntl problems

2007-08-30 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
I'm having a number of problems with the fcntl module. First off, my system info: Mac OS X Darwin igskcicglthearn.cr.usgs.gov 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 Python 2.5.1 (built from source) OK, the weirdness: First o

Re: fcntl problems

2007-08-30 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 30, 4:19 pm, "mhearne808[insert-at-sign-here]gmail[insert-dot- here]com" <[EMAIL PROTECTED]> wrote: > I'm having a number of problems with the fcntl module. First off, my > system info: > > Mac OS X > Darwin igskcicglthearn.cr.usgs.gov 8.10.1 Darwin Ke

Re: fcntl problems

2007-08-31 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 31, 12:23 am, Miles <[EMAIL PROTECTED]> wrote: > Sorry, that last quote-only reply was accidental. :) > > On 8/30/07, mhearne808 wrote: > > I've been doing some experiments, and here are some specific examples > > to try. > > [snipped examples] > > > From these last two experiments I can onl

Re: fcntl problems

2007-08-31 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 31, 8:42 am, Miles <[EMAIL PROTECTED]> wrote: > On 8/31/07, mhearne808 wrote: > > I have a script that will be run from a cron job once a minute. One > > of the things this script will do is open a file to stash some > > temporary results. I expect that this script will always finish its >

  1   2   >