Tail Call Optimization and Recursion are separate concepts!
--
Regards,
Casey
--
http://mail.python.org/mailman/listinfo/python-list
Hy every one. An amazing opportunity for all the people to buy and get
all the information related to the Laptops, Computer Systems,
registration for free trail and for rental basis. Effort less thing,
just make look over www.eazyrentals.com
--
http://mail.python.org/mailman/listinfo/python-lis
Thanks for the hint. I'll try to get cx_freeze to bundle up other
shared libraries it may not be bundling such as qtcanvas, qtext, qtui,
etc. and see if it works.
I'll post back the results to help other poor souls like me.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
just wanted to send a notice about a new portal/group for Slovenian
Python fans here :)
http://soup.zen.si (btw, it's in slovene lang)
Sebastjan
--
http://mail.python.org/mailman/listinfo/python-list
Alexander Schmolck <[EMAIL PROTECTED]> writes:
> I think that in most contexts lexical transparency is desirable so that
> deviations from lexical transparency ought to be well motivated. I also
> believe that a construct that is usually used to establish a lexically
> transparent binding shouldn'
Hi all,
Can any1 please guide me how to plot data from Excel by Matplotlib?
Let's say, I have 78(rows) x 8(cols) data in an Excel sheet. I would
like to plot data for all 78(rows) at 4th column against data for all
78(rows) at 7th column. How to plot it? Thank u!
--
http://mail.python.org/mailm
Hi,
I have now eventually finished my newbie-backup script and I'm very
proud of the way it functions...
Anyways, I am looking for an easy way to use smtplib to send an email
with the output log of the script to multiple accounts. I need to use
it with a smtp server, and cannot pipe it directly t
David Murmann a écrit :
> Hi all!
>
> i just had this crazy idea:
>
> instead of
>
> while cond():
>pass
>
> write
>
> while cond().
Yuck
> or
>
> try:
>import xyz
> except ImportError:
>pass
>
> compared to
>
> try:
>import xyz
> except ImportError.
Yuck again
> i don't
glomde a écrit :
> Tanks but that isn't what I am looking for.
> I really want a function that you can call and imports
> the module into the calling functions namespace.
Please read the documentation of the __import__() *function*. (notice
the double leading and ending underscores and the parent
I'm trying to set any of the dates (create, modification, access) of a
directory under windows with python.
I'm trying to do this as I'm trying to write a unittest for a directory
cleaning script I'm writing (ie I need the test to set the create/mod
time for some of the directories so that I can b
"ToddLMorgan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I'm trying to set any of the dates (create, modification, access) of a
> directory under windows with python.
>
> I'm trying to do this as I'm trying to write a unittest for a directory
> cleaning script I'm writing (ie I n
Proposal: Named RE variables
==
The problem I have is that I am writing a 'good-enough' verilog tag
extractor as a long regular expression (with the 'x' flag for
readability), and find myself both
1) Repeating sections of the RE, and
2) Wanting to add '(?P...) ' around sectio
DeepBlue wrote:
> Hi all,
>
> can any1 please tell me how to install pyTrix?
>
> thx!
The first step should be to get it, but how can it be got?
Claudio
--
http://mail.python.org/mailman/listinfo/python-list
Hi Guys,
I just wanted to post the error, and then also the coda that causes
itI get this no matter what I do to this, and I don't understand
it. Any help would be welcome. Thank you
Error
::
Traceback (most recent call last):
File "/home/merrigan/projects/Backup Script/hobbitarchive.py", l
Ken Tilton <[EMAIL PROTECTED]> writes:
> I think the point is that, with the variable actually being just
> a string and with dedicated new explicit functions required as
> "accessors", well, you could hack that up in any language with
> dictionaries. It is the beginnings of an interpreter, not Py
From the trace of a 2.3.5 software i got:
\'SystemError:
C:sfpythondist23srcObjectscellobject.c:22: bad
argument to internal
function\\n\']
from the middle of normal function / or its call. What is this?
There is:
http://mail.python.org/pipermail/python-list/2005-Janu
Alexander Schmolck <[EMAIL PROTECTED]> writes:
> I'd like to see a demonstration that using the same binding syntax
> for special and lexical variables buys you something apart from bugs.
There are 3 fundamental operations related to plain mutable variables:
A1. Making a new mutable variable wit
John,
Yep, different module. I'll watch the thread. Perhaps once you get
connected, we should make a mini-HOWTO for XP users while it's fresh in
your mind, because this question seems to come up a lot, and beginners
would probably appreciate a short howto that would perhaps detail how
to set up e
>> driv="bbdatabank"
Oops, sorry, I meant,
driv='DSN=bbdatabank'
rick
--
http://mail.python.org/mailman/listinfo/python-list
On 13/05/2006 7:39 PM, Paddy wrote:
[snip]
> Extension; named RE variables, with arguments
> ===
> In this, all group definitions in the body of the variable definition
> reference the literal contents of groups appearing after the variable
> name, (but within the va
Thanks very much for that roger :-)
I changed my code to
filehandle = win32file.CreateFile(file, win32file.GENERIC_WRITE,
win32file.FILE_SHARE_WRITE, None, win32con.OPEN_ALWAYS,
win32con.FILE_FLAG_BACKUP_SEMANTICS, None)
nowWin32=pywintypes.Time(theTime)
I now see that I can accomplish what I want using the Canvas widget,
instead of the
Text widget (I.e., I can create a window on it, delete the window, then
re add it without
recreating the underlying widget object).
As I don't want the raw contents user-editable, I guess its better to
use a Canvas
On 13 May 2006 03:13:33 -0700, Merrigan <[EMAIL PROTECTED]> wrote:
> ::
>
> Code
> ::
> def mailSender():
> openlogmsg = open(completelog, 'rb')
> mesg = MIMEText(openlogmsg.read())
> openlogmsg.close()
> mesg['Subject'] = subject
> mesg['From'] = fromaddy
>
Hi Fredrik
you brought up some terse and
somehow expressive lines with
their own beauty ...
> [this] is best done by a list comprehension:
>l = [m[1] for m in re.findall(r, t)]
>
> or, [...] a generator expression:
>g = (m[1] for m in re.findall(r, t))
>
> or
>process(m[1] for m in
Diez B. Roggisch wrote:
> Butternut squash wrote:
>
>> Is there any reason why there isn't any python library that makes
>> using soap as easy as how microsoft .net makes it.
>>
>> I mean I write rudimentary asmx files call them from a webbrowser.
>> The WSDL is generated and then there is docum
Replace:
mesg['To'] = recievelist
By:
mesg['To'] = ', '.join(recievelist)
--
http://mail.python.org/mailman/listinfo/python-list
Gross, Dorit (SDRN) wrote:
> [snip]
> for f in fileList:
> try:
> globvars = {'infile' : f}
> locvars = {}
> execfile('/scripts/second.py', globvars(), locvars)
> except IOError:
> exit(0)
> print locva
Hi. I have code that currently depends on a particular package of a
framework. I have decided I want to create my own package because I have
made many changes and it is getting too difficult to maintain each time
I retrieve an updated version of the framework from svn.
The problem is, that ther
"Thomas Bartkus" <[EMAIL PROTECTED]> wrote:
> "Grant Edwards" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> On 2006-05-08, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
>>
>> >> does python support true rations, which means that 1/3 is a
>> >> true one-third and not 0.3 roun
Le Samedi 13 Mai 2006 16:05, David Pratt a écrit :
> I'd appreciate hearing of what I can do in an __init__ file or what
> other strategy could make this work. Many thanks.
you should leave the original package intact and patch it with new mehod and
moddule; for example (A is the original package)
David Pratt wrote:
> Hi. I have code that currently depends on a particular package of a
> framework. I have decided I want to create my own package because I have
> made many changes and it is getting too difficult to maintain each time
> I retrieve an updated version of the framework from svn.
>
Well I managed to get rid of the undefined symbol message by copying
all qt libs to the freeze directory, the problem is that now the
package is huge (83MB)!
So my question is: is there a way to find out exactly which lib is
missing ?
Thanks
--
http://mail.python.org/mailman/listinfo/python-lis
Dear newsgroup,
I have written a cgi script in Python, and it has worked fine for some
time. Now the installed Python version has been upgraded to 2.4.1 and
I am having problems with non ascii characters.
The core of the problem I have is as follows:
1. The webpage contains a text field where
On 5/13/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
On Fri, 12 May 2006 21:00:49 -0400, John Salerno<[EMAIL PROTECTED]> declaimed the following in comp.lang.python:>> Latest development: I turned off my firewall and it worked. :)
Next step -- figure out what rule you need to define to
Peter Otten wrote:
>> I'd appreciate hearing of what I can do in an __init__ file or what
>> other strategy could make this work. Many thanks.
>
> I think fixing the imports is the better long-term approach. But putting
>
> from pkgutil import extend_path
> import mypackage
> __path__ = extend_p
Hi Peter. I'd like to fix the imports, but this would impact the
portability of portions of the code that currently work with the
existing package from the framework.
This solution does the trick and allows me to create the package I want
using a good amount of new material. I don't have to wor
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Proposal: Named RE variables
> ==
>
> The problem I have is that I am writing a 'good-enough' verilog tag
> extractor as a long regular expression (with the 'x' flag for
> readability), and find myself both
>
We're offering all the latest factory pressed high quality dvd movies,
ps2, psp and xbox silvers with factory printed colour inserts at
fantastic prices, whether for personal use or reselling. We're shipping
worldwide with various shipping methods. For resellers, please contact
us for bulk discount
Hi Peter. Thank you for this warning. I'll document this in the code. I
plan on importing only from dependentpackage for portability. Also, much
in the framework relies upon it. This approach is primarily for
maintenance purposes and would also allow me to package the modified
dependentpackage
Sebastjan Trepca wrote:
> Hi!
>
> just wanted to send a notice about a new portal/group for Slovenian
> Python fans here :)
>
> http://soup.zen.si (btw, it's in slovene lang)
But why is SOUP (Slovenski Ortodoksni Uporabniki Pythona)
used as an acronym?
Or is SOUP a word in Slovene also?
>
> S
Hi,
I'm trying to use PyX to draw some diagrams with text in. I want to
change the font, so need to change the text mode from TeX to LaTeX.
However I get an error when I do so:
pyx.text.TexResultError: unhandled TeX response (might be an error)
The expression passed to TeX was:
\documentclass{a
I have an informix database on a unix machine which I want to access. I
downloaded InformixDb-2.2 and managed to get it built and installed and it
works fine with python.
My problem is I want to access the same database from a PC remotely. Yes, I
already have informix setup and configured on the u
Heavy <[EMAIL PROTECTED]> wrote:
> Sorry,
> you got reason, I thought I can write in my language, cause this is the
> first time that I post a question in this group... My problem is that I
> have to receive parameters from a POST method, i try to read them from
> the socket 'rfile', but this acti
> I dont want the caller to call import but a function.
come again?
>>> type (__builtins__.__import__)
I didnt mean that __import__ isnt a function, but that I want to
make a function called ImoprtFile that actually does something
very similar that what __import__.
So to rephrsase the questi
Dennis Lee Bieber wrote:
> On Fri, 12 May 2006 21:00:49 -0400, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Latest development: I turned off my firewall and it worked. :)
>
> Next step -- figure out what rule you need to define to the firewall
> to pe
BartlebyScrivener wrote:
> John,
>
> Yep, different module. I'll watch the thread. Perhaps once you get
> connected, we should make a mini-HOWTO for XP users while it's fresh in
> your mind, because this question seems to come up a lot, and beginners
> would probably appreciate a short howto that
Merrigan wrote:
> mesg['To'] = recievelist
It's already been pointed out that this is a problem, but I just wanted
to mention also that 'recieve' is misspelled, in case that affects
anything, or others who might read/use the code.
--
http://mail.python.org/mailman/listinfo/python-list
>> But with the firewall off, everything
>> seems to work fine.
Whatever works. But I'm having trouble imagining how a firewall would
interfere with you accessing your own db on localhost.
--
http://mail.python.org/mailman/listinfo/python-list
Ok, now I think I know what I need to do.
I need to create a variable in the calling functions locals.
So how do I get access to the calles locals dictionary?
Is it possible?
--
http://mail.python.org/mailman/listinfo/python-list
robert wrote:
> From the trace of a 2.3.5 software i got:
>
> \'SystemError:
> C:sfpythondist23srcObjectscellobject.c:22: bad
> argument to internal
> function\\n\']
...
> Will there be another bug-fix release of Python 2.3 ?
No, is this still a problem in 2.4? 2.4.4 i
glomde wrote:
> I didnt mean that __import__ isnt a function, but that I want to
> make a function called ImoprtFile that actually does something
> very similar that what __import__.
>
> So to rephrsase the questin how does __import__ load a module
> into the callers namespace.
Ok got it now.
Flavio wrote:
> Well I managed to get rid of the undefined symbol message by copying
> all qt libs to the freeze directory, the problem is that now the
> package is huge (83MB)!
>
> So my question is: is there a way to find out exactly which lib is
> missing ?
You know, if you're doing this on Li
BartlebyScrivener wrote:
>>> But with the firewall off, everything
>>> seems to work fine.
>
> Whatever works. But I'm having trouble imagining how a firewall would
> interfere with you accessing your own db on localhost.
>
I don't know either. Something to do with the ports it's trying to use I
Around three weeks ago there was a thread about Python WebDAV servers,
and I mentioned my "PanDAV" work (old homepage:
http://ivoras.sharanet.org/projects/pandav.html). There was some
interest in continuing the development and merging patches made by its
users, so I requested a SourceForge proj
Ivan Voras wrote:
> Andrew MacIntyre wrote:
>
>> Comparative CPU & memory utilisation statistics, not to mention platform
>> and version of Python, would be useful hints...
>
> During benchmarking, all versions cause all CPU to be used, but Python
> version has ~1.5x more CPU time allocated to
glomde wrote:
> Ok, now I think I know what I need to do.
> I need to create a variable in the calling functions locals.
> So how do I get access to the calles locals dictionary?
> Is it possible?
If your import is used in the current namespace, just use the global
keyword.
Best is if your funct
On May 12, 2006, at 5:45 PM, DataSmash wrote:
> I need to unzip all zip file(s) in the current directory
> into their own subdirectories. The zip file name(s) always
> start with the string "usa" and end with ".zip".
> The code below will make the subdirectory, move the zip
> file into the subdi
Andrew MacIntyre wrote:
>> That's only because I need the .readline() function. In C, I'm using
>> fgets() (with the expectation that iostream will buffer data).
>
> The readline method of the file object lookalike returned by makefile
> implements all of the line splitting logic in Python code,
On Sat, 13 May 2006 14:09:19 -0400, The Shaffer s wrote
> I have an informix database on a unix machine which I want to
> access. I downloaded InformixDb-2.2 and managed to get it built and
> installed and it works fine with python.
>
> My problem is I want to access the same database from a PC
Hi,
I am working on project that has embedded python interpreter to run
user-specified python procedures. Those procedures might return any
iterable object with set of result data -- basically everything for which
iter() returns valid object (list, tuple, dict, iterator etc)
It works ok, e
http://daviderognoni.blogspot.com?locawapp
- MAIN NEWS
===
* add thread
* add "Request" object
* new "locawapp_main" function
* fixed files.py
* ...
http://daviderognoni.blogspot.com?locawapp
--
http://mail.python.org/mailman/listinfo/python-list
I know, but the whole point of cx_freeze is to generate standalone
executables, so asking for an installation of an specific version of Qt
is just a little better than asking the end user to install from
source...
--
http://mail.python.org/mailman/listinfo/python-list
Hi
the second argument in the functions below suppose to retain its value
between function calls, the first does, the second does not and I
would like to know why it doesn't? and how to make it so it does?
thanks
# it does
def f(a, L=[]):
L.append(a)
return L
print f('a')
print f('b')
I am trying to freeze an application which imports matplotlib. It all
works fine on the machine where it was frozen. The executable runs
without a glitch.
But when I move the directory containing the frozen executable and
other libs to a new machine, I get the following error:
Traceback (most re
Hello. I have recently been experimenting with cellular automata and I
would like to know how I could convert a 2d list of 0's and 1's into
white and black squares on an image. I have tried to install matplotlib
and also NumTut but both to no avail. There seem to be bugs in their
installation and I
[EMAIL PROTECTED] wrote:
> Hello. I have recently been experimenting with cellular automata and I
> would like to know how I could convert a 2d list of 0's and 1's into
> white and black squares on an image. I have tried to install matplotlib
> and also NumTut but both to no avail. There seem to be
Flavio wrote:
> ImportError: /home/flavio/freeze/qt.so: undefined symbol:
> _ZNK9QSGIStyle9classNameEv
> So my question is: is there a way to find out exactly which lib is
> missing ?
yes - find the one with that symbol. wash, rinse, repeat. ;)
--
Edward Elliott
UC Berkeley School of Law (Boa
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello. I have recently been experimenting with cellular automata and I
> would like to know how I could convert a 2d list of 0's and 1's into
> white and black squares on an image. I have tried to install matplotlib
> and also NumTut b
Hi.
I built a little installer on windows XP using distutils for my
package. In there i add a few files to the python script directory. I
would like one of these scripts to be the default program to be used by
files with a given extention (e.g. i have an image viewer and would
like it to be used w
newbie reply, but how do i go about doing that? thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Good evening,
I need to generate checksums of a file, store the value in a variable,
and pass it along for later comparison.
The MD5 module would seem to do the trick but I'm sketchy on implementation.
The nearest I can see would be
import md5
m=md5.new()
contents = open(self.file_name,"rb").
Andrew Robert wrote:
> m=md5.new()
> contents = open(self.file_name,"rb").read()
> check=md5.update(contents)
>
> However this does not appear to be actually returning the checksum.
the docs are your friend, use them. hint: first you eat, then you...
http://docs.python.org/lib/module-md5.html
Actually, I think I got it but would like to confirm this looks right.
import md5
checksum = md5.new()
mfn = open(self.file_name, 'r')
for line in mfn.readlines():
checksum.update(line)
mfn.close()
cs = checksum.hexdigest()
print
In article <[EMAIL PROTECTED]>,
Andrew Robert <[EMAIL PROTECTED]> wrote:
> Good evening,
>
> I need to generate checksums of a file, store the value in a variable,
> and pass it along for later comparison.
>
> The MD5 module would seem to do the trick but I'm sketchy on implementation.
>
>
>
Roy Smith wrote:
>>
>> However this does not appear to be actually returning the checksum.
>>
>> Does anyone have insight into where I am going wrong?
>
> After calling update(), you need to call digest(). Update() only updates
> the internal state of the md5 state machine; digest() returns the
I'm trying to use some of the agg functions in MySQLdb (avg, min, max),
but they're just not working as I would expect. They all return the
value 1 when executed as part of Python scripts, but work as expected
when used in mysql 4.1. Does anyone have any experience using Python
with MySQLdb? Qu
Hi,
PyTrix can be obtained from http://www.american.edu/econ/pytrix/pytrix.htm
cheers!
Claudio Grondi wrote:
> DeepBlue wrote:
>> Hi all,
>>
>> can any1 please tell me how to install pyTrix?
>>
>> thx!
> The first step should be to get it, but how can it be got?
>
> Claudio
--
http://mail.pyt
Flavio wrote:
> Well I managed to get rid of the undefined symbol message by copying
> all qt libs to the freeze directory, the problem is that now the
> package is huge (83MB)!
>
> So my question is: is there a way to find out exactly which lib is
> missing ?
I haven't done that myself, but I've
Flavio wrote:
> I am trying to freeze an application which imports matplotlib. It all
> works fine on the machine where it was frozen. The executable runs
> without a glitch.
>
> But when I move the directory containing the frozen executable and
> other libs to a new machine, I get the following er
Dennis Lee Bieber wrote:
> On Sat, 13 May 2006 14:49:06 -0400, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Yeah, that's actually what I'm trying to do now. I'm not sure how to
>> define it, but I assume it has something to do with 3306, since that's
>> th
Just wondering if this will ever happen, maybe in 3.0 when print becomes
a function too? It would be a nice option to have it available without
importing it every time, but maybe making it a builtin violates some
kind of pythonic ideal?
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I am looping through a directory and appending all the files in one
huge file, the codes below should give the same end results but are
not, I don't understand why the first code is not doing it.
thanks
combined = open(outputFile, 'wb')
for name in flist:
if os.path.isdir(file): continu
Gary Wessle wrote:
> Hi
>
> the second argument in the functions below suppose to retain its value
> between function calls, the first does, the second does not and I
> would like to know why it doesn't? and how to make it so it does?
>
> thanks
>
> # it does
> def f(a, L=[]):
> L.append(a)
>
Still new. I am trying to make a simple word count script.
I found this in the great Python Cookbook, which allows me to process
every word in a file. But how do I use it to count the items generated?
def words_of_file(thefilepath, line_to_words=str.split):
the_file = open(thefilepath)
fo
Gary Wessle wrote:
> I am looping through a directory and appending all the files in one
> huge file, the codes below should give the same end results but are
> not, I don't understand why the first code is not doing it.
>
> combined = open(outputFile, 'wb')
> for name in flist:
> if os.path.
Gary Wessle wrote:
> I am looping through a directory and appending all the files in one
> huge file, the codes below should give the same end results but are
> not, I don't understand why the first code is not doing it.
another bit of friendly advice (for others as well): learn to use pdb before
1 random.shuffle(letters)
2 trans_letters = ''.join(letters)[:len(original_set)]
3 trans_table = string.maketrans(original_set, trans_letters)
So what I'd like to do is have lines 1 and 2 run once, then I want to do
some comparison between original_set and trans_letters before running
line 3. If
BartlebyScrivener <[EMAIL PROTECTED]> wrote:
> Still new. I am trying to make a simple word count script.
>
> I found this in the great Python Cookbook, which allows me to process
> every word in a file. But how do I use it to count the items generated?
>
> def words_of_file(thefilepath, line_to
BartlebyScrivener wrote:
> Still new. I am trying to make a simple word count script.
>
> I found this in the great Python Cookbook, which allows me to process
> every word in a file. But how do I use it to count the items generated?
>
> def words_of_file(thefilepath, line_to_words=str.split):
>
Thanks! And thanks for the Cookbook.
rd
"There is no abstract art. You must always start with something.
Afterward you can remove all traces of reality."--Pablo Picasso
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> 1 random.shuffle(letters)
> 2 trans_letters = ''.join(letters)[:len(original_set)]
> 3 trans_table = string.maketrans(original_set, trans_letters)
>
> So what I'd like to do is have lines 1 and 2 run once, then I want to do
> some comparison between original_set and trans_let
"George Sakkis" <[EMAIL PROTECTED]> writes:
> As clunky as it seems, I don't think you can beat it in terms of
> brevity; if you care about memory efficiency though, here's what I use:
>
> def length(iterable):
> try: return len(iterable)
> except:
> i = 0
> for x in iterab
92 matches
Mail list logo