Should work fine as far as I can see. Of course, thats not very
'pythonic' - I should probably give at least 10 different unit tests
that it passes ;)
Its gratifying to know I'm not the only one who needed that final
yield.
Jim Sizelove wrote:
> Bengt Richter wrote:
> > On Tue, 10 May 2005 15:14:
[Dan Bishop]
| flamesrock wrote:
| > Hi,
| >
| > Short, maybe newbish question: Is there a python method for finding
| out
| > who the current user is in the OS module?
| >
| > On older windows machines the directory I'm interested in is just
| > "c://my documents", but how do I walk to the current
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
>Thomas Bellman wrote:
>> Fixed-with characters *do* have advantages, even in the external
>> representation. With fixed-with characters you don't have to
>> parse the entire file or stream in order to read the Nth character;
>
Hi!
I'm currently writing a script which launches external programs, but it
keeps leaving zombie/defunct processes behind, until I kill the
launching script, which is a bit of a pain, as it's supposed to be a
daemon. The code I'm using is:
newPid = subprocess.Popen( cmdLine[ 1: ], executable=
Jim Sizelove wrote:
Wow! c.l.py is allmost like an AI program generator. But I guess it
helps to ask questions about problems that programmers find interresting :-)
The "linear" approach is pretty simple to code and understand. I am just
afraid what happens when many users tries to book that 1
For efficient string concatenation in python look at:
http://www.skymind.com/~ocrow/python_string
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm having some problems serving binary data in a simple CGI-script.
I'm setting content-type ( "application/octet-stream" ), content-length
and Content-disposition and I think these are correct, but the size of
the served file/data is different than the source. The read and write
the data I'm
I am reasonably new to programming in Python. [Using LINUX]
Up until now I have been using GUI widgets supplied by 'Tkinter' but
starting to realise that Tkinter have limited widgets.
I have been given the lead that I should look at other sources for GUI
widgets - namely TCL.
I have just done a
On Tue, 10 May 2005 18:11:27 -0700, gene.tani wrote:
> hmm, there's lots of ways, huh? you can use itertools.zip instead of
> builtin zip, or do:
>
> map(None, list1, list2)
Not!
One should try a possible solution first,
>>> l1 = range(10)
>>> l2 = range(10,20)
>>> l1
[0, 1, 2, 3, 4, 5, 6, 7, 8
I am not sure what the right syntax is here. So please help me out (started 2
days ago).
I have a list of about 20 files that I want to read line by line into a 2D
list. So the first dimension will be each file, and the second every line in
that file.
I tried to do something like this:
f
Thomas W wrote:
> print d
Hi,
use sys.stdout.write instead, print is adding linebreaks ...
HtH, Roland
--
http://mail.python.org/mailman/listinfo/python-list
Roger Binns wrote:
>>I am not very interested on C compatibility.
>
>
> That will rule out all the gui frameworks, SSL, cryptography
> and numerous other packages. Have a look at what happened to
> Prothon. What ultimately killed it was the problem of having
> a decent library. You don't have
Paul Rubin wrote:
>
> I hope that PyPy will replace CPython once it's solid enough. Trying
> to stay backwards compatible with the legacy C API doesn't seem to me
> to be that important a goal. Redoing the library may take more work
> than the Prothon guy was willing to do for Prothon, but PyPy
Daniel,
Why don't you just use the 'sftp' command line program, it's available
for all unixes and I bet you can find a build for windows to? Then you
could just do an os.system(..) and be done with it.
Cheers!
Lars
--
http://mail.python.org/mailman/listinfo/python-list
Øyvind Østlund wrote:
> I have a list of about 20 files that I want to read line by
> line into a 2D list. So the first dimension will be each file,
> and the second every line in that file.
>
> I tried to do something like this:
>
> files_and_lines = [][]
> filenumber = 0
>
> for
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Klaus Alexander
Seistrup
Sent: Wednesday, May 11, 2005 12:14 PM
To: python-list@python.org
Subject: Re: Reading files into a 2D list.
Øyvind Østlund wrote:
> I have a list of about 20 files that I want t
Dear All,
I have doubt regarding mail sending smtplib
module. The below code is I used to send a mail.
##
import email.Message
import email.Utils
import mimetypes
import os,string
fromAddr="[EMAIL PROTECTED]"
toAddr=
["[EMAIL PROTECTED]","[EMAIL PR
"ncf" <[EMAIL PROTECTED]> wrote:
> The two issues I am having in grasping all of this are as follows:
> 1) Being new to Python, terms like mutable and immutable. Although I
> have probably dealt with them in other languages, the terms by
> themselves are a little confusing, but managable overall, s
Hello,
I've one problem using the csv module.
The code:
self.reader = csv.reader(f, delimiter = ",")
works perfectly. But when I use a variable for delimiter:
self.reader = csv.reader(f, delimiter = Adelimiter)
I get the traceback:
File "/home/florian/visualizer/ConfigReader.
In article <[EMAIL PROTECTED]>,
Fernando Perez <[EMAIL PROTECTED]> wrote:
>ohms377 wrote:
>
>> Dear python users,
>>
>> In interactive mode, I was wondering if there is a way to list all
>> declared variables and functions (and from global workspace).
>
>In [1]: def foo(): pass
> ...:
>
>In [2]
In article <[EMAIL PROTECTED]>,
Peter Moscatt <[EMAIL PROTECTED]> wrote:
>I am reasonably new to programming in Python. [Using LINUX]
>
>Up until now I have been using GUI widgets supplied by 'Tkinter' but
>starting to realise that Tkinter have limited widgets.
>
>I have been given the lead that I
[Florian]
> I've one problem using the csv module.
> The code:
>
> self.reader = csv.reader(f, delimiter = ",")
>
> works perfectly. But when I use a variable for delimiter:
>
> self.reader = csv.reader(f, delimiter = Adelimiter)
>
> I get the traceback:
>
>
> File "/home/fl
Hi all,
I'm trying to work around my cgi-driving-IE problem by creating my own
server, but CGIHTTPServer on Windows (python 2.3.5) seems to be having
troubles. Trying to run a "hello world" CGI gives me:
COMPAQ.ANTIQUES - - [11/May/2005 07:18:50] "GET /cgi-bin/hello.py
HTTP/1.1" 200
-
COMPAQ.ANT
Richie Hindle wrote:
>
> [Florian]
>> I've one problem using the csv module.
>> The code:
>>
>> self.reader = csv.reader(f, delimiter = ",")
>>
>> works perfectly. But when I use a variable for delimiter:
>>
>> self.reader = csv.reader(f, delimiter = Adelimiter)
>>
>> I get th
[Florian]
> You mean that csv.reader can't work with unicode as the delimiter parameter?
Exactly. http://www.python.org/doc/2.3.5/lib/module-csv.html says:
"Note: This version of the csv module doesn't support Unicode input. Also,
there are currently some issues regarding ASCII NUL characters.
On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote:
> Hallöchen!
>
> Fernando Perez <[EMAIL PROTECTED]> writes:
>
> > [...]
> >
> > And I'd also second the matplotlib suggestion, to which I've by
> > now fully switched after years of faithful gnuplot usage.
> > Matplotlib is very good, has an
Richie Hindle wrote:
>
> [Florian]
>> You mean that csv.reader can't work with unicode as the delimiter
>> parameter?
>
> Exactly. http://www.python.org/doc/2.3.5/lib/module-csv.html says:
>
> "Note: This version of the csv module doesn't support Unicode input. Also,
> there are currently some
HallÃchen!
Bill Mill <[EMAIL PROTECTED]> writes:
> On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>> Fernando Perez <[EMAIL PROTECTED]> writes:
>>
>>> [...]
>>>
>>> [...] Matplotlib is very good, has an active development
>>> community, and it is designed from the ground up not only a
Hello all, I'm trying hard to make possible to print some simple text from
python to the default printer using wxPython, after days of internet
searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but
is impossible to use this script even if I do exactly as said there. I think
th
Yeah... I once spent ages going round in circles trying to track that
down. A happy way to spend an evening...
Regards,
Fuzzy
http://www.voidspace.org.uk/python
--
http://mail.python.org/mailman/listinfo/python-list
[Florian]
> How can I convert Unicode to ASCII?
You're writing code using Unicode and you don't know how to convert it
ASCII? You need to do some reading. Here are a few links - Google can
provide many more:
http://docs.python.org/tut/node5.html#SECTION00513
http://diveinto
Michael> I was wanting to write a program that lets two machines
Michael> communicate (without user intervention) using XML-RPC over a
Michael> Jabber network. Does anyone know of an existing library suited
Michael> to that task?
Googling for "Jabber XML-RPC Python" yielded this a
While I've never used it, there *is* a Tix module in Python which
appears to wrap the widgets provided by Tix. In Fedora Core 2, Python
doesn't seem to be configured to use Tix OOTB but a one-liner (that
should be harmless elsewhere) does make it work.
These classes are defined in the Tix module:
If I replace the open builtin eg
import main
__main__.__builtins__.open=None
Is there any way, from here on, to access the original open function??
Extending this slightly, lets say I put a reference to the original
open function inside a class called Isolate and protect this reference
using __g
On 11 May 2005 05:20:28 -0700, [EMAIL PROTECTED] wrote:
>If I replace the open builtin eg
>
>import main
>__main__.__builtins__.open=None
>
>Is there any way, from here on, to access the original open function??
>
>Extending this slightly, lets say I put a reference to the original
>open function i
>> You mean that csv.reader can't work with unicode as the delimiter
>> parameter?
Richie> Exactly
Richie> "Note: This version of the csv module doesn't support Unicode
Richie> input
Richie> That note is still there in the current development docs, so it
Rich
Hi I have a question about writing a portable setup.py script for distutils.
I have a directory structure like this.
FreeImage/
|--Source/
||-- FreeImage.h
|
|--Dist/
||--FreeImage.li
Can anyone recommend a Python interactive shell for use in presentations?
Ideal characteristics (priority order):
o configurable font size
o full screen mode
o readline support
o syntax coloring
I've tried ipython but, since it runs inside a console window, and the
console window has a limited n
[Brian Quinlan]
|
| Can anyone recommend a Python interactive shell for use in
| presentations?
|
| Ideal characteristics (priority order):
| o configurable font size
| o full screen mode
| o readline support
| o syntax coloring
|
| I've tried ipython but, since it runs inside a console
| wind
Sorry, should maybe have used __import__ as an example.
Let's say I grab import, store the reference within the Isolate class
and then redirect the builtin import to a function in the Isolate class
which only allows certain modules to be imported -eg not sys. Would
this be secure?
--
http://mai
Hello,
Well, I'm fairly new to Python and have encountered a strange error
while reading an XML document in Python. I used the SAX parser, and my input XML
is fairly large with 30 records. I extract about 25 fields from each record
and spit out a csv file. The strange thing is that af
The pythonic way of programming requires, as far as I know, to spread a
big application in plenty of more manageable scripts, using import or
from ... import to connect the various modules.
In some cases there is a further complication: module importing through
an indirect mechanism, like: exec "fr
Robert Kern wrote:
> Peter Hansen wrote:
>
>> Back to Paul's question then: why use an unreliable and
>> probably-useless-for-all-but-spawning-lengthy-but-educational-threads
>> encryption method when there are relatively reliable and, uh, less
>> discussed and non-edifying, uh... well, you get
On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote:
> Hallöchen!
>
> Bill Mill <[EMAIL PROTECTED]> writes:
>
> > On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote:
> >
> >> Fernando Perez <[EMAIL PROTECTED]> writes:
> >>
> >>> [...]
> >>>
> >>> [...] Matplotlib is very good, has an active
> Hello all, I'm trying hard to make possible to print some simple text
from
> python to the default printer using wxPython, after days of internet
> searches I found this page:
http://wiki.wxpython.org/index.cgi/Printing but
> is impossible to use this script even if I do exactly as said there.
I
On 11 May 2005 05:56:04 -0700, [EMAIL PROTECTED] wrote:
>Sorry, should maybe have used __import__ as an example.
>Let's say I grab import, store the reference within the Isolate class
>and then redirect the builtin import to a function in the Isolate class
>which only allows certain modules to be i
On Wed, 11 May 2005 13:55:38 +0100, Tim Golden <[EMAIL PROTECTED]> wrote:
>[Brian Quinlan]
>|
>| Can anyone recommend a Python interactive shell for use in
>| presentations?
>|
>| Ideal characteristics (priority order):
>| o configurable font size
>| o full screen mode
>| o readline support
>| o sy
Have a look at Putty's pscp and PySCP...
http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://py.vaults.ca/apyllo.py/990075885.195097684.69935243
Rick
Lars wrote:
> Daniel,
>
> Why don't you just use the 'sftp' command line program, it's available
> for all unixes and I bet you can find a
Peter Hansen wrote:
>>Education is a process one must engage in. You don't just step in it.
>
> The education to which I was referring was that which _most_ of us just
> received by reading Paul's and your replies, not from anything in the
> OP's postings. ;-)
Okay, I'll buy that. :-)
--
R
[Jp Calderone]
|
| [Tim Golden ]
|
| >[Brian Quinlan]
| >|
| >| Can anyone recommend a Python interactive shell for use in
| >| presentations?
|
| > I Googled and came across this:
| >
| >http://codespeak.net/py/current/doc/execnet.html
| >
| >which might get you started.
| >
|
| execnet lets y
Ironically enough - the decompyle module will not compile on my
machine. I am using Python 2.2 and MSVC7 (i.e. .NET). However it tells
me there is an undefined external as follows:
"marshal_22_for_20.obj : error LNK2001: unresolved external symbol
initdecompyle/marshal_20"
I am writing code for P
Bill Mill wrote:
> Tha's cool, I saw what you wrote. First off, I wasn't sure what you
> meant by "hardcopy", so I thought I'd let you know that matplotlib has
> PS output. Second, the page I linked to talks about all the font-type
> features of matplotlib, which I thought might interest you. Havi
Hi all,
When trying to automate IE thru win32com (using PAMIE), I'm getting
this message out
C:\Program Files\Plone
2\Python\lib\site-packages\win32com\client\dynamic.py:463
: FutureWarning: %u/%o/%x/%X of negative int will return a signed
string in Pyth
on 2.4 and up
debug_attr_print("Getting
> "Brian" == Brian Quinlan <[EMAIL PROTECTED]> writes:
Brian> Can anyone recommend a Python interactive shell for use in
Brian> presentations?
Brian> I've tried ipython but, since it runs inside a console
Brian> window, and the console window has a limited number of
Brian>
Roy Smith wrote:
> The most common immutable objects you'll see are strings and tuples, and
> the main reason they're immutable is to allow them to be dict keys.
And ints. Strings, tuples and ints are the *three* most common
immutable objects you'll see...
-Peter
--
http://mail.python.org/mai
I had a quick look at the python source code and fileobject.c is one of
the core classes which, I would imagine, is why a reference can be
obtained. The other classes (method, dictionaries etc) don't look so
much of a liability. I'll maybe try disabling the fopen calls in
fileobject and see if it
Swaroop C H wrote:
> Is there a Python equivalent of Perl's IPC::Run module [
> http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ?
I don't know Perl, and don't plan to read all of that page you
referenced, but judging from the subject line and the half-sentence
description near the top of th
Few observations.
1) Don't concatenate pathnames yourself use os.path.join, that
makes your code portable.
lexi_file = open(os.path.join(sys.path[0],"lexi",files), "r")
2) Start with an empty list and append your "lines" lists:
files_and_lines=[]
filenumber = 0
for files in file_names:
fpa
Hi Mario,
> Something like SendPrinter("some text\n")?
If you are doing this just for yourself, and you know you have a
printer that will really print just the plain text when you send it
plain text (like a dot matrix printer from the early 90s) then you can
probably open the printer device and
Mario,
Here is a function stripped from a working program that uses printpreview
from wxWindows to print out cells from a grid that the user is working
on. Hopefully this can point you in the proper direction.
Regards,
Larry Bates
def DO_printpreview(self, event):
if self._trace:
[EMAIL PROTECTED] wrote:
> I am writing code for Poser 6 (which has not as yet updated to the
> latest Python) and have just lost a substantial chunk of code - part of
> which being an algorithm I have been tweaking for a couple of weeks
> now. As such, getting even part of the PYC to decompile wou
[EMAIL PROTECTED] wrote:
> I had a quick look at the python source code and fileobject.c is one of
> the core classes which, I would imagine, is why a reference can be
> obtained. The other classes (method, dictionaries etc) don't look so
> much of a liability. I'll maybe try disabling the fopen
Thanks a lot. That works great. I can't belive how close I was in the end.
Well that was the last lines of this application, so thanks a lot.
And thanks for the tip about the portability stuff. I can't belive I didn't
think about that. Been writing to much in non portable languages and libs lik
Ville Vainio wrote:
> Hmm, do you consider the fonts in a console window unreadable?
In fullscreen mode, yes (you get no choice of font size in Windows XP).
In Windowed mode you still only get a limited font selection (only two
fonts and only a few type sizes [most of which are small]).
> I've
Dear All,
Is it possible to send a message as a mail
with out smtplib module? If you find out any module
for mail sending(without smtplib) kindly mail me.
regards
Prabahar
Yahoo! India Matrimony: Find your life
On 2005-05-11, Roy Smith <[EMAIL PROTECTED]> wrote:
> The most common immutable objects you'll see are strings and tuples,
And integers. They're immutable, aren't they? At least the
small ones. And floats.
--
Grant Edwards grante Yow! .. bleakness
On 2005-05-11, Peter Hansen <[EMAIL PROTECTED]> wrote:
>> The most common immutable objects you'll see are strings and
>> tuples, and the main reason they're immutable is to allow them
>> to be dict keys.
>
> And ints. Strings, tuples and ints are the *three* most
> common immutable objects you'l
Hi,
I need to do a plot of data that is beeing acuired. For that the plot
needs to be updated after aquiering a new tuple.
At the moment I allways do this after a new tuple is aqcuired:
plot(ar[0,i-1:i],br[1,i-1:i],'ro')
show()
#ar is arrays were the new tuple is put in po
HallÃchen!
Robert Kern <[EMAIL PROTECTED]> writes:
> [...]
>
> A pslatex backend certainly would be interesting. A Gnuplot
> backend would probably not be feasible. Does it expose its raw
> drawing operations?
Probably not raw enough, but I don't know how basic matplotlib
wants it to be. You co
Reminder:
We will *NOT* be meeting the *SECOND* Thursday (this week, May 12).
Our May meeting will be the *THIRD* Thursday, May 19. This will be our
first meeting at Google, with Alex Martelli's presention on design
patterns. More details soon!
--
Aahz ([EMAIL PROTECTED]) <*>
praba kar wrote:
>Dear All,
>
> Is it possible to send a message as a mail
>with out smtplib module? If you find out any module
>for mail sending(without smtplib) kindly mail me.
>
>regards
>Prabahar
>
>
>
>Yahoo! In
-- Forwarded message --
From: James Carroll <[EMAIL PROTECTED]>
Date: May 11, 2005 10:43 AM
Subject: Re: Interactive shell for demonstration purposes
To: Brian Quinlan <[EMAIL PROTECTED]>
I would personally try looking at the PyCrust.py that's included with
wxPython. It has a sta
Jan> After that i call sleep(5) until I can acuire the next tuple.
Jan> But during that I can't use the zoom/pan, save etc in the window.
...
Jan> Is there any better way to do this easily?
Set a timeout. How to do that depends on what gui tools you are using.
I've never used p
On Mon, 2 May 2005 23:11:54 +0530, rumours say that km
<[EMAIL PROTECTED]> might have written:
>Hi all,
>
>This was posted long ago.
>I tried to compress a mp3 file but i couldnt get the keycode+".out" file
>which is of size 1 bit. instead it is printed to STDOUT. i am usng python 2.4
>. i unde
On Thu, 28 Apr 2005 23:53:02 +0200, rumours say that "Martin v. Löwis"
<[EMAIL PROTECTED]> might have written:
>In theory, Python should look at sys.stdin.encoding when processing
>the interactive source. In practice, various Python releases ignore
>sys.stdin.encoding, and just assume it is Latin-
On Tue, 26 Apr 2005 00:35:59 GMT, rumours say that Jorey Bump
<[EMAIL PROTECTED]> might have written:
>"Lad" <[EMAIL PROTECTED]> wrote in news:1114254894.512656.297040
>@l41g2000cwc.googlegroups.com:
>
>> Is anyone capable of providing Python advantages over PHP if there are
>> any?
>As you lear
Thanks to everyone for your assistance. I shall reread this a couple
times and then try to make something that works.
Many thanks and have a GREAT day.
-Wes
--
http://mail.python.org/mailman/listinfo/python-list
praba kar <[EMAIL PROTECTED]> wrote:
>Here I want to avoid this line "Received: from unknown
>(HELO prabahar.enmail.com) (59.92.13.47) by
>mailserver with SMTP; 11 May 2005 10:09:11 - " How
>can I do this? . Why python give this line? . Mail
>sending Module in php will not give this type
- Original Message -
From: "John Abel" <[EMAIL PROTECTED]>
> praba kar wrote:
>
> >Dear All,
> >
> > Is it possible to send a message as a mail
> >with out smtplib module? If you find out any module
> >for mail sending(without smtplib) kindly mail me.
> >
> >regards
> >Prabahar
In article <[EMAIL PROTECTED]>,
Roger Binns <[EMAIL PROTECTED]> wrote:
>> could You tell us a bit more about Your motivation to create an
>> alternative C-Python interpreter?
>
>I'd also be curious to know if the performance gains would remain
>once it gets fleshed out with things like closures, lo
praba kar <[EMAIL PROTECTED]> wrote:
>Here I want to avoid this line "Received: from unknown
>(HELO prabahar.enmail.com) (59.92.13.47) by
>mailserver with SMTP; 11 May 2005 10:09:11 - " How
>can I do this? . Why python give this line? . Mail
>sending Module in php will not give this type
Ville Vainio wrote:
>>"Paul" == Paul McNett <[EMAIL PROTECTED]> writes:
>
>
> Paul> Only, I couldn't hear what they said back to me because I
> Paul> don't have UDP port 6000 open on my firewall and forwarding
> Paul> to my laptop (and don't want to do that either).
>
> Paul>
On Sunday 08 May 2005 06:29 pm, James Stroud wrote:
> If "__call__" allows anobject() and "__getitem__" allows anobject[arange],
> why
> not have "__brace__" (or some other, better name) for anobject{something}.
> Such braces might be useful for cross-sectioning nested data structures:
[...]
> T
Thank you Andy for your answer.
I tried by using '1.2.1c1' and '1.2.1c2', but with no success:
---
creating build/temp.linux-i686-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386
-mcpu=i686 - D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c
_mysql.c -o build/
http://hypershrink.com/SinnersPrayer << I saw this website on a search
directory. Great Resource!
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I started using the nice Pythonwin IDE together with Python 2.3 (I have
come to prefer its editor to IDLE).
My problem is, that when I want to run a script in the debugger, I can
give the script name and arguments, but I can't tell it in which
directory it should run.
I googled this gr
Hello comp.lang.py,
Can you help me with ideas for the following (somewhat newbie) OO
design question in Python? Note, I'm using psuedo-code, not actual
Python for the examples!
Background:
---
I need to represent a small variety of mathematical constructs
symbolically using Python classe
On Wednesday 11 May 2005 08:43 am, Peter Hansen wrote:
> Roy Smith wrote:
> > The most common immutable objects you'll see are strings and tuples, and
> > the main reason they're immutable is to allow them to be dict keys.
>
> And ints. Strings, tuples and ints are the *three* most common
> imm
WM_TAKE_FOCUS does not work on WinXP ??
I was sure I had used that on win before.
Works on Linux.
I have a function I need to run when the window
gets the focus. How do you do that in Tkinter
on Win32?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
"stasz" wrote:
> > hmm, there's lots of ways, huh? you can use itertools.zip instead of
> > builtin zip, or do:
> >
> > map(None, list1, list2)
>
> Not!
huh?
> One should try a possible solution first,
> >>> l1 = range(10)
> >>> l2 = range(10,20)
> >>> l1
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> >>>
Sorry, didn't mean to pester Jp
I have checked the archives, Rexec copies __builtins__, causing the del
__builtins__ issue. I'm modifying the lowest level__builtins__.
I am also using __getAttribute__ and __setAttr__, I could find no
mention of security holes on the lists.
Let me re-state the qu
The Great 'praba kar' uttered these words on 5/11/2005 10:06 AM:
> Dear All,
>
> Is it possible to send a message as a mail
> with out smtplib module? If you find out any module
> for mail sending(without smtplib) kindly mail me.
>
> regards
> Prabahar
twistedmatrix.com, Twisted Mail
Hi all, I hope you have time to help me out a little. My problem is that I
want to combine some python code I have made with some html templates, I
found a tutorial at dev shed:
http://devshed.spunge.org/Server_Side/Python/CGI/page6.html
and : http://devshed.spunge.org/Server_Side/Python/CGI/pag
z
--
http://mail.python.org/mailman/listinfo/python-list
I am experimenting with ezPyCrypto
( http://www.freenet.org.nz/ezPyCrypto/ ).
Having difficulty making the key portable (ie put in a file). I don't
get an error message, I just recover a message string that is empty
instead of one that contains my message.
The code is below with a few extra prin
[EMAIL PROTECTED] wrote:
> Now suppose I set "expression2 = Sum([a,-a])" and Sum.simplify()
> recognises that the two terms cancel and the Sum has value 0.
>
> Can I make "expression2.simplify()" transform expression2 from an
> instance of Sum to an instance of Number(0) **in place**? Is that
> po
I'm creating an app that relies on a configuration file at launch. The file
will always exist in the app's installation directory, but I have no control
over where that might be.
Is there an OS-independent way that I can instruct the app to look in it's
home directory for startup files? Right
In article <[EMAIL PROTECTED]>,
Paul McNett <[EMAIL PROTECTED]> wrote:
>Ville Vainio wrote:
>>
>> FWIW, In Finland all home *DSL and Cable internet connections (that I
>> know of) are connected "directly" to the internet (in the sense that
>> all ports are open). Blocking is reserved for the modem
Grant Edwards wrote:
> Yes. All arguments are passed by reference. This must be in
> the FAQ somewhere...
hopefully not, because that saying that "all arguments are passed
by reference" is extremely confusing for people who've learned about
"call by reference" in school.
as has discussed many
The following script demonstrates a method that should work for you. I
believe it is entirely cross-platform.
#! /usr/bin/python
import sys
import os
print os.path.abspath(os.path.dirname(sys.argv[0]))
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 247 matches
Mail list logo