I'm curious why this code isn't working how I expect it to:
import sys
d=3
def func1(a,b,c):
print a,b,c,d
print sys.path
exec "func1(1,2,3)" in {'func1':func1}
returns:
1 2 3 3
[ sys.path stuff ]
Since I'm telling exec to operate only within the context of the
dictionary I gi
On 2/20/07, Tim Mitchell <[EMAIL PROTECTED]> wrote:
> Hi Greg,
>
> Decorators would work fine if the the class you were working with was
> _yours_ (ie. you wrote it), the problem here is that string.Template is
> someone else's class that you're trying to modify.
>
> Here's how a decorator would wo
Need some decorator help.
I have a class. And I want to add behavior to one of this class's
methods to be run before the class runs the actual method. Is this
what decorators are for?
So the class I want to work with is string.Template
Let's say I have this:
from string import Template
a=Templ
I didn't realize Python behaved like this. Is there an FAQ I can read on this?
FILE module1.py:
VAR1='HI'
FILE MAIN.py:
from module1 import *
import module1
print VAR1
print module1.VAR1
VAR1='bye'
print VAR1
print module1.VAR1
And the results are:
>>> HI
HI
bye
HI
It seems to use module1.V
On 12/24/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Gregory Piñero" <[EMAIL PROTECTED]> wrote:
...
> open( filename[,flag='c'[,protocol=None[,writeback=False[,binary=None)
>
> Open a persistent dictionary. The filename specified is the bas
On 12/23/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> have you looked at putting the data into a persistent dict?
>
> - Hendrik
>
What is that exactly?
-Greg
--
http://mail.python.org/mailman/listinfo/python-list
On 22 Dec 2006 20:02:31 -0800, Carl Banks <[EMAIL PROTECTED]> wrote:
...
> There is much room for improvement. For example, can requests come in
> fast enough to spawn another load_data before the first had ended? You
> should consider trying to acquire a threading.Lock in load_data and
> waiting
Hi Python Experts,
I hope I can explain this right. I'll try.
Background:
I have a module that I leave running in a server role. It has a
module which has data in it that can change. So every nth time a
function in the server gets called, I want to reload the module so it
has the freshest data
On 11/17/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> The default configuration for WinXP is 2GB shared OS, and 2GB
> process... I believe there is some registry setting that can change that
> to 1GB/3GB.
I did some research and it looks like it does apply to XP
(http://support.micro
On 11/16/06, Thinker <[EMAIL PROTECTED]> wrote:
> What is your OS? Maybe you should show out the memory usage of your python
> process. In FreeBSD, you should set evironment variable
> 'MALLOC_OPTIONS=P' to
> print out usage of malloc()。Maybe you can find a way, in your system,
> to print out usage
On 11/16/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> what are you guys talking about? there are no artificial memory
> limitations in Python; a Python process simply uses all the memory it
> can get from the operating system.
I wish I could easily reproduce one of these errors I'm thinking of.
On 11/16/06, Bugra Cakir <[EMAIL PROTECTED]> wrote:
> Hi my name is Bugra Cakir,
>
> I have a question. How can we increase heap memory or total memory Python
> interpreter
> will use in order to avoid memory problems ?
I've wondered the same thing myself. Even if it turns out it's just
not possi
On 11/8/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> I want to be able to randomly change pixels in an image and view the
> results. I can use whatever format of image makes this easiest, e.g.,
> gray scale, bit tonal, etc.
>
> Ideally I'd like to keep the pixels in a
image as
needed.
I'm hoping someone has some experience on this and could offer some
advice or code. I thought it would be easy in PIL but I'm not sure.
Much Appreciated,
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.pyt
Thanks for all the answers everyone. It's finally starting to come
together for me. Bruno, I tried reading some tutorials but perhaps I
made the content out to be more complicated than it really was and got
confused.
So my final question is if WSGI will work on any web hosting company
that suppo
So I keep hearing more and more about this WSGI stuff, and honestly I
still don't understand what it is exactly and how it differs from CGI
in the fundamentals (Trying to research this on the web now)
What I'm most confused about is how it affects me. I've been writing
small CGI programs in Pytho
Thanks guys, putting it twice is all it took!
--
http://mail.python.org/mailman/listinfo/python-list
e "", line 1, in ?
TypeError: not enough arguments for format string
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
On 9/30/06, Steve Holden <[EMAIL PROTECTED]> wrote:
> As usual, by adding an additional name after the exception specification:
>
> try:
> self.gses = opener.open(req)
> except (urllib2.HTTPError,urllib2.URLError), exdata:
> do something with exdata ...
>
How can I catch 2 exceptions at once for example:
try:
self.gses = opener.open(req)
except (urllib2.HTTPError,urllib2.URLError):
do something..
Seems to work, but how do I also get information about the error?
--
Gregory Piñero
Chief Innovation Officer
Thanks guys, and now the world knows:
http://www.answermysearches.com/index.php/super-easy-way-to-reverse-a-string-in-python/188/
Well my 3 blog readers or the world ... not sure.
-Greg
--
http://mail.python.org/mailman/listinfo/python-list
On 9/23/06, Robert Kern <[EMAIL PROTECTED]> wrote:
> Not in that form, no, since this already exists:
>
>text[::-1]
Wow, that's really cool! Here are my questions:
1. How long has this thing been going on? I didn't know slice even
took an extra argument like that.
2. Where can I get the low
27;s my workaround for now:
def reverse(text):
return ''.join([text[i] for i in range(len(text)-1,-1,-1)])
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
On 20 Sep 2006 08:08:01 -0700, Adam Jones <[EMAIL PROTECTED]> wrote:
>
> Gregory Piñero wrote:
> > Say hello to pydelicious's new home ;-)
> > http://code.google.com/p/pydelicious/
> >
> > -Greg
>
> Unless you are the original project's maintain
Say hello to pydelicious's new home ;-)
http://code.google.com/p/pydelicious/
-Greg
--
http://mail.python.org/mailman/listinfo/python-list
On 9/19/06, Lawrence Oluyede <[EMAIL PROTECTED]> wrote:
> Gregory Piñero <[EMAIL PROTECTED]> wrote:
> > Otherwise any other advice is welcome. Should I just post
> > the code somewhere else, etc?
>
> Maybe you can fork and maintain it somewhere else...
Forking
ate the project so others can use it, but I
can't seem to login to the trac page to change the code? Just
wondering if there's some obvious way to change the source code, or
register? Otherwise any other advice is welcome. Should I just post
the code somewhere else, etc?
Thanks,
On 9/5/06, Tim Williams <[EMAIL PROTECTED]> wrote:
> > It does already, you just haven't grasped list fully yet :):)
> >
> > when you remove 2 from alist, the list becomes length 2, there is no
> > longer a 3rd item in the list to iterate over.
> >
> > Try this
> >
> > > >>> alist=[1 ,2 ,3, 4]
>
>>>
Bonus Question:
Can we make this behave more intuitiviely in Python 3000?
-Greg
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> what module is this? if it takes 5.5 seconds to import a single module,
> something isn't quite right.
Ok, I know it sounds bad but it has a good purpose! Basically it
provides access to about 100mb of data. It serves as a cache of
QuickBoo
On 8/31/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> several seconds? sounds bad. what does the following script print on
> your machine?
>
> import time, subprocess, sys
>
> t0 = time.time()
> for i in range(10):
> subprocess.call([sys.executable, "-c", "pas
Would someone mind giving me a quick explanation on what this is
telling me? How much is 201 CPU seconds? Watching the clock the run
seems to take 7 seconds all the way from clicking on the batch file to
run my hotshot script. Does that mean most of that time was in
loading the interpreter?
Am
Hey Folks,
Some import questions that a search didn't turn up for me.
1. Will "from somemodule import onething" take as long to start up as
import somemodule?
2. Is there anyway I can get at onething more quickly?
3. If I put an import statement hidden away in some function, will
Python only do t
On 8/5/06, Neil Hodgson <[EMAIL PROTECTED]> wrote:
> While you can write a script, its quite easy to turn on POP and run
> a client side mail client like Thunderbird.
Good point, Neil. This is a very tempting option, I just wanted to
include it in a backup script rather than having to open up
On 5 Aug 2006 15:27:03 -0700, Simon Forman <[EMAIL PROTECTED]> wrote:
> Out of curiosity, why do you want to _backup_ a gmail account? (I use
> my gmail account to backup files and documents I never want to lose.)
> I could think of some reasons, but I'm wondering what yours are. : )
Here are a f
you might have. I'm also open to options I
haven't thought of too.
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
Ok, nevermind, I figured it it, see below
On 7/27/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> Hi Wise Python Folk,
>
> Here's my code:
> >>> p={'type':'bar','title':'Gregs Chart 1','values':[1,2,3],'labels
s=form.getlist('value')
and values will equal a list with 1,2, 3 or at least '1', '2', '3'
Much thanks in advance!
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
preadsheet.
>
> Here are a few links that might help:
>
> http://mathieu.fenniak.net/plotting-in-excel-through-pythoncom/
> http://www.markcarter.me.uk/computing/python/excel.html
> http://mathieu.fenniak.net/plotting-in-excel-through-pythoncom/
>
> Hope info helps.
>
uld like to keep the "formatting" in the template.
> >
> > Did I miss a "load", "read" or "open" function in pyExcelerator that
> > would hand me back a WorkBook?
> >
> > Greetings,
> > Marco
> >
> >
> If you are o
AIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > I was just idley curious on what it would take to make a web plug-in
> > for Pygame. I'm picturing it working the way my browser currently
> > shows flash games. Is such an idea even possible? Has anyone
> > a
On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I know that pyExelerator is the supported project now, but I can't use
> it because I'd need it to generate files from a web platform. Since I
> can not save a file to a file-like object, I have to use pyXLWriter.
I don't really know w
Shane Wrote:
> Ah, so you also want to distribute untrusted Python code. That's fairly
> hard. There's a discussion about it on Python-Dev right now.
Well, I want to write a game in Pygame, and people can just go to my
website and play it within their browser. I guess that would be
untrusted co
t;[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > I was just idley curious on what it would take to make a web plug-in
> > for Pygame. I'm picturing it working the way my browser currently
> > shows flash games. Is such an idea even possible? Has anyone
> &g
Hi guys,
I was just idley curious on what it would take to make a web plug-in
for Pygame. I'm picturing it working the way my browser currently
shows flash games. Is such an idea even possible? Has anyone
attempted this?
--
Gregory Piñero
Chief Innovation Officer
Blended Technol
58, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067,
> 10068, 10069, 10070, 10071, 10091, 10092, 10093, 10101]
> >>> print errno.errorcode[10]
> ECHILD
>
> or
>
> >>> import os
> >>> print os.strerror(10)
> No child processes
&g
is but it doesn't have numbers and I can't tell if it's
even what I'm looking for:
http://docs.python.org/lib/module-errno.html
Much thanks!
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
What's the reasoning behind requiring everything to be in functions?
Just curious.
On 6/20/06, Christophe <[EMAIL PROTECTED]> wrote:
>
> Place all the code in a function. Even without psyco you might get
> somewhat better performances then. And I doubt psyco can optimise code
> that isn't in a fu
TPATH,filepath,outfilename)
result=os.popen(command).read()
pdftext=outfile.read()
outfile.close()
return pdftext
Much thanks!
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
record approach. I just wanted to make the point that
> there *was* an in-built mechanism.
>
> ICDBurn:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/icdburn/icdburn.asp
> ctypes.com: http://starship.python.net/crew/theller/ctypes
Thanks guys. That was informative and helpful. I'm back on track now.
-Greg
On 21 Mar 2006 17:30:47 -0800, Ben Cartwright <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > Hey guys,
> >
> > I don't understand why this isn't working for me. I
last):
File "", line 1, in ?
TypeError: dict objects are unhashable
(Bonus points: Why does anything have to be "hashed"? Can't it just
check the references?)
Thanks,
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
n't go away.
> >From what I read at SGMLOP's site I doub't that you can get much faster -
> because speed comes with sacrificing standard compliancy, which it already
> seems to do.
>
> Regards,
>
> Diez
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the help, guys. This project was put on hold so I wasn't
able to try out any of the advice yet. I'll let you know when I do.
-Greg
On 3/8/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Wed, 8 Mar 2006 12:52:04 -0500, "Gregory Piñero"
> &
Hi Guys,
Does anyone know how to program a Python script to send out emails
with a request delivery receipt? Is it something I can build into the
email message via the mime stuff?
And yes, I know it's probably a bad idea, but I can't talk my clients
out of it ;-)
--
Gregory Pi
17/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> Actually, no wait, that's bad. It doesn't increment the year.
>
> Does anyone have a simple way to code this?
>
> -Greg
>
>
> On 2/17/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> > Here's ho
Actually, no wait, that's bad. It doesn't increment the year.
Does anyone have a simple way to code this?
-Greg
On 2/17/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> Here's how I do it:
>
> def monthify(anint):
> if anint%12==0:return 12
> else
-info.de/mysql/gotchas.html#1_14
>
> ;-)
>
> Paul
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, that did work!
On 2/15/06, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > Let's say I have a module named "Excellent Module.py"
>
> ExcellentModule = __import__('Excellent Module')
>
> -Farshid
> -
I have a good reason for doing this and
that I already know that spaces in module filenames should be avoided
at all costs!
Thanks,
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
mento e criação de sites: www.auriance.com
> Hospedagem de sites e servidores dedicados: www.auriance.net
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
I knew about that approach. I just wanted less typing :-(
On 2/14/06, Rocco Moretti <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > On 14 Feb 2006 06:44:02 -0800, [EMAIL PROTECTED]
> >
> >
> >>5./2.=2.5 is floating point math, with all the ro
do you know a less typing approach for
that?
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
Wow, that looks excellent. I'll definately try it out. I'm assuming
this is an existing project, e.g. you didn't write it after reading
this thread?
-Greg
On 2/9/06, name <[EMAIL PROTECTED]> wrote:
> Gregory Piñero ha scritto:
> :
> > If anyone would be kind
Ok, I finally got it working! See below
On 2/4/06, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sat, 04 Feb 2006 02:18:27 -0500, Gregory Piñero wrote:
> > class Node:
> > def __init__(self):
> > self.arg0=0
> > self.arg1=0
> >
Thanks for the advice guys. See below.
On 2/4/06, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sat, 04 Feb 2006 02:18:27 -0500, Gregory Piñero wrote:
>
> > class Node:
> > def __init__(self):
> > self.arg0=0
> > self.arg1=0
> &
By the way, all I'm trying to do here is take two trees, randomly find
a sub-tree of each and swap the sub-trees. So if anyone has a simple
method for doing that I'm certainly open to that too.
Thanks again,
-Greg
On 2/4/06, Gregory Piñero <[EMAIL PROTECTED]> wrote:
> Hi,
ict__.items():
node.__dict__[varname]=replace_within_node(value,oldnode,newnode)
return node
At the end of this email I pasted the whole text of the sample code in
case it would help to see it in context or maybe step through it?
--
Gregory Piñero
Chief Innovation Officer
Bl
Thanks for all the help guys, it finally worked! I don't know if I
ever would have figured this out on my own...
skipping the url encoding is what did the trick. I didn't end up
needing to do anything special for ssl. I guess urllib2 just handles
that itself.
Thanks again,
-Greg
--
http://ma
Correction:
-
POST /GatewayDC HTTP/1.0
Referer: YourCompanyNameGoesHere
Host: SSLserver.fedex.com
Accept: image/gif, image/jpeg, image/pjpeg, text/plain, text/html, */*
Content-Type: image/gif
Content-length: %d
Your FedEx Tra
Ok, I tried the changes you guys suggested but same error still:
1. Corrected spelling of referrer.
2. Don't specify host.
Here is what they say my request should look like:
-
POST /GatewayDC HTTP/1.0
Referer: YourCompanyNameG
at here.
Any help would be greatly appriciated.
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
Code pasted below (contains sample info so it won't work for you):
import urllib
import urllib2
FedEx_API_URL="https://gatewaybeta.fedex.com:443/Gate
I wonder which algorithm determines the similarity between two strings better?
On 1/31/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
> > Ok, ok, I got it! The Pythonic way is to use an existing library ;-)
> >
> > import difflib
> > Close
pproach/60
If anyone would be kind enough to improve it I'd love to have these
features but I'm swamped this week!
- MD5 checking for find exact matches regardless of name
- Put each set of duplicates in its own subfolder.
>
>
--
Gregory Piñero
Chief Innovation Officer
Blended T
"""
> m, n = (len(a),a), (len(b),b)
> if(m[0] < n[0]):#ensure that the 'm' tuple holds
> the longest string
> m, n = n, m
> dist = m[0] #assume distance = length of
> longest st
On 1/28/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> However, you do have an entry that covers "Python" and "Drive", with
> your URL at the bottom...
>
> Look Familiar???
>
> -=-=-=-=-=-=-
> Gregory Piñero | 3 Dec 01:23
>
Wow, sorry I sent that a little too fast. I just had to remove the \\
before the graphics. Thus this did work:
os.path.join('C:\\Documents and
Settings\\Gregory','graphics\\knight\\been hit e0001.bmp')
-Greg
On 1/27/06, Gregory Piñero <[EMAIL PROTECTED]> w
e right way to reference this path relatively?
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
e?
>
> The firmware names usually look like: 25501-XXX, 25501-008, 25947-XXX,
> 25588-???, 27871-XXX, 28388-XXX.
>
> --
> René Pijlman
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedt
few people a day for
this. So does anyone have an idea on what they could be searching for
and of course what the answer would be?
Sorry it's such a vague question for you guys, but I thought maybe
you'd enjoy a mystery for the day!
--
Gregory Piñero
Chief
the parallel port (serial ports are
> said to be slow when sending a lot of data (I think)). I think I'll start
> off with something very simple, for example controlling a motor and then
> move up to more advance models.
>
> Thanks again.
>
> Regard
OK, I ran Peter's add_freq3 and it ran four times on really large
dictionaries in about 3000 seconds. So I'd say that at a minimum
that's ten times faster than my original function since it ran all
last night and didn't finish.
Much obliged, Peter!
-Greg
On 12/14/05, Gr
r Otten <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
>
> > Here's a question about your functions. if I only look at the keys in
> > freq2 then won't I miss any keys that are in freq1 and not in freq2?
>
> No. As I start with a copy of freq1, all keys of freq1
unction.
-Greg
On 12/14/05, Peter Otten <[EMAIL PROTECTED]> wrote:
> Gregory Piñero wrote:
>
> > def add_freqs(freq1,freq2):
> > """Addtwowordfreqdicts"""
> > newfreq={}
> > forkey,valueinfreq1.items():
> > newfreq[key]=va
newfreq[key]=value+freq1.get(key,0)
return newfreq
freq1={
'dog':1,
'cat':2,
'human':3
}
freq2={
'perro':1,
'gato':1,
'human':2
}
print add_freqs(freq1,freq2)
answer_I_want={
'dog':1,
'cat':2,
'perro':
Sorry for the disruption. My messages don't seem to be making it to the list.
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
http://mail.python.org/mailman/listinfo/python-list
not sure if this first email made it to the list. Sorry if it ends up as a dupe.On 12/2/05, Gregory Piñero <[EMAIL PROTECTED]
> wrote:Hi guys,
I'm thinking it will take a real expert to do this, probably someone
who can use windows API's or directly poll the hardware or some suc
Hi guys,
I'm thinking it will take a real expert to do this, probably someone
who can use windows API's or directly poll the hardware or some such
thing. But if you think you know how then please let me
know. I'm trying to write an automation script that will burn an
ISO file each night.
By the
I'd be more worried about two users writing to the file at the same
time. I don't have much experience in that area though so maybe
someone could chime in on if that's a legitimate worry or not.
-Greg
On 11/24/05, Tim Golden <[EMAIL PROTECTED]> wrote:
[Guy Lateur]> I'm working on an application t
Hey guys, could anyone explain this behavior to me. It doesn't seem right :-(
def testfunc(parm1,parm2={}):
print 'parm2',parm2
parm2['key1']=5
>>testfunc('greg')
parm2 {}
>>testfunc('greg')
parm2 {'key1': 5}
def testfunc2(parm1,parm2=[]):
print 'parm2',parm2
parm2.append(5)
>>
Thanks Simon, I'll try that. And if that doesn't work, why I'll try a Microsoft word group!
-Greg
On 11/5/05, Simon Brunning <[EMAIL PROTECTED]> wrote:
On 04/11/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:> Is there a different group/mailing list I should try? D
Is there a different group/mailing list I should try? Does anyone know if there is a pythonwin group/list for example?
On 11/3/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:
I thought I'd take a shot and see if anyone knows the answer to this? I've been stuck for a while now
I thought I'd take a shot and see if anyone knows the answer to this? I've been stuck for a while now on this.
Would anyone happen to know why this my function removewatermark() in
this code isn't working? I copied it from a Word macro I recorded
and it did work when I recorded the macro. When
Not quite because if something(3) fails, I still want something(4) to run.
On 10/27/05, Micah Elliott <[EMAIL PROTECTED]> wrote:
If you just want to ignore the exceptions while saving space/typing,you could equivalently do::try:something(1)something(2)# ...except:
block of code and use
tabs.
And I don't want to edit the function so it's not an option to put the try in there.
-Greg
On 10/27/05, Simon Brunning <[EMAIL PROTECTED]> wrote:
On 27/10/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:> So much for writing my whole program
So much for writing my whole program on one line :-(
j/k
-GregOn 10/26/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Gregory Piñero wrote:> Any idea why I can't say:>> if 1:print 'a';else:print 'b'>> all in one line like that?because ";"
Thanks, John. That was all very helpful. It looks like one
option for me would be to put cdata[ around my text with all the weird
characters. Otherwise running it through on of the SAX utilities
before parsing might work.
I wonder if the sax utilities would give me a performance hit. I have 60
Any idea why I can't say:
if 1:print 'a';else:print 'b'
all in one line like that?
It's just a random question I ran across a few days ago. -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com
)
--
http://mail.python.org/mailman/listinfo/python-list
is not well formed, otherwise.The code then works.HTHJGregory Piñero wrote:> Should I try some sort of XML group instead? I'm still stuck on this.
>> -Greg>>> On 10/25/05, *Gregory Piñero* <[EMAIL PROTECTED]> [EMAIL PROTECTED]
>> wrote:>> Hi guys,>>
Should I try some sort of XML group instead? I'm still stuck on this.
-Greg
On 10/25/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:
Hi guys,
I was hoping some XML expert could help me make this code work.
Below is sample code with sample XML similar to what I'm dealing with.
Ho
1 - 100 of 146 matches
Mail list logo