does anyone know how to attach an excel file to send out using smtplib
and MIME?
--
http://mail.python.org/mailman/listinfo/python-list
I V wrote:
> Kun wrote:
>> mail currently gets the body from an input box.
>>
>> this is where mail.py gets invoked:
>
> OK, I'm a bit confused. Where is the "initial python program" in all
> this? You seem to have an one python program (mail.py) and an HTML
> form. As it stands, I don't see why y
hi
i was looking at this :
http://www.python.org/doc/essays/comparisons.html
on comparisons of python and other languages? are there any updates to
this doc? or is there
other reliable source for such comparison elsewhere? thanks
--
http://mail.python.org/mailman/listinfo/python-list
Kun wrote:
> mail currently gets the body from an input box.
>
> this is where mail.py gets invoked:
OK, I'm a bit confused. Where is the "initial python program" in all
this? You seem to have an one python program (mail.py) and an HTML
form. As it stands, I don't see why you can't change mail.py
I V wrote:
> Kun wrote:
>> This works fine but instead of typing in a 'body', i would like the
>> initial python program to just send a string as the body of the email.
>> now normally i'd just set the msg in the mail.py file equal to the
>> string, however, i do not know how to link a string from
Hi,
Can I use locale to format monetary values? If yes, how? If no, is there
something I can use?
E.g.,
I have 1 and I want to get "$10,000".
Thanks,
Ray
--
http://mail.python.org/mailman/listinfo/python-list
Kun wrote:
> This works fine but instead of typing in a 'body', i would like the
> initial python program to just send a string as the body of the email.
> now normally i'd just set the msg in the mail.py file equal to the
> string, however, i do not know how to link a string from another python
>
Aahz <[EMAIL PROTECTED]> wrote:
...
> >Example: I use usually a very simple classes. When I add "(object)" to
> >my class definitions, the code continues to works fine -- plus I have
> >new features to use. Why this cannot be done automatically? What could
> >be broken in the old code if it was
Kun wrote:
> I have a python-cgi form whose sole purpose is to email.
>
> It has the fields 'to', 'from', 'subject', 'body', etc. and if the user
> fills them out and clicks submit, it will invoke another file called
> mail.py which uses smtplib to send the message.
>
> This works fine but inst
I have a python-cgi form whose sole purpose is to email.
It has the fields 'to', 'from', 'subject', 'body', etc. and if the user
fills them out and clicks submit, it will invoke another file called
mail.py which uses smtplib to send the message.
This works fine but instead of typing in a 'body'
Hi All,
I've done a bunch of searching in google and in python's help, but,
I haven't found any function to decode a string like:
Refresh! (ihenvyr)
In to plain english.
I'd also looked for the urldecode function in urllib, but that had been
deprecated.
If anyone here can give me a hand, I'd aprish
In article <[EMAIL PROTECTED]>,
Petr Prikryl <[EMAIL PROTECTED]> wrote:
>"Aahz" wrote...
>> Bruno Desthuilliers wrote:
>>>Aahz a écrit :
Classic classes are *NOT* deprecated.
>>>
>>>Perhaps not *officially* yet...
>>
>> Not even unofficially. The point at which we have deprecation is whe
"Serge Orlov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> bwaha wrote:
> > Thanks for the suggestion, but I definitely have only one version
installed.
> > In fact I uninstalled it and installed an earlier version (2.5.5.1) to
see
> > if it was specifically wxPython related. No c
Felipe Almeida Lessa wrote:
> Em Dom, 2006-04-16 às 19:22 -0400, Kun escreveu:
>> i have a form
>
> Which kind of form? Which toolkit?
>
>> which takes in inputs for a mysql query. one of the inputs
>> is 'date'. normally, a user has to manually enter a date,
>
> Enter the date in which kind
"fyleow" <[EMAIL PROTECTED]> writes:
> I'm a student/hobbyist programmer interested in creating a web project.
I'm a student too and I've done a little Python web related stuff long ago.
> It's nothing too complicated, I would like to get data from an RSS
> feed and store that into a database.
Brian Elmegaard <[EMAIL PROTECTED]> writes:
> I don't it includes every possible module, e.g., py2exe, ctypes,
> mysqldb, wxpython...
Right but since Python doesn't have a full-integrated central packaging
(despite the ongoing Pypi project and Eby's efforts in setuptools) you have to
do it manual
Jos Vos wrote:
>
> The problem is that the server initialization *requires* a server
> address (host, port pair), but I don't see how to tell it to use
> the stdin socket (and I'm afraid this is not possible, but I'm not
> sure).
>
If I understood it correctly you want the python server bind be
If anyone wants a little dose of what Python can do in a week, PyWeek
is done. All these games were written in one week; there's some real
impressive ones. No homemade C extensions, either.
http://www.pyweek.org/2/
My entry (Army of Aerojockey) didn't do so well, unfortunately. Well,
I was aim
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 16 Apr 2006 01:37:44 -0400, Terry Reedy wrote:
>> Do you really need the items sorted? I strongly suspect that a set
>> would
>> work better. Much easier to randomly add, delete, and check membership.
>
> T
For DTD's: have you stumbled across:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/220472
?
Jim
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 16 Apr 2006 17:04:21 -0500,
Richard Marsden <[EMAIL PROTECTED]> wrote:
> Aahz wrote:
>> Then may I suggest that you subscribe to the tutor list? That will
>> give you a good place to ask questions; as you learn Python,
>> answering other people's questions will give you a good way to hon
Em Dom, 2006-04-16 às 19:22 -0400, Kun escreveu:
> i have a form
Which kind of form? Which toolkit?
> which takes in inputs for a mysql query. one of the inputs
> is 'date'. normally, a user has to manually enter a date,
Enter the date in which kind of control?
> but i am
> wondering if th
i have a form which takes in inputs for a mysql query. one of the inputs
is 'date'. normally, a user has to manually enter a date, but i am
wondering if there is a way to create a button which would automatically
insert today's date in the date form field if the user chooses to use
today's dat
In article <[EMAIL PROTECTED]>,
"Aleksandar Cikota" <[EMAIL PROTECTED]> wrote:
>How to check this every 10 sec, but that the CPU is free?
Or better still, why not set a notification on the directory, so you're
woken up every time something happens to it?
Look up the inotify mechanism, which wa
In article <[EMAIL PROTECTED]>,
Carl <[EMAIL PROTECTED]> wrote:
>My major problem with Matlab is not the language; it is a quite nice
>language, comparable to Python and R.
Having done a bunch of MATLAB GUI programming for a client a few years
ago, I would not agree that MATLAB is a "nice" lang
On Sun, Apr 16, 2006 at 10:13:19PM +0200, Martin P. Hellwig wrote:
> Isn't this just a standard daemon functionality?
What is "a standard daemon"? :-)
> So if you could wrap up your program in a daemon like fashion (e.g.
> http://homepage.hispeed.ch/py430/python/daemon.py) and then point the
>
On 17/04/2006 12:22 AM, fatal.serpent top-posted:
> There was an extra space before ready.
Space? Strange. Both Google groups & my newsreader display it as 8
spaces. I could have sworn it was a tab.
--
http://mail.python.org/mailman/listinfo/python-list
On 17/04/2006 5:13 AM, John Zenger top-posted:
> Yup, join is better. The problem with using form.values() is that it
> will break if the HTML changes and adds some sort of new field that this
> function does not care about, or if an attacker introduces bogus fields
> into his query.
If one is
Aahz wrote:
> Then may I suggest that you subscribe to the tutor list? That will give
> you a good place to ask questions; as you learn Python, answering other
> people's questions will give you a good way to hone your own knowledge.
Which is? :-)
Richard (who might also be interested - in t
Thank you, Scott. I'm still learning my exceptions (obviously, or I
wouldn't get stuck in a while loop ;).
That was instructive. On my machine, it is Ctrl + Break that does it.
Ctrl + C doesn't do anything.
What I should really do is figure out roughly how many times the while
loop should run, an
Jos Vos wrote:
> Hi,
>
> I'm trying to figure out how to implement a XML-RPC server that
> is called by xinetd i.s.o. listening on a TCP socket itself.
>
> I already have implemented a stand-alone XML-RPC server using
> SimpleXMLRPCServer, but I now want something similar, that is
> started via x
Am Sonntag 16 April 2006 19:11 schrieb Michael Sperlle:
> The only other thing I can think of is making it non-readable for anyone
> except root, but have the feeling that's not too secure.
Huh? If you don't trust your operating system to correctly validate
file-permissions for you (on a server,
Tim Hochberg wrote:
> Tim Hochberg wrote:
>> I don't think that's correct. I think that with a suitably designed
>> HtmlDocument object, the following should be possible:
>>
>> with HtmlDocument("Title") as doc:
>> with doc.element("body"):
>>doc.text("before first h1")
>>with
Kun wrote:
> I currently have a python-cgi script that extracts data from a mysql
> table. I would like to save this data as a string and send it to a
> recipient via email.
>
> I know how to send email using the smtp lib, but what I do not know his
> how to save a portion of the page as a str
Yup, join is better. The problem with using form.values() is that it
will break if the HTML changes and adds some sort of new field that this
function does not care about, or if an attacker introduces bogus fields
into his query.
John Machin wrote:
> On 16/04/2006 1:43 PM, John Zenger wrote:
>
zweistein wrote:
> Try CTRL + C. If it doesn't work, CTRL + Pause/Break should also work
> (if you're running it from the CLI).
>
> HTH
>
Note: this will raise a KeyboardInterrupt exception, which you might
inadvertently be catching. If you have been lazy and written:
try:
ex
Thank you, both. I'll put in on a sticky!
rick
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>
>I asked about training/certification because its proved to be a good
>way for me to learn in the past.
>
>My aim is not to gain recognition but more to measure my understanding
>- a sort of benchmark. I have been so far unable to find a
Hi folks,
I have a need to validate XML files against both DTDs and XML Schema from
the command line.
In an ideal world, I'd be able to do something like:
$ python validate.py foo.xml
which would then parse and validate foo.xml using the schema or DTD
referenced within it.
What I'm looking f
On Sun, 16 Apr 2006 08:11:12 -0700, Paul Rubin wrote:
> Michael Sperlle <[EMAIL PROTECTED]> writes:
>> If I could create a large file that could be encrypted, and maybe add
>> files to it by appending them and putting in some kind of delimiter
>> between files, maybe a homemade version of truecryp
Hi,
Thanks for the response.
I currently work as a Java developer but I have lots of interest in
Python.
I asked about training/certification because its proved to be a good
way for me to learn in the past.
My aim is not to gain recognition but more to measure my understanding
- a sort of bench
domain for sale: internetdotcoms.com
http://www.afternic.com/name.php?id=11866440
--
http://mail.python.org/mailman/listinfo/python-list
I still dont quite get it, is their sum kind of way you can [def Newdef
+ i()] for example so that the def is different from the string, all
the buttons now have numbers on
If I am not mistaken Fredrik Lundh rote the tutorial Learning to
program (Python) www.freenetpages.co.uk/hp/alan.gauld/ and
Michael Sperlle <[EMAIL PROTECTED]> wrote:
> Is it possible? Bestcrypt can supposedly be set up on linux, but it seems
> to need changes to the kernel before it can be installed, and I have no
> intention of going through whatever hell that would cause.
>
> If I could create a large file that coul
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>
>Are there any certifications that are available for developers learning
>Python? Where?
>
>I'm specifically looking for distance/on-line courses or certifications
>but welcome any information available.
Question is, what do you want it
>>[EMAIL PROTECTED] cd ~tim/WebStack-1.1.2
>>[EMAIL PROTECTED] python2.3 setup.py install
>>running install
>>error: invalid Python installation: unable to open
>>/usr/lib/python2.3/config/Makefile (No such file or directory)
>
> apt-get install python2.3-dev
Worked like a charm, and the WebStac
Michael Sperlle <[EMAIL PROTECTED]> writes:
> If I could create a large file that could be encrypted, and maybe add
> files to it by appending them and putting in some kind of delimiter
> between files, maybe a homemade version of truecrypt could be constructed.
> Any idea what it would take?
If b
"Jay" wrote:
> I wold like to be able to generate buttons from a list in a file.
> How would I go about making each button have a different command,
> Lets say make the button print its label instead of print "."
>
> The problem I have is I don't know what the list is going to be until
> it is ope
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems
to need changes to the kernel before it can be installed, and I have no
intention of going through whatever hell that would cause.
If I could create a large file that could be encrypted, and maybe add
files to it by appendin
http://www.hemalhemsat.com/main/auctiondetail/437717/diger/mezarlariniza_muhendis_eli_degsin.php
--
http://mail.python.org/mailman/listinfo/python-list
I wold like to be able to generate buttons from a list in a file.
How would I go about making each button have a different command,
Lets say make the button print its label instead of print "."
The problem I have is I don't know what the list is going to be until
it is opened or how big so I carne
I've been a Matlab user for years and have recently started using
Python with matplotlib and NumPy for most of my work. The only thing I
found that is still lacking is a 3D capability in matplotlib. I was
trying to visualize a hill climbing algorithm and I couldn't find
anything comparable to Mat
There was an extra space before ready. It works otherwise. Use the code
below or just remove the space.
Heres the fixed code:
ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
if ready == "y":
print "You are Ready"
else:
print "Try again"
Ralph H. Stoos Jr. wrote:
> All
On Sun, 16 Apr 2006 12:16:39 +0200, Fredrik Lundh wrote:
> Steven D'Aprano wrote:
>
>> So, let me say firstly that I wish the following code to be put into
>> the public domain
>
> so you're taking the work by others ("for m in x", "print m", and so on)
> and think that by posting it to usenet a
u do it like this:
from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")
xlApp.Workbooks.Open("D:\python\sortme.csv")
xlApp.Range("A1:C100").Sort(Key1=xlApp.Range("B1"), Order1=2)
xlApp.ActiveWorkbook.Close(SaveChanges=1)
xlApp.Quit()
del xlApp
--
http://mail.python.org/mail
On Sun, 16 Apr 2006 19:05:50 +0800, Fulvio wrote:
> On Sunday 16 April 2006 13:37, Terry Reedy wrote:
>>Do you really need the items sorted?
>
> Do you really think he isn't a troll?
[scratches head]
The OP looks like a beginner trying to experiment with Python as a way of
learning how to progr
On Sun, 16 Apr 2006 01:37:44 -0400, Terry Reedy wrote:
>
> "Miguel E." <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi,
>>
>> I've been (self) studying Python for the past two months and I have had
>> no background in OOP whatsoever.
>>
>> I was able to write an interactive p
Hi,
Are there any certifications that are available for developers learning
Python? Where?
I'm specifically looking for distance/on-line courses or certifications
but welcome any information available.
Thanks
Chris
--
http://mail.python.org/mailman/listinfo/python-list
?
i really liked it
-tomer
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> Rob Williscroft wrote:
>> I don't know wether this has been suggested or not, but what about def:
>>
>> def namespace ns:
>> x = 1
>>
>> def type blah(object):
>> pass
>>
>> def property x:
>> def get():
>> return ns.x
>
> I think that's probably a bad idea
BartlebyScrivener wrote:
> Running Python on Win XP.
>
> When running commands with the interpreter, if you get stuck in a while
> loop, is there a keyboard command to break out of it?
>
> Or is the only way out a triple-finger salute and End Task?
>
> rd
ctrl+c
or ctrl+c+enter
--
http://ma
Pyrex 0.9.4 is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
Highlights of this version:
No more lvalue casts
I have redesigned the code generator to eliminate the need
for lvalue casting. This means that Pyrex-generated code
should now be gcc4-compatib
>You can do this with a regular expression...
I tried the plain RE approach and found it no faster than my
direct-coded version. Anyone have any ideas on how to code this problem
elegantly without RE? My code is long and cumbersome - 200 lines! Speed
is my primary concern but low LOC would be nice
On Sunday 16 April 2006 13:37, Terry Reedy wrote:
>Do you really need the items sorted?
Do you really think he isn't a troll?
See the latest thread on lists end related PEP.
However there's always some good info on your reply (all of those had reply to
OP).
F
--
http://mail.python.org/mail
bwaha wrote:
> Thanks for the suggestion, but I definitely have only one version installed.
> In fact I uninstalled it and installed an earlier version (2.5.5.1) to see
> if it was specifically wxPython related. No change.
Then why don't you try to print what is passed to SetValue in the exe,
just
Fredrik Lundh wrote:
> Steven D'Aprano wrote:
>
>>So, let me say firstly that I wish the following code to be put into
>>the public domain
>
> so you're taking the work by others ("for m in x", "print m", and so on)
> and think that by posting it to usenet as if you wrote it yourself, you
> can r
Kelvie Wong wrote:
> I have a suspicion it is the collaborative effort that is the problem
> here -- I try to use Python whenever possible for
> engineering/numerical analysis, but the established industry standard
> (for most disciplines of engineering) is still MATLAB.
>
> Although Python is ar
Steven D'Aprano wrote:
> So, let me say firstly that I wish the following code to be put into
> the public domain
so you're taking the work by others ("for m in x", "print m", and so on)
and think that by posting it to usenet as if you wrote it yourself, you
can release it into the public domain
"BartlebyScrivener" <[EMAIL PROTECTED]> writes:
> Are you saying you're on Windows?
Yes
> http://www.activestate.com/Products/ActivePython/
> It's a one-click, msi install with everything you need for win32,
> including IDE etc.
I don't it includes every possible module, e.g., py2exe, ctypes,
m
Hello,
Does anyone knows how to use the Excel sort function in python?
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Does anyone knows how can I
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Does anyone knows how can I
--
http://mail.python.org/mailman/listinfo/python-list
"Serge Orlov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> bwaha wrote:
> > First time trying to create an executable with py2exe. I have a small
> > program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'),
> > matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7'
Tim Chase escribió:
>
> [EMAIL PROTECTED] cd ~tim/WebStack-1.1.2
> [EMAIL PROTECTED] python2.3 setup.py install
> running install
> error: invalid Python installation: unable to open
> /usr/lib/python2.3/config/Makefile (No such file or directory)
>
apt-get install python2.3-dev
HTH
--
http
Try CTRL + C. If it doesn't work, CTRL + Pause/Break should also work
(if you're running it from the CLI).
HTH
--
http://mail.python.org/mailman/listinfo/python-list
Kun wrote:
> [EMAIL PROTECTED] wrote:
>> Kun wrote:
>>> I am trying to make an if-statement that will not do anything and print
>>> 'nothing entered' if there is nothing entered in a form. I have the
>>> following code that does that, however, now even if I enter something
>>
>> Yes, but did you
> Hi all,
>
> Does a async sleep exist?
> How to check this every 10 sec, but that the CPU is free?
I would use a separate thread for this, perhaps even a completely
detached daemon. You might want to check the docs for threading:
http://docs.python.org/lib/module-threading.html
and these recipe
Steven D'Aprano wrote:
> I came across an interesting (as in the Chinese curse) problem today. I
> had to modify a piece of code using generator expressions written with
> Python 2.4 in mind to run under version 2.3, but I wanted the code to
> continue to use the generator expression if possible.
[
Hi,
Newbie question about unittest. I am having trouble passing a variable
to a test class object.
MyCase class will potentially have many test functions.
Any help would be much appreciated.
Thanks,
P
# File MyCase.py
import unittest
class MyCase(unittest.TestCase):
def __init__(self, val
Running Python on Win XP.
When running commands with the interpreter, if you get stuck in a while
loop, is there a keyboard command to break out of it?
Or is the only way out a triple-finger salute and End Task?
rd
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>, Steven
D'Aprano wrote:
> for obj in Array:
> if isinstance(obj, list):
> for item in obj:
> print item
> else:
> print obj
I would "reverse" that check and test `obj` for not being a string::
for obj in Array:
if not isinstance(ob
On 16/04/2006 1:43 PM, John Zenger wrote:
>
> The other thing I'd recommend is stick that long list of fields in a
> list, and then do operations on that list:
>
> fields = ['delete_id', 'delete_date', 'delete_purchasetype',
> 'delete_price', 'delete_comment']
>
> then to see if all those fiel
82 matches
Mail list logo