# I write a quixote demo like this:
equest = get_request()
request.response.set_cookie('usr_name', 'Jim', path='/')
request.response.set_cookie('usr_id', '1', path='/')
#but only usr_name can be setted successfully, and usr_id is none.
Why ? Help me ! Thanks
--
http://mail.python.org/mailman/l
On 2006-06-18 13:20:06, tylertacky write:
>Ok, I'm pretty new to python, so this might be a stupid question. I'm
>trying to write a simple text-based pong clone, and I can't figure out
>how to read key presses to move the paddles. I just need something that
>does the same thing as getch() and kbhit
a <[EMAIL PROTECTED]> wrote:
> thanks for reading
Yah, I got a sandwich there once, it was very large but not all that
good...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ygao <[EMAIL PROTECTED]> wrote:
> when a function or method is called,how can get the module global
> symbol table from which
> it is called,not the module where it is defined(this is easy).
> thanks!
You can play with module inspect, or sys._getframe, but they're meant
essentially for *debuggin
Dean Card <[EMAIL PROTECTED]> wrote:
> I am using minidom to parse a 20,000 line XML file. I have a few instances
> where the number of child nodes of a particular node can be variable in
> number. To access them I am doing something like the following...
>
> xmldoc = minidom.parseString(r)
> r
Ok, I'm pretty new to python, so this might be a stupid question. I'm
trying to write a simple text-based pong clone, and I can't figure out
how to read key presses to move the paddles. I just need something that
does the same thing as getch() and kbhit(). I can't use those because
their windows on
BJörn Lindqvist wrote:
> > Personally, I would like to see macros in Python (actually Logix
> > succeeding is good enough). But I am no language designer and the
> > community has no interest in it. When I absolutely need macros, I will
> > go elsewhere.
>
> One must wonder, when is that? When do
levent wrote:
> Thanks for the answers. Enumerating in reverse is indeed quite a smart
> idea.
>
> The fact is though, I overly simplified the task in the super-hero
> example. In the real case, the dictionary keys are not necessarily the
> indices for inserts; that is to say, the inserts do not n
[EMAIL PROTECTED] wrote:
>
>I tried to follow wxPython Demo examples to understand it better. I
>used wxGlade to generate my code from the GUI builder.
>
>When I try to see the code for Menu and Menubar I see a little mismatch
>in the way functions are being used.
>
>For example, wxGlade produces c
I mean the way not passing parameter to the fonction or the method.
ygao wrote:
> when a function or method is called,how can get the module global
> symbol table from which
> it is called,not the module where it is defined(this is easy).
> thanks!
--
http://mail.python.org/mailman/listinfo/pyt
Serge Orlov wrote:
> Ralph Butler wrote:
>> Hi:
>>
>> I have searched the docs and google but have not totally figured
>> out how to accomplish my task: On a linux box, I want to compile
>> and link python so that it uses no shared libraries, but does support
>> import of some "extra" modules. I
when a function or method is called,how can get the module global
symbol table from which
it is called,not the module where it is defined(this is easy).
thanks!
--
http://mail.python.org/mailman/listinfo/python-list
I am using minidom to parse a 20,000 line XML file. I have a few instances
where the number of child nodes of a particular node can be variable in
number. To access them I am doing something like the following...
xmldoc = minidom.parseString(r)
results = xmldoc.childNodes[0]
for myNode in res
> Personally, I would like to see macros in Python (actually Logix
> succeeding is good enough). But I am no language designer and the
> community has no interest in it. When I absolutely need macros, I will
> go elsewhere.
One must wonder, when is that? When do you absolutely need macros?
--
mv
>> I'd say P.E.R. is terser, going for
>> density and brevity, while the Nutshell is a bit more elaborative
>> on what it covers. The choice between Martelli and Beazley is, I
>> suspect, one of your learning style.
Yes, sometimes Beazley is too terse if you're reading about something
for the fir
Thus spoke Preben Randhol (on 2006-06-17 23:25):
> The code is a very good starting point for me! I already
> managed to change it and I see I need to make it a bit more robust.
I think, the only thing you have to look at - is
the congruence of the regex-based filter rule and the text.
suppose
Update: I found a way to do what I want with RadioButton with option
indicatoron=0 which creates a bunch of what looks like regular buttons
except that when one is pressed the other one is depressed and the
value of the same variable is changed.
Thanks dear me.
[EMAIL PROTECTED] wrote:
> Hi, I'd
Hi, I'd like to create buttons on the fly that will call the same
function, and the function in question has to know what was the name of
the button that called it. Unless there is a preferred way for doing
this.. Perhaps creating a new function on the fly along with the new
button? Please help.. t
Hi,
I'm sorry, but you have a conceptual error there. Text files differ
from binary files because they are not considered raw. When you say
that this or that file is a text file, python and/or the operating
system takes the liberty to insert and or remove semantics from the
file, according to so
Roel Schroeven wrote:
> ... But what I meant was not related to interface compatibilities, but to
> the performance of the generated code: many people say that the code
> generated by gcc is not as well optimized as code generated by
> Microsoft's compilers. Yet I never hear complaints about tha
Ralph Butler wrote:
> Hi:
>
> I have searched the docs and google but have not totally figured
> out how to accomplish my task: On a linux box, I want to compile
> and link python so that it uses no shared libraries, but does support
> import of some "extra" modules. I have made a few attempts bu
[EMAIL PROTECTED] wrote:
> I found a way to create "Open File" or "Open Folder" windows dialog
> boxes, but not to create an easier Yes / No dialog box...
> Maybe someone has a solution for this?
Assuming you are on MS Windows.
import win32api, win32con
win32api.MessageBox(0, "Question", "Title",
Claudio Grondi wrote:
> [EMAIL PROTECTED] wrote:
>> I found a way to create "Open File" or "Open Folder" windows dialog
>> boxes, but not to create an easier Yes / No dialog box...
>> Maybe someone has a solution for this?
I've never seen "easier" way to do it, but my solution for you if you
want
Hi:
I have searched the docs and google but have not totally figured
out how to accomplish my task: On a linux box, I want to compile
and link python so that it uses no shared libraries, but does support
import of some "extra" modules. I have made a few attempts but
with limited success. In par
[EMAIL PROTECTED] wrote:
> I found a way to create "Open File" or "Open Folder" windows dialog
> boxes, but not to create an easier Yes / No dialog box...
> Maybe someone has a solution for this?
>
Do it just the same way as you did it with the "Open File" or "Open
Folder" windows dialog. What is
I found a way to create "Open File" or "Open Folder" windows dialog
boxes, but not to create an easier Yes / No dialog box...
Maybe someone has a solution for this?
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I'm a tad confused over a problem involving cycles between
packages.
Assume the following sets of files::
driver.py
a/__init__.py
a/alice.py
b/__init__.py
b/bob.py
Basically, two packages a and b. Driver simply imports one of the
two. This is the file that gets run::
, (driv
On Sat, 17 Jun 2006 14:20:44 +0200
Mirco Wahab <[EMAIL PROTECTED]> wrote:
> Thus spoke Mirco Wahab (on 2006-06-16 21:21):
>
> > I used your example just to try that in python
> > (i have to improve my python skills), but waved
> > the white flag after realizing that there's no
> > easy string/var
Thus spoke Sybren Stuvel (on 2006-06-17 22:01):
> Rune Strand enlightened us with:
>> But back on university, I met a very, very pretty C++ girl who said
>> many favourable things about Python.
>
> Rr a very, very pretty girl that likes C++ and Python.
> Does it get better?
It does:
http://
>
> Cream is a package built on top of vim that presents a more "Windows
> friendly" face to the vim/gvim editor.
Cool thanks, I'll check it out.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
You can post your message on fr.comp.lang.python
Bon voyage en France !
@-salutations
--
Michel Claveau
sites : http://mclaveau.com http://bergoiata.org http://ponx.org
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> On Sat, 17 Jun 2006 11:46:29 -0600, Jeffrey Barish
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> I start. Is there a way to do this on Windows?
>
> There is no safe, easy, way to reliably kill a program on Windows...
>
> Hmmm, there's o
[EMAIL PROTECTED] wrote:
> Bottom Line: As I said before, I don't have a problem using VC2003 or
> anything. It's by far the cheapest and easiest way just to buy VC2003
> and be done with it, than to fiddle around with GCC or anything. I just
> think that Python should use the best technology avail
Anton Vredegoor wrote:
> With the inclusion of ElementTree (an XML-parser) in Python25 and recent
> developments concerning JSON (a very Pythonesque but somewhat limited
> XML notation scheme, let's call it statically typed XML) Python seems to
> have reached a stage where it now seems to be possi
In 2002, I was in need of a multi-platform language. My choice became
Python, in spite of friends fiercly defending Perl and some interesting
Slashdot-articles on Ruby. But back on university, I met a very, very
pretty C++ girl who said many favourable things about Python. She never
became mine, bu
Paddy wrote:
> Anton Vredegoor wrote:
> > With the inclusion of ElementTree (an XML-parser) in Python25 and recent
> > developments concerning JSON (a very Pythonesque but somewhat limited
> > XML notation scheme, let's call it statically typed XML)
> >
> > Your thoughts please.
> >
> > Anton
>
>
[EMAIL PROTECTED] wrote:
> int
> set_all(PyObject *target, PyObject *item)
> {
> int i, n;
>
> n = PyObject_Length(target);
> if (n < 0)
> return -1;
> for (i = 0; i < n; i++) {
> if (PyObject_SetItem(target, i, item) < 0)
> return -1;
> }
> retu
[EMAIL PROTECTED]
> I would think everytime you add an item to a list you must increase
> reference count of that item.
_Someone_ needs to. When the function called to add the item does the
incref itself, then it would be wrong for the caller to also incref
the item.
> http://docs.python.org/api
I would think everytime you add an item to a list you must increase
reference count of that
item.
http://docs.python.org/api/refcountDetails.html has an example that
seems to contradict that
int
set_all(PyObject *target, PyObject *item)
{
int i, n;
n = PyObject_Length(target);
if
Scott David Daniels schreef:
> Roel Schroeven wrote:
>> Isn't Python for other platforms built with GCC? Seems to me that if it
>> GCC is good enough for other platforms, it's good enough for Windows.
>
> You clearly misunderstand the interface to the Windows OS & GUI system.
Very well possible.
Roel Schroeven wrote:
> Isn't Python for other platforms built with GCC? Seems to me that if it
> GCC is good enough for other platforms, it's good enough for Windows.
You clearly misunderstand the interface to the Windows OS & GUI system.
Microsoft provides that interface through its language sy
Anton Vredegoor wrote:
> With the inclusion of ElementTree (an XML-parser) in Python25 and recent
> developments concerning JSON (a very Pythonesque but somewhat limited
> XML notation scheme, let's call it statically typed XML)
> Your thoughts please.
>
> Anton
Hi Anton.
If you mean this JSON: h
>
> Solution: only use binary files, and do the newline-translation yourself
> if needed.
>
> Diez
The probelm is if I can't use only binary files...
How can I do the newline-translation myself ? if check the text and
found the diferrence between binary and text is the '\r' instead of
'\'n' . I ca
I have an application that has been working fine on Linux, but now I need to
port it to Windows XP. The program uses Popen3 to run another program. I
use Popen3 so that I can access the pid attribute, which I use to kill the
auxiliary program when necessary. Popen3 does not exist on Windows. I
On 2006-06-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> a wrote:
>> thanks for reading
>
> Their bread is awful.
At least they actually slice it now. Around here they used to
just cut a shallow V-shaped notch in the top.
--
Grant Edwards grante Yow! ... th
John Salerno wrote:
(snip)
> So out of curiosity, I'm just wondering how everyone else came to learn
> it. If you feel like responding, I'll ask my questions for easy quoting:
>
> Did you have to learn it for a job?
It has never been an official requirement for any of the jobs I got
since I'm a
Hi 63q2o4i02 :-)
Cream is a package built on top of vim that presents a more "Windows
friendly" face to the vim/gvim editor.
It is avaiable for Windows and Linux and might give you a single editor
that you can use on more platforms, but maybe you might like the
interface better.
It does syntax hi
a wrote:
> thanks for reading
Their bread is awful.
--
http://mail.python.org/mailman/listinfo/python-list
Mike Duffy wrote:
> I just recently realized that the comparison operator "is" actually
> works for comparing numeric values.
It's only an implementation detail of CPython (and is only true for
small integers - you'll find the limit in the CPython source code), not
part of the language specificati
a wrote:
> thanks for reading
>
Too long experience with Paris (France) subway... Left Paris, feel
better now !-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/pyt
Anton Vredegoor wrote:
> With the inclusion of ElementTree (an XML-parser) in Python25 and recent
> developments concerning JSON (a very Pythonesque but somewhat limited
> XML notation scheme, let's call it statically typed XML) Python seems to
> have reached a stage where it now seems to be possib
a wrote:
> thanks for reading
Yah, the mass transit systems are, um, challenging but workable in many
US cities. Canada's much better
BUT the Subway framework that's not developed anymore had a dev mailing
list:
http://groups.google.com/group/subway-devel
Google for "subway web framework". An
Martin,
Martin v. Löwis wrote:
> > * In a professional environment, it opens up another can of potential
> > problems, where one would rather like to stay with one single
> > compiler/build system.
> That's a theoretic argument to me: Can you name four or five problems
> out of that can?
In bigge
Scott David Daniels:
> John Salerno wrote:
>> I was reading in the wxPython wiki that most of the time you don't have
>> to include the id parameter at all, and you can just use keyword
>> arguments for other parameters. But I'm having trouble converting this
>> code into that method (i.e., with
[EMAIL PROTECTED] wrote:
> ValueError: Input strings must be a multiple of 16 in length
As James Stroud noted, a CBC mode cipher is still a block cipher, and
the input *must* be a multiple of the block size.
OpenSSL provides a standard padding mechanism so that there are no input
size limitations
On 2006-06-17 07:03:19 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said:
> I don't see static checking and explorative programming as opposites.
> Of course, in practice, environments that combine these don't seem to
> exist (except maybe in experimental or little-known state).
Right. Unfortuna
With the inclusion of ElementTree (an XML-parser) in Python25 and recent
developments concerning JSON (a very Pythonesque but somewhat limited
XML notation scheme, let's call it statically typed XML) Python seems to
have reached a stage where it now seems to be possible to completely
swallow le
> I will try to work through Tim's response. I tried using it
> yesterday but I was really confused on what I was doing.
I'll put my plug in for entering the code directly at the shell
prompt while you're trying to grok new code or toy with an idea.
It makes it much easier to see what is going
Thus spoke Mirco Wahab (on 2006-06-16 21:21):
> I used your example just to try that in python
> (i have to improve my python skills), but waved
> the white flag after realizing that there's no
> easy string/var-into-string interpolation.
I did another try on it, using all my Python
resources ava
The berlin subway is great - especially during the worldcup the sheer amount
of people from all over the world makes things interesting.
HTH,
Diez
--
http://mail.python.org/mailman/listinfo/python-list
robert wrote:
> hmm, yet msvcrt4 is obviously preinstalled on each Windows - and its in
> Windows Update Process. Its tagged: "4.20 - OS use only. DO NOT
> DISTRIBUTE")
> Think, in principle its possible to compile against that with
> VS2003/2005... ?
> ( think msvcrt4 is not delivered extra even
Raffael Cavallaro schrieb:
> On 2006-06-16 17:59:07 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said:
>
>> I think it's easier to start with a good (!) statically-typed language
>> and relax the checking, than to start with a dynamically-typed one and
>> add static checks.
>
> This is purely a
Dave Cook wrote:
> On 2006-06-17, nate <[EMAIL PROTECTED]> wrote:
>> reading Learning Python 2nd edition by O'Reilly. I am enjoying it at the
> I'd get the Python Cookbook, next.
There's a jump. The Cookbook is quite advanced. I'd write code next.
Then, I'd read through the docs for all the pr
Tim Chase wrote:
| > No need to argue. I started with vim, and finally switched to
| > emacs less than one year later.
|
| Both are very-much-so good editors. I made the opposite switch
| from emacs to vim in less than a year. Both are good^Wgreat
| editors, so one's decision to use one over the
[EMAIL PROTECTED] schreef:
> * The code created by the Windows GCC is not as good as the one created
> by the Microsoft compiler
Isn't Python for other platforms built with GCC? Seems to me that if it
GCC is good enough for other platforms, it's good enough for Windows.
--
If I have been able t
Does messing with signal handlers and longjmp affect Python
interpreter?
I'm trying to find solution for problem, described in
http://groups.google.com/group/comp.lang.python/browse_thread/thread/98cbae94ca4beefb/9d4d96fd0dd9fbc3
and came up with test application. It works well but i'm not sure it
Mike Duffy wrote:
> Ahh, thank you. That explains why Fredrick's and Jean-Paul's example
> did not work, but mine did (I was using *small* integers).
"small integers" is what the phrase "small integers" in the "small
integers" and "small integers" parts of my reply referred too, of course.
--
Istvan Albert wrote:
> Scott David Daniels wrote:
>
> > To paraphrase someone else (their identity lost in my mental fog) about
> > learning VI:
> > "The two weeks you'll spend hating vi (or vim) as you learn it will
> > be repaid in another month, ad the rest is pure profit."
>
> Time
thanks for reading
--
http://mail.python.org/mailman/listinfo/python-list
Gary Herron wrote:
>
> >>> 100 is (99+1)
> False
>
> >>> 2 is (1+1)
> True
>
> >>> 100 is 100
> True
>
> This is highly implementation dependent. The current (C) implementation
> of Python has a cache for small integers, so the attempt to compare
> values with "is" works for some small integers, an
In <[EMAIL PROTECTED]>, levent wrote:
> I think I was thinking more of a linked-list idea, where you do not
> store the indices as integers to some random access array but rather as
> pointers into list's nodes. Then the subsequent inserts would not hurt
> previously stored pointers. For those who
Hi guys,
sorry for this _very_ off-topic message.
I'll be in Paris, France next week and I thought someone there might be
interested to exchange this http://www.python.com.ar/moin/Remeras
T-shirt (size M) with me? I'd really like to take home a py-french (or
wherever) one instead.
Thanks and s
Mike Duffy wrote:
>> writing broken code is never a good practice.
>>
> With all due respect, for some reason it seems to work on my machine.
if you always work with 5-item sequences, you don't need the test at all.
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-06-17, nate <[EMAIL PROTECTED]> wrote:
> reading Learning Python 2nd edition by O'Reilly. I am enjoying it at the
I'd get the Python Cookbook, next.
Dave Cook
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
>
> except that it doesn't work.
>
> writing broken code is never a good practice.
>
With all due respect, for some reason it seems to work on my machine.
Because I certainly agree with you about writing broken code.
Python 2.4.2 (#1, Jan 17 2006, 16:52:02)
[GCC 4.0.0 20041026
levent wrote:
> Thanks for the answers. Enumerating in reverse is indeed quite a smart
> idea.
>
> The fact is though, I overly simplified the task in the super-hero
> example. In the real case, the dictionary keys are not necessarily the
> indices for inserts; that is to say, the inserts do not
Martin v. Löwis wrote:
> robert wrote:
>
> codecs are in python24.dll, mscvr71, mfc71 and all are not.
> However, they are not in core - the operating system demand-pages code,
> loading into core memory only what is being used. So if you don't use
> the codecs, they are not loaded into core.
>
Jean-Paul Calderone wrote:
> On 17 Jun 2006 00:49:51 -0700, Mike Duffy <[EMAIL PROTECTED]> wrote:
>
>> I just recently realized that the comparison operator "is" actually
>> works for comparing numeric values. Now, I know that its intended use
>> is for testing object identity, but I have used i
Mike Duffy wrote:
> I just recently realized that the comparison operator "is" actually
> works for comparing numeric values.
except that it doesn't work.
> Now, I know that its intended use is for testing object identity, but
> I have used it for a few other things, such as type checking, and
Fredrik Lundh wrote:
>> I see that the page says: """ This problem may occur when you use
>> the /GR and the /MD compiler switches """
>
> hint 1: the use of "may" in that sentence is intentional.
This is the only, real, answer/solution that I found on internet, so I
thought that was the problem
On 17 Jun 2006 00:49:51 -0700, Mike Duffy <[EMAIL PROTECTED]> wrote:
>I just recently realized that the comparison operator "is" actually
>works for comparing numeric values. Now, I know that its intended use
>is for testing object identity, but I have used it for a few other
>things, such as type
I just recently realized that the comparison operator "is" actually
works for comparing numeric values. Now, I know that its intended use
is for testing object identity, but I have used it for a few other
things, such as type checking, and I was just wondering whether or not
it is considered bad pr
Chris Lambacher wrote:
> On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote:
>> Hi list, just found in this moment that my applications stop to
>> work with win xp and receive this error:
>>
>> """ This application has requested the Runtime to terminate it in
>> an unusual way. Pleas
Thanks for the answers. Enumerating in reverse is indeed quite a smart
idea.
The fact is though, I overly simplified the task in the super-hero
example. In the real case, the dictionary keys are not necessarily the
indices for inserts; that is to say, the inserts do not necessarily
take place in s
84 matches
Mail list logo