Coral Snake wrote:
Thank you all. It appears that I was right in my original opinion of
source code from the Python Developer's Handbook by Andre Lessa and the
PyGTK Tutorial. That is where these source codes came from.
The code in Question came from the Chapter Getting Started in the PyGTK
Tutoria
klappnase wrote:
> "Coral Snake" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
>
> > --
> > Tkinter:
> >
> > from Tkinter import *
> > root = Tk()
>
> This creates the application's main window. The Tk() command is not
> som
I'm trying to integrate some doctest tests with unittest. The tests
must be exposed as one or more subclasses of unittest.TestCase, so I'm
collecting them with a call to doctest.DocTestSuite(), and then add them
to a TestCase class I have created.
The tests seem to run, but they always seem to suc
Delaney, Timothy C (Timothy) wrote:
Michael Hoffman wrote:
For those who don't know, these implement a hash set/map which
iterates in the order that the keys were first added to the set/map.
I would love to see such a thing.
I've proposed this on python-dev, but the general feeling so far is
agai
Quoth Kenneth Pronovici <[EMAIL PROTECTED]>:
...
| If ignoreStderr=False, I use popen2.Popen4 so that stderr and stdout are
| intermingled. If ignoreStderr=True, I use popen2.Popen3 with
| capturestderr=True so stderr doesn't appear in the output. This
| functionality exists so I have an equivale
hi
I am working in making a jabber client.I made upto chatting with
each other.Any number of people can be simultaneously chat.My problem
is that If I am initiated to talk then the application works
fine.Suppose if my friend initiate the session by sending message the
window goes on not respondi
Hello!
would someone know a method that
allows
to read line delimited by "\n"
instead of trapping "\0" like
readlines does?
I have to write my own while loop to do
this.
while myThread.isAlive() ==
True: myChar =
p.stdout.read(1) if myChar ==
'\0':
My appreciation for your responses is not
easily imparted through text. Thank You.
Steven Bethard wrote:
Michael Hoffman wrote:
Tobiah wrote:
If within the __getitem__ method I attempt
to get an item from self, the __getitem__ method is
called in an infinite recursion.
You need to explicitly use
Here is the solution, as an fyi
might not be the most elegant solution, but it
works ;)
from subprocess import *import sys, threading,
time
# if someone knows who to return value from thread
function,
# pls let me know, I hate to use global variable
;)
def ThreadProcess():
executab
[EMAIL PROTECTED] wrote:
Was doing some string formatting, noticed the following:
x = None
"%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
Because %s just calls str on the arguments, and str(None) == 'None'.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/
Pete. wrote:
The 2 scripts I made is actually working the way they where meant to. So im
kindda happy :)
The problem is, that I didnt think about the problem: as Steve wrote:
"There are other matters of concern, however, the most pressing of which
is: How am I going to stop user from naviga
The 2 scripts I made is actually working the way they where meant to. So im
kindda happy :)
The problem is, that I didnt think about the problem: as Steve wrote:
"There are other matters of concern, however, the most pressing of which
is: How am I going to stop user from navigating directly to
pete...
simply use google and search for "php scripts login user authentication
mysql session etc..."
these terms will give you lots of examples... you could also look at some of
the bulletin board/forum apps that are open source to se what they use. or,
you could also look through the code for s
Patch / Bug Summary
___
Patches : 279 open (-24) / 2797 closed (+33) / 3076 total ( +9)
Bugs: 851 open ( +2) / 4853 closed (+16) / 5704 total (+18)
RFE : 173 open ( +4) / 150 closed ( +2) / 323 total ( +6)
New / Reopened Patches
__
Fix for w
Michael Hoffman wrote:
>>> For those who don't know, these implement a hash set/map which
>>> iterates in the order that the keys were first added to the set/map.
>
> I would love to see such a thing.
I've proposed this on python-dev, but the general feeling so far is
against it. So far the only
Changes in asyncore from 2.3 to 2.4 mean that asyncore.poll() now passes all
the sockets in the map to select.select() to be checked for errors, which is
probably a good thing. If an error occurs, then handle_expt() is called,
which by default logs the error.
asyncore.dispatcher creates nonblocki
Xah Lee wrote:
def myFun(var):
return var+1
globe = 0
globe = myFun(globe)
this is intriguing. How does it work?
not a rhetorical question, but where in the python doc can i read about
it?
The tutorial, presumably, since there is nothing here
that isn't covered by the most basic aspects of Python
It seems unlikely that is the problem, since I can connect from the
client machine to server using JDBC, just not using mySQL client (any
by extension) mysql-python.
--
http://mail.python.org/mailman/listinfo/python-list
Darren Dale wrote:
Generally, I avoid execfile within a function. What's your use case?
There may be a better way to approach this problem...
I am writing a simulation that loads some predefined constants, depending on
the options called by the user. I originally had it set up to parse the
file,
Steve Juranich wrote:
> I'm in the process of writing a few extension types, and there's one
> that I'd sort of like to have getitem, setitem, getslice, setslice
> functionality for.
>
> I've been looking through the docs and how things are done in
> Objects/listobject.c, and it appears tha there
>def myFun(var):
> return var+1
>globe = 0
>globe = myFun(globe)
this is intriguing. How does it work?
not a rhetorical question, but where in the python doc can i read about
it?
thanks.
Xah
[EMAIL PROTECTED]
http://xahlee.org/PageTwo_dir/more.html
--
http://mail.python.org/mailman/listi
Xah Lee wrote:
thanks for the help...
---
the python doc is stilted. It tried to organized the thing and with a
style around some highbrow inane "computer science" outlook.
[usual semi-literate expletive-deleted rant omitted]
And your writing is so lucid and comprehensible, it's a pity
you can
On 8 Mar 2005 17:07:31 -0800, Xah Lee <[EMAIL PROTECTED]> wrote:
> thanks for the help...
>
> ---
> the python doc is stilted. It tried to organized the thing and with a
> style around some highbrow inane "computer science" outlook.
>
> i found the little section on global
> (http://python.or
Fred wrote:
> Hi
> I am writing on an application, that is supposed to read a file into
a
> single string:
> My program though, when I run it, gives me an error, that the called
> file is non existent
> 'C:\ \Documents and Settings\ \Fred\ \My Documents\ \School\ \Bio'
> Is it normal that python a
module os
the os.popen* commands.
On Tuesday 08 March 2005 05:18 pm, M.N.A.Smadi wrote:
> hi;
>
> how can i do the following:
> 1- run a C program from a python script
> 2- pass that C program an argument
> 3- Read the out of the program into a buffer that is local to the script
>
> thanks
> m.s
hi;
how can i do the following:
1- run a C program from a python script
2- pass that C program an argument
3- Read the out of the program into a buffer that is local to the script
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
thanks for the help...
---
the python doc is stilted. It tried to organized the thing and with a
style around some highbrow inane "computer science" outlook.
i found the little section on global
(http://python.org/doc/2.4/ref/global.html)
and can't make out what shit it is trying to say with
> How am I going to stop user from navigating directly to page1?
>
> Answering this question will involve learning about HTTP session state and
> writing web applications. I could write a book on that subject :-)
>
> regards
> Steve
>
Thanks Steve
And yes I havnt thought about that, guess I
> Generally, I avoid execfile within a function. What's your use case?
> There may be a better way to approach this problem...
I am writing a simulation that loads some predefined constants, depending on
the options called by the user. I originally had it set up to parse the
file, and load the c
Steven Bethard wrote:
Delaney, Timothy C (Timothy) wrote:
For those who don't know, these implement a hash set/map which iterates
in the order that the keys were first added to the set/map.
I would love to see such a thing.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
hi...
regarding the issue of creating a login (user/passwd) script... there are
numerous example scripts/apps written that use php/mysql... i suggest that
you take a look at a few and then incoporate the features that you want into
your script.
from your questions, it seems like this approach wil
Darren Dale wrote:
Hi,
I have a variable saved in a file like this
#contents of myfile.py:
testvar = [1,2,3,4]
and I am trying to write a function that does something like this:
def myfunction(filename):
execfile(filename)
print testvar
The problem I am running into is that the glob
Hello Darren,
I am not sure why you are using execfile().
Py> help(execfile)
Help on built-in function execfile:
execfile(...)
execfile(filename[, globals[, locals]])
Read and execute a Python script from a file.
The globals and locals are dictionaries, defaulting to the current
g
Darren Dale wrote:
> def myfunction(filename):
> execfile(filename)
> print testvar
>
> What am I doing wrong?
I'm not familiar enough with execfile or the interactive interpreter to
know what you are doing wrong, but something like:
def myfunction(filename):
ns=dict()
execfi
>
> 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 once (and only once) needed hundreds of variables in a program. It
was to simplify creation of unit tests, not for production us
>
> #
> ## helloWorld.py
> ## assembly hello world script
> #
DOH! The example file got truncated. Here it is.
#
## helloWorld.py
## assembly hello world script
#
fro
Hello Fred,
Backslashes are used as an escape and not just in Python ( consider
'\r\n' )
To use a backslash you must escape it with two of them like this: \\
'c:\\windows\\dir'
or you can use a raw string:
r"c:\windows\dir"
or you can use forward slashes. Yes that works ;)
"c:/windows/dir"
Windows
Pete. wrote:
Hi all I am working on a log in script for my webpage.
I have the username and the password stored in a PostgreSQL database.
The first I do is I make a html form, where the user can type in his
username and code, when this is done I want to run the
script(testifcodeisokay) that v
Michael Hoffman wrote:
Tobiah wrote:
If within the __getitem__ method I attempt
to get an item from self, the __getitem__ method is
called in an infinite recursion.
You need to explicitly use dict.__getitem__(self, key) instead of
using self[key] directly.
or super(bar, self).__getitem__(key)
STeVe
Jorge Godoy wrote:
[EMAIL PROTECTED] writes:
Was doing some string formatting, noticed the following:
x = None
"%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
How would know, then, if there was no value at all or if it was an empty
string?
Well, for that matter, how can
Tobiah wrote:
If within the __getitem__ method I attempt
to get an item from self, the __getitem__ method is
called in an infinite recursion.
You need to explicitly use dict.__getitem__(self, key) instead of
using self[key] directly.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/pyt
Martin MOKREJŠ wrote:
Steve Holden wrote:
[...]
I will be *very* surprised if you can't get a much better (i.e. easier
and more efficient) solution by stepping back from the programming
Hmm, I'm not convinced, but I'll put few more words here then. ;)
details for a moment and explaining what it
The Cookbook features another interesting way to do it:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/204297
--
mvh Björn
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I am writing on an application, that is supposed to read a file into a
single string:
My program though, when I run it, gives me an error, that the called
file is non existent
'C:\ \Documents and Settings\ \Fred\ \My Documents\ \School\ \Bio'
Is it normal that python adds the space and extra ba
#!/usr/bin/python
# Hi,
#
# I noticed something interesting when trying to define
# the __getitem__() method in a class that inherits from
# (dict). If within the __getitem__ method I attempt
# to get an item from self, the __getitem__ method is
# called in an infinite recursion. I am very fond o
Hi,
I have a variable saved in a file like this
#contents of myfile.py:
testvar = [1,2,3,4]
and I am trying to write a function that does something like this:
def myfunction(filename):
execfile(filename)
print testvar
The problem I am running into is that the global name testva
This question applies specifically to RHEL 3.0 (actually Whitebox), but
also generally to Redhat and probably pretty much every distribution
that uses python for distribution-related tasks (configuration
managers, rpm package management, yum, etc).
So I want to upgrade to python 2.4 on Whitebox 3.
PyASM by Grant Olson
=
PyASM is a dynamic x86 assembler for python. By "dynamic", I mean that it
can be used to generate inline assembly functions in python at runtime
without requiring object file generation or linkage.
New in version 0.2
---
Frans Englich wrote:
> This is silly. How do I access data files I've installed with
distutils? In a
> portable, generic way, I want to find out what is the following path
on most
> systems:
>
> /usr/local/lib/python2.4/lib/site-packages/foo/bar.txt
>
> How do I figure out the rest, if I know foo/
Steven Bethard wrote:
> Sounds like a good candidate for the collections module. Of course
> someone will need to implement it. ;)
I'll suggest it to Raymond ... ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Bo Peng 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
Delaney, Timothy C (Timothy) wrote:
This is actually one thing that Java 1.5 has that I'd like to see in
Python - the LinkedHashSet and LinkedHashMap. Very useful data
structures.
For those who don't know, these implement a hash set/map which iterates
in the order that the keys were first added to
Bo Peng wrote:
def func(output=''):
output(output=output)
Another solution that hasn't been mentioned yet:
def func(**kwds):
output(output = kwds['output'])
You might want to do some more checking on the
contents of kwds to make sure it doesn't
contain any other nonsense parameters.
--
Greg
Martin MOKREJŠ wrote:
I need to test almost every for it's content. Some tests
are just that the value is non-empty (few cases), but in most cases
a lot more checks (only certain values allowed, or only int type allowed,
or only \w is allowed ...).
This sounds very much like an opportunity for some
Hi,
I have a problem with a popen2 pipe hanging partway through execution of
a command. This happens in my function executeCommand() that is used
for every "shell" command execution in my program. Source code for this
function is below. My development environment is Debian unstable with
Python
I'm in the process of writing a few extension types, and there's one
that I'd sort of like to have getitem, setitem, getslice, setslice
functionality for.
I've been looking through the docs and how things are done in
Objects/listobject.c, and it appears tha there are a couple of ways to
do it and
Diez B. Roggisch wrote:
> No. But I doubt that that is what you actually want, as listA will
> lose its order afterwards. Typically, something like that gets
> written like this:
This is actually one thing that Java 1.5 has that I'd like to see in
Python - the LinkedHashSet and LinkedHashMap. Ve
Peter,
Agreed... which is why I said the 'random' module should be imported if
more randomness is required.
I only mentioned d.popitem() first in case Tores' application didn't
need a psuedo-random item and instead he was looking to pull any value
without randomness.
--
http://mail.python.org/m
M.N.A.Smadi wrote:
> i want to write a script to do the following:
> when using firefox to download a textfile, instead of saving it to
the
> hard dist, i want to run a python script on it, and i want the python
> script then to prompt me for the location where i want to store the
> processed down
Hi all I am working on a log in script for my webpage.
I have the username and the password stored in a PostgreSQL database.
The first I do is I make a html form, where the user can type in his
username and code, when this is done I want to run the
script(testifcodeisokay) that verifies that th
Thank you very much with your suggestion. I installed the python intepreter from SUSE CD but downloaded the sources of python from the python website. It seems like it created the mismatches here. After I installed the python source rpm from SUSE CD, I was able to pass where I had errors. Jeff Eple
Martin MOKREJŠ wrote:
Basically, doing in a class method
def(self, a, b, c):
self.a = a
self.b = b
self.c = c
sounds stupid. With next instance I'll loose a, b, c, so I have to save
then to a variable, "self." prefix is generally proposed way. But
it's not surprising a gets to self.a, righ
Scott David Daniels wrote:
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
Earl Eiland wrote:
> Anyone know how to capture text from GUI output? I need to process
> information returned via a GUI window.
>
> Earl
Assuming Windows, then these guys have an interesting tool:
http://www.skesoft.com/textcatch.htm
It's not free, but you can try it before you buy it.
You
On 2005-03-09, Caleb Hattingh <[EMAIL PROTECTED]> wrote:
> On Tue, 8 Mar 2005 20:45:22 +0200, ionel <[EMAIL PROTECTED]> wrote:
>
>> i need some pointers. so far i've tryed matplotlib ...
>
> I have had good success with pygnuplot.
I second the recommendation for pygnuplot -- especially if if
you h
Steve Holden wrote:
Martin MOKREJŠ wrote:
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
I ended up using the trick I found in the Disutils Cookbook.
http://www.python.org/moin/DistutilsInstallDataScattered
This works fine for me now, but I have another distutils question.
My package requires Pmw and another home grown package that has a
source dist and a Windows dist built with the
Jorge Godoy wrote:
[EMAIL PROTECTED] writes:
Was doing some string formatting, noticed the following:
x = None
"%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
How would know, then, if there was no value at all or if it was an empty
string?
If you want the other effect, you
hi;
i want to write a script to do the following:
when using firefox to download a textfile, instead of saving it to the
hard dist, i want to run a python script on it, and i want the python
script then to prompt me for the location where i want to store the
processed downloaded file
any help i
Hi Raymond. I appreciate your reply. Yes, this is exactly what I was
looking for. The syntax I had been trying to work out myself was not
correct and not giving me the right thing. Many thanks for your help -
this works just the way I wanted.
David
On Tuesday, March 8, 2005, at 03:46 PM, Raymo
[EMAIL PROTECTED] writes:
> Was doing some string formatting, noticed the following:
>
> >>> x = None
> >>> "%s" % x
> 'None'
>
> Is there a reason it maps to 'None'? I had expected ''.
How would know, then, if there was no value at all or if it was an empty
string?
--
Godoy. <[EMAIL PR
Without your code, it's hard to tell.
Here's a small program I wrote:
import time
t = time.time()
print time.localtime(t - 86400)
print time.localtime(t)
on both lines, the tm_isdst flag is the same.
If I choose two times that are on either side of the DST change in
my timezone,
[EMAIL PROTECTED] wrote:
Was doing some string formatting, noticed the following:
x = None
"%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
Can you explain why you expected that? A few other examples that make
me not expect what you do:
py> '%s' % False
'False'
py> '%s' %
Was doing some string formatting, noticed the following:
>>> x = None
>>> "%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
--
http://mail.python.org/mailman/listinfo/python-list
[David Pratt]
> I am wanting to
> extend this with a better comparison expression so that it would sort
> on one key as primary, a second key as secondary sort , and maybe even
> a third as tertiary.
The simplest approach is to rely on Python's sort being stable. First sort on
the tertiary key, t
Martin MOKREJŠ wrote:
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 th
I have had good success with pygnuplot.
On Tue, 8 Mar 2005 20:45:22 +0200, ionel <[EMAIL PROTECTED]> wrote:
i need some pointers.
so far i've tryed matplotlib ...
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
S?bastien Boisg?rault wrote:
[snip]
> Agreed. Consistency matters. But precisely because Python looks in
> the type of the object (and not the object itself), I don't need to
> explicitely check the type myself: the code adapt =
> getattr(protocol, '__adapt__') will
Hello,
I'm writing a small program that needs to check Unix timestamps for
falling into an interval (typical usage: ./program 2005-03, you get
the idea). Now, I create two time stamps from the user's input to
create the interval's borders using mktime(). Trying to check the sanity
of my program, I
I have been using the following for sorting a list of dictionaries.
This works but only provides sorting on a single key. I am wanting to
extend this with a better comparison expression so that it would sort
on one key as primary, a second key as secondary sort , and maybe even
a third as ter
"Johan Kohler" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
>
> Fair enough. Pretend my question said "compared to apache, but also to
> CGIHTTPServer on linux". The Windows box has modest specs Celeron 2.8GHz,
> 256MB, but it takes 30-60s render pages. I was using it to
i need some pointers.
so far i've tryed matplotlib ...
--
ionel.
--
http://mail.python.org/mailman/listinfo/python-list
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL
PROTECTED]>...
> That's apparently a bug in os.access, which doesn't support Unicode file
> names. As a work around, do
>
> def access(name, mode, orig=os.access):
> try:
> return orig(name, mode)
> except Unic
Rory Campbell-Lange wrote:
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'))
*** WARNING **
Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado
un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo.
AttachmentVirus name Action taken
---
Rod,
This is to confirm the telephone message I left yesterday.
The Introduction to Python is scheduled for 8.0pm this evening
at the Fulford Academy, 280 King Street East.
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
"Coral Snake" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> --
> Tkinter:
>
> from Tkinter import *
> root = Tk()
This creates the application's main window. The Tk() command is not
some kind of initialization routine,
On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <[EMAIL PROTECTED]> wrote:
> 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 screen.
> Similar
I am trying to add a new logging level.
logging.config.fileConfig("bengineLog.cfg")
logging.CLIENT = logging.INFO + 1
logging.addLevelName( logging.CLIENT, 'CLIENT' )
logging.root.setLevel( [logging.INFO, logging.CLIENT, logging.WARNING,
logging.ERROR, logging.CRITICAL] )
logger = logging.getLogge
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
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
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
Thanks!!
--
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
> Will anything else work here?
Use %%
print "%%s %s" % "foo"
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
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
>>
[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
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
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
-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'
1 - 100 of 189 matches
Mail list logo