Hello All,
I'm shipping an application using py2exe.
With Python2.3 it worked fine but when switching to Python2.4 I started
getting "warning: string/unicode conversion" all over the place.
Any ideas how to solve this (other than using 'filterwarnings')?
Thanks.
Bye.
--
Mike Brown wrote:
Very strange how it only shows up after the 1st import attempt seems to
succeed, and it doesn't ever show up if I run the code directly or run the
code in the command-line interpreter.
The reason for that is that the Python byte code stores the Unicode
literal in UTF-8. The firs
klappnase wrote:
I am using python-2.3.4 and get unicode errors:
f = os.path.join(u'/home/pingu/phonoripper', u'\xc3\u20ac')
os.path.isfile(f)
True
os.access(f, os.R_OK)
Traceback (most recent call last):
File "", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode characters in position
Hi,
> Well, no. For example, Python source code is not typically concatenated,
> nor is source code in any other language.
We did it with C++ files in order to have only one compilation unit to
accelarate compilation time over network. Also, all the languages with some
"include" directive will
Hi,
Thank you for your answer. That confirms what Martin v. LÃwis says. You can
choose between UCS-2 or UCS-4 for internal unicode representation.
Francis Girard
Le mardi 8 Mars 2005 00:44, Jeff Epler a ÃcritÂ:
> On Mon, Mar 07, 2005 at 11:56:57PM +0100, Francis Girard wrote:
> > BTW, the pytho
Ups, that was meant to go to the pykde list.
Sorry,
Frans
--
http://mail.python.org/mailman/listinfo/python-list
Bo Peng wrote:
def func(output=''):
output(output=output)
Naturally, I get 'str' object is not callable. Is there a way to tell
func that the first output is actually a function? (like in C++,
::output(output) )
output_alias = output
def func (output=''):
output_alias(output=output)
Daniel
I have
>>> listA=[1,2,3,4,5,4,3,4,3,2,1]
and I want a list of only the unique members.
This seems inefficient, but works fine over my small sample lists:
>>> listA=[a for a in set(listA)]
Is there a more efficient approach for cases where listA is large?
Eric Pederson
:
> "Gregor" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> There's a DOS console application I am trying to script (in Python),
>> but it
>> doesn't seem to use stdout or stderr... For example, if I redirect
>> output to a file ("cmd > file.txt"), the output still appears on
>>
Miki Tebeka wrote:
> I'm shipping an application using py2exe.
With Python2.3 it worked fine but when switching to Python2.4 I started
getting "warning: string/unicode conversion" all over the place.
Any ideas how to solve this (other than using 'filterwarnings')?
It is really surprising that you
Eric Pederson wrote:
> I have
>
listA=[1,2,3,4,5,4,3,4,3,2,1]
>
> and I want a list of only the unique members.
>
> This seems inefficient, but works fine over my small sample lists:
>
listA=[a for a in set(listA)]
>
>
> Is there a more efficient approach for cases where listA is l
Peter Maas <[EMAIL PROTECTED]> writes:
> I think this is too difficult, because there are many ways to write
> code (even skeletons) for a use case. An easier approach would
> be to write the skeleton manually, embed the test cases in the doc
> strings and generate the test code from the doc strin
Bo Peng wrote:
def func(output=''):
output(output=output)
Naturally, I get 'str' object is not callable. Is there a way to tell
func that the first output is actually a function? (like in C++,
::output(output) )
You could use a default argument:
def func(output='', output_fn=output):
output_f
Fabio Zadrozny <[EMAIL PROTECTED]> writes:
> I think that the best approach I saw to this was in the Eclipse java
> ide... You can basically go on the declaration of
>
> self.obj = player.Player('Fred the Adventurer')
>
> press Ctrl+1 and it adds a suggestion to create the class Player.
>
> Then g
Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> >>> from random import random
> >>> out = open('corpus.decorated', 'w')
> >>> for line in open('corpus.uniq'):
> print >> out, '%.14f %s' % (random(), line),
>
> >>> out.close()
>
> sort corpus.decorated | cut -c 18- > corpus.randomized
Ve
Hi,
I'm looking for some easy way to do something like include in c or PHP.
Imagine I would like to have:
cat somefile.py
a = 222
b = 111
c = 9
cat somefile2.py
self.xxx = a
self.zzz = b
self.c = c
self.d = d
cat anotherfile.py
def a():
include somefile
postprocess(a)
def b():
include som
On Tue, 8 Mar 2005 10:25:46 +0100 (CET), <[EMAIL PROTECTED]>
wrote:
I'm using CGIHTTPServer (via its test() method) to test some CGI on my
Windoze 98 box. I find that the execution is very slow. Is there
anything I can do to make sure I'm getting the best performance out of
CGIHTTPServer?
Co
Thank you all!
It's a good start for me...with the info. u provided.
--
http://mail.python.org/mailman/listinfo/python-list
> If there is no way to improve performance, could anyone tell my _why_ it's
> running so slowly? Presumably spawning a process takes some time. The
> code I'm running as CGI is not hectic at all.
Just an educated guess: Maybe some timeouts or slowly answered requests are
the problem - e.g. DNS
Eric Pederson wrote:
I have
listA=[1,2,3,4,5,4,3,4,3,2,1]
and I want a list of only the unique members.
This seems inefficient, but works fine over my small sample lists:
listA=[a for a in set(listA)]
Is there a more efficient approach for cases where listA is large?
no. Even though the code
Tim Roberts wrote:
"Johan Kohler" <[EMAIL PROTECTED]> wrote:
I'm using CGIHTTPServer (via its test() method) to test some CGI on my
Windoze 98 box. I find that the execution is very slow. Is there
anything I can do to make sure I'm getting the best performance out of
CGIHTTPServer?
Compared to w
Coral Snake wrote:
I am having problems with programming even simple "Hello World"
programs from books and tutorials that use Python GUI libraries. Such
Programs cause python to throw "Attribute Errors" even when the
"attributes" being asked for by the errors exist in the source code.
This has happ
Am Tue, 08 Mar 2005 13:56:57 +0200 schrieb Johan Kohler:
> On Tue, 8 Mar 2005 10:25:46 +0100 (CET), <[EMAIL PROTECTED]>
> wrote:
>
>> I'm using CGIHTTPServer (via its test() method) to test some CGI on my
>> Windoze 98 box. I find that the execution is very slow. Is there
>> anything I can d
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> inserted = set()
> res = []
> for e in listA:
>if not e in inserted:
>res.append(e)
>inserted.add(e)
> listA = res
I'm going to go off on a tangent here and put in a plea for better variable
naming. I'm looking at the above code
On Tuesday 08 March 2005 12:41, Martin MOKREJŠ wrote:
> cat somefile.py
> a = 222
> b = 111
> c = 9
>
> cat anotherfile.py
>
> def a():
> include somefile
> postprocess(a)
What about :
def a():
exec open('somefile.py')
postprocess(a)
You can even use the optional dictionary parameter:
Martin MOKREJŠ wrote:
Hi,
I'm looking for some easy way to do something like include in c or PHP.
Imagine I would like to have:
I know about module imports and reloads, but am not sure if this is the
right way to go. Mainly, I want to assign to multiple object instances
some self bound v
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : [EMAIL PROTECTED]
Cenix Website : http://www.cenix-bioscience.com
--- Begin Message ---
Leeds, Mark wrote:
I have a string variable say “8023 “ and
Title: RE: Best way to make a list unique?
[Max M]
#- >>> la = [1,2,3,4,3,2,3,4,5]
#- >>> from sets import Set
#- >>> sa = Set(la)
#- >>> for itm in sa:
#- ... print itm
Remember that in Python 2.4 you have ´´set´´ as a built-in data type:
>>> la = [1,2,3,4,3,2,3,4,5]
>>> sa = se
> I'm going to go off on a tangent here and put in a plea for better
> variable
> naming. I'm looking at the above code, and can't figure out what "res" is
> supposed to be. Is it short for "rest", as in "the rest of the items"?
> Residual? Result? Restore? Any of these seems plausable. Not k
Max M wrote:
Eric Pederson wrote:
listA = list(Set(listA))
As of 2.4, set is a built-in type (2.3 had Set in module sets).
Another 2.4-ism is "sorted", which might very well be the way you
want to turn the set into a list:
listA = sorted(set(listA))
for this particular use, you can define sorte
Martin MOKREJŠ wrote:
Hi,
I'm looking for some easy way to do something like include in c or PHP.
Imagine I would like to have:
cat somefile.py
a = 222
b = 111
c = 9
cat somefile2.py
self.xxx = a
self.zzz = b
self.c = c
self.d = d
cat anotherfile.py
def a():
include somefile
postprocess(a)
d
Scott David Daniels wrote:
Martin MOKREJŠ wrote:
Hi,
I'm looking for some easy way to do something like include in c or PHP.
Imagine I would like to have:
I know about module imports and reloads, but am not sure if this is
the right way to go. Mainly, I want to assign to multiple object
> See my post on Mar 2 about "automating assignment of class variables".
> I got no answers, maybe I wasn't clear enough ... :(
Seems so - I for example didn't understand it.
>
> I need to define lots of variables. The variable names are often
> identical. The problem is that if I put such a cod
Kent Johnson wrote:
Martin MOKREJŠ wrote:
Hi,
I'm looking for some easy way to do something like include in c or PHP.
Imagine I would like to have:
cat somefile.py
a = 222
b = 111
c = 9
cat somefile2.py
self.xxx = a
self.zzz = b
self.c = c
self.d = d
cat anotherfile.py
def a():
include somefile
I have a dictionary of images. I wish to sort the dictionary 'v' by a
dictionary value using python 2.3. The dictionary value is the date
attribute as shown here:
v[imagename][9]['date']
This attribute is an extracted EXIF value from the following set:
data element [9] of v[imagename]:
Hello,
I want to collect with the wildcard '*' all existing directories.
For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How can I resolve this problem?
Thanks for your hints, Thomas.
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
See my post on Mar 2 about "automating assignment of class variables".
I got no answers, maybe I wasn't clear enough ... :(
Seems so - I for example didn't understand it.
I need to define lots of variables. The variable names are often
identical. The problem is that if I p
I was wondering how to do this too. I'm trying to write a distutils
setup.py script that has some data I'd like to include. From the
distutils docs I get
data_files specifies a sequence of (directory, files) pairs in the
following way:
setup(...
data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2
BOOGIEMAN <[EMAIL PROTECTED]> wrote:
> Please include "goto" command in future python realeses
> I know that proffesional programers doesn't like to use it,
> but for me as newbie it's too hard to get used replacing it
> with "while", "def" or other commands
It was only when I read this thread t
> I have a dictionary of images. I wish to sort the dictionary 'v' by a
> dictionary value using python 2.3. The dictionary value is the date
> attribute as shown here:
>
> v[imagename][9]['date']
>
> This attribute is an extracted EXIF value from the following set:
>
> data element [9]
Bo Peng a écrit :
Dear list,
If you ask: why do you choose these names? The answer is: they need to
be conformable with other functions, parameter names.
I have a function that pretty much like:
def output(output=''):
print output
and now in another function, I need to call output function, wit
Thomas Rademacher wrote:
> Hello,
>
> I want to collect with the wildcard '*' all existing directories.
> For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
>
> How can I resolve this problem?
This is some sort of pattern matching. What I'd do is to convert your
pattern to a regex
On Tuesday 08 March 2005 14:33, Thomas Rademacher wrote:
> How can I resolve this problem?
python
>>> import glob
>>> help(glob)
or look at the online documentation for glob.
--
--- Heiko.
pgp6MyvJSQxu3.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
The standard split() can use only one delimiter. To split a text file
into words you need multiple delimiters like blank, punctuation, math
signs (+-*/), parenteses and so on.
I didn't succeeded in using re.split()...
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Rademacher wrote:
Hello,
I want to collect with the wildcard '*' all existing directories.
For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How can I resolve this problem?
Thanks for your hints, Thomas.
You may want to check out the glob module. E.g. something like:
>> impor
Hi,
I will be on vacation from Monday 7th till Friday 11th both included. And
during this time I will not be able to access to my phone and email.
For urgent queries please contact:
* HPIS USZ8 and HP UK ltd please contact Nuria Satorra,
* All other VAT reporting operation queries please con
On Tuesday 08 March 2005 14:43, qwweeeit wrote:
> The standard split() can use only one delimiter. To split a text file
> into words you need multiple delimiters like blank, punctuation, math
> signs (+-*/), parenteses and so on.
>
> I didn't succeeded in using re.split()...
Then try again... ;)
On Tue, 8 Mar 2005 14:33:59 +0100, Thomas Rademacher
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to collect with the wildcard '*' all existing directories.
> For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How about something like:
import fnmatch
import os
root = 'd:\\'
filt
[EMAIL PROTECTED] wrote:
I was wondering how to do this too. I'm trying to write a distutils
setup.py script that has some data I'd like to include. From the
distutils docs I get
data_files specifies a sequence of (directory, files) pairs in the
following way:
setup(...
data_files=[('bitmaps
"Diez B. Roggisch" wrote:
> > If there is no way to improve performance, could anyone tell my _why_ it's
> > running so slowly? Presumably spawning a process takes some time. The
> > code I'm running as CGI is not hectic at all.
>
> Just an educated guess: Maybe some timeouts or slowly answered
Martin MOKREJŠ wrote:
Oh, I've picked up not the best example. I wanted to set the variables
not under __init__, but under some other method. So this is actually
what I really wanted.
class klass(somefile2.base):
def __init__():
pass
def set_them(self, a, b, c, d):
somefile2.base.__
Martin MOKREJ wrote:
> Am I so deperately fighting the language? No-one here on the list
> needs to set hundreds variables at once somewhere in their code? I
> still don't get why:
I've certainly never needed to set hundreds of variables at once in my
code. I might have hundreds of values, but
Thanks. It works fine! Thomas
"Vincent Wehren" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Thomas Rademacher wrote:
> > Hello,
> >
> > I want to collect with the wildcard '*' all existing directories.
> > For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
> >
>
Title: RE: Sorting dictionary by 'sub' value
[Rory Campbell-Lange]
#- I have a dictionary of images. I wish to sort the dictionary 'v' by a
#- dictionary value using python 2.3. The dictionary value is the date
#- attribute as shown here:
You have to use the DSU algorithm (Decorate, Sort,
qwweeeit wrote:
> The standard split() can use only one delimiter. To split a text file
> into words you need multiple delimiters like blank, punctuation, math
> signs (+-*/), parenteses and so on.
>
> I didn't succeeded in using re.split()...
>
Would you care to elaborate on how you tried to
Thomas,
Right on the mark. Thanks for the help.
Larry Bates
Thomas Heller wrote:
> Larry Bates <[EMAIL PROTECTED]> writes:
>
>
>>I had occasion to look back at a project I did over a year ago
>>and needed to make one small change. I use py2exe to package
>>it for distribution via Inno Setup
Anyone know how to capture text from GUI output? I need to process
information returned via a GUI window.
Earl
--
http://mail.python.org/mailman/listinfo/python-list
On 7 Mar 2005 06:38:49 -0800, gry@ll.mit.edu wrote:
> As far as I can tell, what you ultimately want is to be able to extract
> a random ("representative?") subset of sentences.
If this is what's wanted, then perhaps some variation on this cookbook
recipe might do the trick:
http://aspn.activest
Martin MOKREJŠ wrote:
Diez B. Roggisch wrote:
See my post on Mar 2 about "automating assignment of class variables".
I got no answers, maybe I wasn't clear enough ... :(
Seems so - I for example didn't understand it.
I need to define lots of variables. The variable names are often
identical. The
Martin MOKREJŠ wrote:
If I put them into a module, it get's executed only once unless I
> do reload. And I'd have to use: "from some import *",
because mainly I'm interrested in assigning to self:
self.x = "blah"
self.y = "uhm"
OK, somewhere in here I think I get what you want to do. Essent
On Tue, 8 Mar 2005 14:13:01 +, Simon Brunning
<[EMAIL PROTECTED]> wrote:
> On 7 Mar 2005 06:38:49 -0800, gry@ll.mit.edu wrote:
> > As far as I can tell, what you ultimately want is to be able to extract
> > a random ("representative?") subset of sentences.
>
> If this is what's wanted, then p
Hi all
I'm working with a long running, threaded server which serves HTTP
requests with content which are passed through a XSLT processor. The
XSLT processor I'm using is the Pyana processor.
I have one compiled stylesheet which I uses to process all responses.
This way I only need to read and
Diez B. Roggisch wrote:
I have a dictionary of images. I wish to sort the dictionary 'v' by a
dictionary value using python 2.3. The dictionary value is the date
attribute as shown here:
v[imagename][9]['date']
...
You can't sort dicts - they don't impose an order on either key or value.
There a
Hello-
I am writing an application where I need to recognize when a file
arrives in a given directory. Files may arrive at any time during the
course of the day. Do I set up a cron job to poll the directory every
few minutes? Write a daemon to monitor the directory? Or is there some
other m
On Tuesday 08 March 2005 15:28, Simon Brunning wrote:
> This has the advantage that every line had the same chance of being
> picked regardless of its length. There is the chance that it'll pick
> the same line more than once, though.
Problem being: if the file the OP is talking about really is 80
Ola Natvig wrote:
My problem:
When serving my content without the XSLT processor the process size
remains the same size. (about 18MB in the windows task manager). But
when I use the XSLT processor the process will slowly gain size. About
1MB for each 10k requests, and this memory are not freed.
On Tue, 8 Mar 2005 15:49:35 +0100, Heiko Wundram <[EMAIL PROTECTED]> wrote:
> Problem being: if the file the OP is talking about really is 80GB in size, and
> you consider a sentence to have 80 bytes on average (it's likely to have less
> than that), that makes 10^9 sentences in the file. Now, mult
On Mon, 7 Mar 2005 18:58:20 -0500, Leeds, Mark <[EMAIL PROTECTED]> wrote:
>
> I have a string variable say "8023 " and
>
> I want to get rid of the beginning
>
> And ending quotes.
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "cre
Found that out :-(
You can use the local=locals() option so at least you have access to the
local variables, which in the case of debugging, is exactly what I needed.
Since -i gives you control at the end of the program the locals are already
gone.
Seems like both approaches have their advanta
Right, but only one namespace. Would be nice if there was a way to give it
both the global and the local namespaces. In my case though the local
namespace was sufficient.
"Just" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> code.interact() has a namespace argument ('local'), s
Title: RE: Recognizing the Arrival of a New File
[Greg Lindstrom]
#- I am writing an application where I need to recognize when a file
#- arrives in a given directory. Files may arrive at any time
#- during the
#- course of the day. Do I set up a cron job to poll the
#- directory every
Bill wrote:
I can double click on a .py file and it executes, or use the command
prompt.
I believe if you install the Activestate distribution it sets up the
file registrations automatically.
As does the standard Windows distribution from python.org.
-Peter
--
http://mail.python.org/mailman/listinf
On Tue, 08 Mar 2005 08:43:04 -0600, rumours say that Greg Lindstrom
<[EMAIL PROTECTED]> might have written:
>I am writing an application where I need to recognize when a file
>arrives in a given directory. Files may arrive at any time during the
>course of the day. Do I set up a cron job to po
QOTW: "Really, of course, the only things you need to make explicit are the
ones that readers don't understand." -- Steve Holden
"Working with unicode objects in Python is so transparent, it's easy to
forget about what a C extension would likely want." -- Kevin Dangoor
"You take leadership in a
[EMAIL PROTECTED] wrote:
From the Python 2.4 quickreference:
d.popitem() Removes and returns an arbitrary (key, value) pair from
d
If this isn't random enough, then you can generate a random number in
range(len(d))
Although this idea may suit the OP, "arbitrary" is
most definitely not "ran
Delaney, Timothy C (Timothy) wrote:
Is this a style guide thing?
Why not just:
def func(output_param=''):
output(output=output_param)
This is exactly the problem. There are a bunch of other functions that
use output='' parameter. Changing parameter name for this single
function may cause conf
Hi to everyone who has repsonded. I'll try to clarify my problem in more detail.
I believe I have the answers how to assign to self. in superclasses. In case
you would know of yet another way, let me know. ;)
Steve Holden wrote:
Martin MOKREJŠ wrote:
Diez B. Roggisch wrote:
See my post on Mar 2 abo
Kent Johnson wrote:
Bo Peng wrote:
def func(output=''):
output(output=output)
Naturally, I get 'str' object is not callable. Is there a way to tell
func that the first output is actually a function? (like in C++,
::output(output) )
You could use a default argument:
def func(output='', output_f
Martin MOKREJŠ wrote:
The data passed to an instance come from sql tables. I have the idea
every table will be represented by an object.
Have you looked at SQLObject? I've never used it, but it does seem like
this is the sort of thing it was designed for:
http://sqlobject.org/
STeVe
--
http://ma
Bo Peng wrote:
> Thank everyone for the quick responses. All methods work in general.
> Since func() has to take the same parameter set as some other functins,
> I can not use func(output='', output_fn=output). "output_alias=output"
> etc are fine.
One suggestion that I haven't seen so far:
Steve Holden <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] wrote:
>> I was wondering how to do this too. I'm trying to write a distutils
>> setup.py script that has some data I'd like to include. From the
>> distutils docs I get
>> data_files specifies a sequence of (directory, files) pairs in
""Martin v. LÃwis"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Francis Girard wrote:
Well, no text files can't be concatenated ! Sooner or later, someone will
use "cat" on the text files your application did generate. That will be a
lot of fun for the new unicode aware "super-ca
Martin MOKREJŠ wrote:
Am I so deperately fighting the language? No-one here on the list needs
to set hundreds variables at once somewhere in their code?
Nobody needs to do that. As others have pointed out, creating variables
implies wanting to access them distinctly, not as a whole group. If
yo
Peter Hansen wrote:
Martin MOKREJŠ wrote:
Am I so deperately fighting the language? No-one here on the list
needs to set hundreds variables at once somewhere in their code?
Nobody needs to do that. As others have pointed out, creating variables
implies wanting to access them distinctly, not as
Earl Eiland wrote:
Anyone know how to capture text from GUI output? I need to process
information returned via a GUI window.
It might help (at least in terms of justifying this as an
on-topic post) to describe in what way this is a Python
question. Is it a Python program that produces the output?
Simon Brunning wrote:
On Mon, 7 Mar 2005 18:58:20 -0500, Leeds, Mark <[EMAIL PROTECTED]> wrote:
I want to get rid of the beginning
And ending quotes.
my_string = '"8023 "'
my_string.strip('"')
'8023 '
Note the risk in this approach, as it blindly
removes any number of leading and trailin
Starting a process on WIN98 is VERY slow. (On NT much faster the second
time). If you really want to use WIN98, modify CGIHTTPServer.py in such
a way, that branch
#Other O.S. -- execute script in this process
is executed.
This way CGIHTTPServer is as fast as it gets. At least not slower then
ISA
While debugging a problem I was having I found a bug in the cgi.py module.
When the environment does not have a correctly set REQUEST_METHOD cgi.py
prompts
for key=value pairs by reading from sys.stdin. After the values are read
from
sys.stdin they are never stored in the FieldStorage.list attr
Isn't this a bug?
Here's the test program:
import code
def test_func():
lv = 1
print '\n\nBEFORE lv: %s\n' % (lv)
code.interact(local=locals())
print '\n\nAFTER lv: %s\n' % (lv)
return
test_func()
gv = 1
print '\n\nBEFORE gv: %s\n' % (gv)
code.interact(local=locals())
prin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi there,
I've just finished creating a package for Python 2.4 for users who
don't want to install it from sources under Mac OS X Panther. The same
has been tested and it's working perfectly for me. The package is
available in the .pkg format and it'
Joe wrote:
Isn't this a bug?
Here's the test program:
import code
def test_func():
lv = 1
print '\n\nBEFORE lv: %s\n' % (lv)
code.interact(local=locals())
print '\n\nAFTER lv: %s\n' % (lv)
return
Check the documentation for locals() [1]:
"Update and return a dictionary represen
I'm trying to do something along the lines of
>>> print '%temp %d' % 1
Traceback (most recent call last):
File "", line 1, in ?
ValueError: unsupported format character 't' (0x74) at index 1
although, obviously I can't do this, since python thinks that the '%t'
is a format string.
I've tried o
[EMAIL PROTECTED] wrote:
I'm trying to do something along the lines of
print '%temp %d' % 1
Traceback (most recent call last):
File "", line 1, in ?
ValueError: unsupported format character 't' (0x74) at index 1
Use %%:
>>> '%%temp %d' % 1
'%temp 1'
--
Erik Max Francis && [EMAIL PROTECTED] && htt
Steve,
Thanks, I knew about that but my question is why is it not working
consistently?
Joe
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Joe wrote:
>> Isn't this a bug?
>>
>> Here's the test program:
>>
>> import code
>>
>> def test_func():
>> lv = 1
>>
> Will anything else work here?
Use %%
print "%%s %s" % "foo"
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I would like the distutils are creating a binary distribution only - means
create the distribution file with *.pyc files WITHOUT the *.py files. Any
ideas? Or are the distutils the wrong tool for that?
"setup.py bdist" creates binary dist, but includes the sourcecode
cheers
Stefan
--
"Wa
Thanks!!
--
http://mail.python.org/mailman/listinfo/python-list
Thank you all very much for your help.
I did the following and it works:
imgs=v.keys()
imgs.sort(lambda a,b: cmp(
time.strptime(str(v[a][9]['date']), '%Y:%m:%d %H:%M:%S'),
time.strptime(str(v[b][9]['date']), '%Y:%m:%d %H:%M:%S'))
)
for i in img
Joe wrote:
Thanks, I knew about that but my question is why is it not working
consistently?
At the module level, locals() is globals():
py> locals() is globals()
True
And the globals() dict is modifiable.
HTH,
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
Thanks I thought that was also true for globals() but I now see that it is
not.
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Joe wrote:
>> Thanks, I knew about that but my question is why is it not working
>> consistently?
>
> At the module level, locals() is g
1 - 100 of 189 matches
Mail list logo