Thomas Mlynarczyk <[EMAIL PROTECTED]> writes:
> Hello,
>
> I started to write a lexer in Python -- my first attempt to do
> something useful with Python (rather than trying out snippets from
> tutorials). It is not complete yet, but I would like some feedback --
> I'm a Python newbie and it seems
On Sat, 08 Nov 2008 22:53:14 -0800, Kay Schluehr wrote:
>> How often do you care about equality ignoring order for lists
>> containing arbitrary, heterogeneous types?
>
> A few times. Why do you care, Steven?
I'm a very caring kind of guy.
>> In any case, the above doesn't work now, since eith
On 9 Nov., 07:06, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Sat, 08 Nov 2008 20:36:59 -0800, Kay Schluehr wrote:
> > On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> >> Have you written any Python code where you really wanted the old,
> >> unpredictable behavior
indika <[EMAIL PROTECTED]> writes:
> while trying out the sorting method i realized that u can *never*
> insert the sorted data to dict !!!
m1
> {datetime.date(2008, 1, 1): 'b', datetime.date(2008, 1, 3): 'c',
> datetime.date(2008, 1, 2): 'a'}
>
l = sorted(m1.items(), cmp=cmpr) // cmpr i
On Sat, 08 Nov 2008 20:36:59 -0800, Kay Schluehr wrote:
> On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
>> Have you written any Python code where you really wanted the old,
>> unpredictable behavior?
>
> Sure:
>
> if len(L1) == len(L2):
> return sorted(L1) == sorted(L2) # chec
indika wrote:
> Marc 'BlackJack' Rintsch wrote:
> > On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote:
> >
> > > John Machin wrote:
> > >> On Nov 8, 6:06�pm, indika <[EMAIL PROTECTED]> wrote:
> > >> > Or else, I would have expected the datatime.date object has a
> > >> > writeable data member, so
On Sat, Nov 8, 2008 at 9:16 PM, John Smith <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I coded a python script that lets me parse a csv file into html code with a
> certain format, but I would like to replace every "<" and ">" character that
> appears within each column entry of the csv file (they are par
On Nov 8, 10:59 pm, Joe Strout <[EMAIL PROTECTED]> wrote:
> Of course, I've softened my position somewhat, since being shown that
> "call by sharing" is simply a term for call-by-value in the case where
> the values are object references. That clearly does apply to Python
> (as well as other
Hi,
I coded a python script that lets me parse a csv file into html code
with a certain format, but I would like to replace every "<" and ">"
character that appears within each column entry of the csv file (they
are parsed as strings) with the html equivalents of "<" and ">".
example csv fil
On 9 Nov., 05:49, Alex_Gaynor <[EMAIL PROTECTED]> wrote:
> On Nov 8, 11:36 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> > > Have you written any Python code where you really wanted the old,
> > > unpredictable behavior?
>
> > Sur
On Sat, 08 Nov 2008 19:06:14 -0800, walterbyrd wrote:
> On Nov 8, 7:44 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>
>> Define your own ordering if you need to sort incomparable types.
>
> If you starting new, I suppose you can always work around this new
> enhancement. B
On Nov 8, 6:34 pm, "Dog Walker" <[EMAIL PROTECTED]> wrote:
> I need to call a function in a shared object with this signature:
> init_dialog(FILE *input, FILE *output)
> The FILE*'s are to stdin and stdout.
>
> The call from python is libdialog.init_dialog( x, y)
> I need to define x and y so that
On Nov 8, 2008, at 2:38 PM, Terry Reedy wrote:
So if you then insist that Python uses "call by object",
you're actually saying it uses call by value!
Both Joe and you seem to be engaging in the following bit of
sophistry:
"In order for code A to call code B, some information must be
comm
On Nov 8, 11:36 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> > Have you written any Python code where you really wanted the old,
> > unpredictable behavior?
>
> Sure:
>
> if len(L1) == len(L2):
> return sorted(L1) == sorted(L2) # ch
On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Have you written any Python code where you really wanted the old,
> unpredictable behavior?
Sure:
if len(L1) == len(L2):
return sorted(L1) == sorted(L2) # check whether two lists contain
the same elements
else:
return False
It
Marc 'BlackJack' Rintsch wrote:
> On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote:
>
> > John Machin wrote:
> >> On Nov 8, 6:06�pm, indika <[EMAIL PROTECTED]> wrote:
> >> > Or else, I would have expected the datatime.date object has a
> >> > writeable data member, so that iterating a calender wi
walterbyrd wrote:
Guido and the developers changed the behavior of order comparisons, and
hence of sorts, because they agreed, on the basis of person-decades of
experience, with no dissent that I know of, that the new behavior would
be better.
Have you written any Python code where you reall
Steven D'Aprano wrote:
On Sat, 08 Nov 2008 19:02:28 +, Arnaud Delobelle wrote:
And, if so, why are they doing this?
How is it helpful to be able to sort things which have no natural order?
Assuming you need to sort arbitrary types, then you have to choose an
order, even if it is arbitra
On 08Nov2008 19:17, walterbyrd <[EMAIL PROTECTED]> wrote:
| On Nov 8, 12:02 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
| > It goes well with duck typing. It lets you know when you things happen
| > that you don't mean to happen.
|
| But doesn't that also make the language less flexible?
No.
On Nov 8, 12:02 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> It goes well with duck typing. It lets you know when you things happen
> that you don't mean to happen.
But doesn't that also make the language less flexible?
For example, if I used C, I would never have to worry about assigning
On Nov 8, 7:44 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> Define your own ordering if you need to sort incomparable types.
If you starting new, I suppose you can always work around this new
enhancement. But, couldn't this cause a lot of backward compatibility
issues?
Al
basically it is on the ISRs with the AXP module. chk out website at
www.cisco.com/go/thinkinside. blog questions at
blogs.cisco.com/go/innovation
James Mills wrote:
>
> On Fri, Nov 7, 2008 at 7:15 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> This seems of interest to Python developers all
On Sat, 08 Nov 2008 19:02:28 +, Arnaud Delobelle wrote:
>> And, if so, why are they doing this?
>
> How is it helpful to be able to sort things which have no natural order?
Assuming you need to sort arbitrary types, then you have to choose an
order, even if it is arbitrary, so long as it's
On Sat, Nov 8, 2008 at 1:35 PM, azrael <[EMAIL PROTECTED]> wrote:
> whoever I ask, everyone tells me when it come to python and GUI-s and
> that there is the best way to use WX. I am browsing for the 10th time
> during the last year and I can still not bealive that there is not one
> project to mak
I'm working on a wxPython app (well, a Dabo app, but it's basically
the same thing) that presents the user with a selection of several
wxPython apps that exist on their system. They choose one, and I want
to then "launch" that app, as if they had typed "python myapp.py" from
a terminal win
On 8 Nov, 20:35, azrael <[EMAIL PROTECTED]> wrote:
> I am freaking out that I need 5 times more time to make a GUI in
> python than in VB.
I find wxFormBuilder nice to work with. wxPython can use XRC-files
from wxFormBuilder.
Note that wx uses sizers (layout managers). While it makes GUIs a bit
On 2008-11-08, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano wrote:
>> In an attempt to keep this post from hitting the ridiculous length of one
>
>> (Aside: I've learned one thing in this discussion. Despite the number of
>> sources I've read that claim that if you pass an array to a
David Shi <[EMAIL PROTECTED]> wrote:
>
>Hello, there.I am using Python 2.5. I used py_compile and made a .pyc
>file.
Just in case the advice from Terry was too subtle, I'd like to spell it
out. Python scripts do not need to be compiled. The interpreter runs the
.py file directly.
>However, it
[EMAIL PROTECTED] wrote:
>
>Yesterday, I installed PythonCE on my cellphone whose OS is Windows
>Mobile 5.I wanted to use numpy as calculation tool.But after I copy
>numpy module in my desktop computer into my phone,I find many file
>names in directory \numpy were changed into capital letters.For
>
I need to call a function in a shared object with this signature:
init_dialog(FILE *input, FILE *output)
The FILE*'s are to stdin and stdout.
The call from python is libdialog.init_dialog( x, y)
I need to define x and y so that they will have the structure of
sys.stdin and sys.stdout; the called f
After all its "just" maintaining a state and rules for possible transitions.
I've implemented my own web framework (just like every other
Python developer ;-) and I've done my own finite-state-machines
for workflows. Web Frameworks are large, error-prone and have a
lot of nuanced details. W
On Nov 8, 6:29 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
> azrael wrote:
> > whoever I ask, everyone tells me when it come to python and GUI-s and
> > that there is the best way to use WX. I am browsing for the 10th time
> > during the last year and I can still not bealive that there is not one
>
Grzegorz Staniak pisze:
Hi,
In a couple of weeks I'm starting a medium-size project (using a web
framework) involving a workflow implementation. Are you aware of any
open source workflow engines/libraries that I could base the project
on? Google returns hist for GoFlow (Django only, from what
azrael wrote:
whoever I ask, everyone tells me when it come to python and GUI-s and
that there is the best way to use WX. I am browsing for the 10th time
during the last year and I can still not bealive that there is not one
project to make gui-building easy as maybe in VB for python. Each I
trie
I'ma huge fan of qt and pyqt.
http://trolltech.com/products
-Zac
On Nov 8, 2008 11:35am, azrael <[EMAIL PROTECTED]> wrote:
whoever I ask, everyone tells me when it come to python and GUI-s and
that there is the best way to use WX. I am browsing for the 10th time
during the last year and I ca
On Nov 9, 7:55 am, Thomas Mlynarczyk <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I started to write a lexer in Python -- my first attempt to do something
> useful with Python (rather than trying out snippets from tutorials). It
> is not complete yet, but I would like some feedback -- I'm a Python
> new
OS: Solaris 9
Python Version: 2.4.4
I need to log certain data in a worker thread; however, I am getting
an error now when I use two worker threads.
I think the problem comes from the line
logging.info('Thread Object (%d):(%d), Time:%s in seconds %d'%
(self.no,self.duration,time.ctime(),time.time(
On 08.11.2008, Eric Wertman <[EMAIL PROTECTED]> wroted:
>> To be exact, I used the words "engine/library", not "a whole framework".
>> Thanks for the link, I've googled for articles and recipes myself and
>> as I said, I more or less know what to do - I just thought it might be
>> a good idea to as
> To be exact, I used the words "engine/library", not "a whole framework".
> Thanks for the link, I've googled for articles and recipes myself and
> as I said, I more or less know what to do - I just thought it might be
> a good idea to ask whether perhaps the wheel has already been invented.
> App
On 08.11.2008, Stefan Behnel <[EMAIL PROTECTED]> wroted:
In a couple of weeks I'm starting a medium-size project (using a web
framework) involving a workflow implementation. Are you aware of any
open source workflow engines/libraries that I could base the project
on? Google
On Nov 8, 3:38 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> "In order for code A to call code B, some information must be
> communicated from A to B." Something we all know ...
>
> "That information is a value of some sort." True...
>
> "Therefore all calling is calling by value."
>
> Well, yes, i
Steven D'Aprano wrote:
In an attempt to keep this post from hitting the ridiculous length of one
(Aside: I've learned one thing in this discussion. Despite the number of
sources I've read that claim that if you pass an array to a C function
the entire array will be copied, this does not appea
Grzegorz Staniak schrieb:
> On 08.11.2008, Tino Wildenhain <[EMAIL PROTECTED]> wroted:
>
>>> In a couple of weeks I'm starting a medium-size project (using a web
>>> framework) involving a workflow implementation. Are you aware of any
>>> open source workflow engines/libraries that I could base
greg wrote:
Joe Strout wrote:
Something has just occurred to me. If you take the
view that the value of an expression is an object,
then the terms "value" and "object" are synonymous.
Nope. The result of an expression is an object with an id, class, and
'value', where 'value' can include a
Hello,
I started to write a lexer in Python -- my first attempt to do something
useful with Python (rather than trying out snippets from tutorials). It
is not complete yet, but I would like some feedback -- I'm a Python
newbie and it seems that, with Python, there is always a simpler and
bett
On Nov 8, 1:08 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Sat, 08 Nov 2008 18:31:47 +1300, greg wrote:
> There's no "obviously" about it. To anyone who has learned that "call-by-
> value" means that a copy is made, "obviously" it does mean copying the
> value. If yo
On Nov 8, 8:42 am, Joe Strout <[EMAIL PROTECTED]> wrote:
> On Nov 7, 2008, at 6:21 PM, Aaron Brady wrote:
>
> > Therefore objects don't need names to exist. Having a name is
> > sufficient but not necessary to exist. Being in a container is
> > neither necessary -nor- sufficient.
>
> What do you
On Oct 26, 9:01 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> * Jesse (Sat, 25 Oct 2008 14:33:52 -0700 (PDT))
>
> > cant seem to install this, using python 2.6, any known errors that
> > wont let me select the python installation to use, just opens a blank
> > dialog and wont let me continue..do
On 08.11.2008, Tino Wildenhain <[EMAIL PROTECTED]> wroted:
>> In a couple of weeks I'm starting a medium-size project (using a web
>> framework) involving a workflow implementation. Are you aware of any
>> open source workflow engines/libraries that I could base the project
>> on? Google return
whoever I ask, everyone tells me when it come to python and GUI-s and
that there is the best way to use WX. I am browsing for the 10th time
during the last year and I can still not bealive that there is not one
project to make gui-building easy as maybe in VB for python. Each I
tried was a pain in
On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote:
> John Machin wrote:
>> On Nov 8, 6:06�pm, indika <[EMAIL PROTECTED]> wrote:
>> > Or else, I would have expected the datatime.date object has a
>> > writeable data member, so that iterating a calender with
>> > itermonthdates would allow me to acce
walterbyrd <[EMAIL PROTECTED]> writes:
> I have read that in Python 3.0, the following will raise an exception:
>
[2, 1, 'A'].sort()
>
> Will that raise an exception?
Yes. In fact, plenty of objects of different types aren't comparable
anymore.
> And, if so, why are they doing this?
How i
walterbyrd wrote:
> I have read that in Python 3.0, the following will raise an exception:
>
[2, 1, 'A'].sort()
>
> Will that raise an exception?
Yes.
>>> [2, 1, "a"].sort()
Traceback (most recent call last):
File "", line 1, in
TypeError: unorderable types: str() < int()
> And, if s
I have read that in Python 3.0, the following will raise an exception:
>>> [2, 1, 'A'].sort()
Will that raise an exception? And, if so, why are they doing this? How
is this helpful? Is this new "enhancement" Pythonic?
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Nov 05, 2008 at 09:23:02PM EST, Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Chris
> Jones wrote:
>
> > But then I started thinking .. what if for instance I had to scale my
> > effort from my single system to a large "data center" with hundred of
> > hosts .. with differe
Yes, apologies, I overlooked that detail. If using a different version
of the binary, (i.e. 3.0 vs 2.6) you will have to re-compile the
source code.
--
http://mail.python.org/mailman/listinfo/python-list
brianrpsgt1 wrote:
I am attempting to insert data from a HTML form using a .psp script.
I can not find how to link the data that is inserted into the form to
the variables in the .psp script to then insert into the MySQL Insert
statement. I am familiar with PHP, where you would write
$_POST(['fi
indika wrote:
> Hi,
> I'm a newbie to python but have some experience in programming.
> I came across this requirement of using datetime.date objects
> associated with some another object.
> eg. a dictionary containing datetime.date => string
>>>
> {
> datetime.date(2001, 12, 3): 'c',
> datetime.d
I am attempting to insert data from a HTML form using a .psp script.
I can not find how to link the data that is inserted into the form to
the variables in the .psp script to then insert into the MySQL Insert
statement. I am familiar with PHP, where you would write
$_POST(['field']), however I can
Grzegorz Staniak wrote:
Hi,
In a couple of weeks I'm starting a medium-size project (using a web
framework) involving a workflow implementation. Are you aware of any
open source workflow engines/libraries that I could base the project
on? Google returns hist for GoFlow (Django only, from what
John Machin wrote:
> On Nov 8, 6:06�pm, indika <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I'm a newbie to python but have some experience in programming.
>
> So work through the Python tutorial, to find out how it all hangs
> together ... this will be much better than trying to translate
> snippets o
I have a python script that runs fine from the command line or from
within IDLE, but doesn't work through the Vista Task Scheduler.
The script downloads some csv files and then uses pywin32 to combine
the csv files into a single document. When I run it through the task
scheduler, it downloads the
Hi,
In a couple of weeks I'm starting a medium-size project (using a web
framework) involving a workflow implementation. Are you aware of any
open source workflow engines/libraries that I could base the project
on? Google returns hist for GoFlow (Django only, from what I can tell),
itools.workfl
On Nov 7, 2008, at 6:21 PM, Aaron Brady wrote:
Therefore objects don't need names to exist. Having a name is
sufficient but not necessary to exist. Being in a container is
neither necessary -nor- sufficient.
What do you mean? Being in a container isn't necessary, but it
certainly is suffi
Hello!
Out of curiosity and to learn a little bit about the numpy package i've
tryed to implement
a vectorised version of the 'Sieve of Zakiya'.
While the code itself works fine it is astounding for me that the numpy
Version is almost 7 times slower than
the pure python version. I tryed to find
On 2008-11-07 17:32, [EMAIL PROTECTED] wrote:
> Thanks for that excellent pointer!
>
> I was able to do just what you said with
>
> But if my procedure has an insert statement in its midst, it doesn't
> work. The cursor.fetchall() gets an exception.
> Any ideas?
Try this (I haven't checked that
On Nov 8, 1:36 pm, Roy Smith <[EMAIL PROTECTED]> wrote:
> I'm using Python as part of a test fixture for a large (mostly C++)
> software project. We build on a lot of different platforms, but
> Solaris is a special case -- we build on Solaris 8, and then run our
> test suite on Solaris 8, 9, and 1
www.goodplaces4.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 8, 6:21 am, greg <[EMAIL PROTECTED]> wrote:
> Arnaud Delobelle wrote:
> > 'Pass by value' is not relevant to Python as variables do not contain
> > anything.
>
> Where abouts in the phrase "pass by value" does the word
> "contain" appear?
You don't quote enough context for it to appear.
> Y
> I've got some python xmlrpc servers and clients.
> What's the best way to accelerate them?
You mean, fastest?
> xmlrpclib.py attempts to import these modules:
>
> import _xmlrpclib
> import sgmlop
> from xml.parsers import expat
>
> and falls back to defining the SlowParser class.
On Nov 8, 6:06 pm, indika <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm a newbie to python but have some experience in programming.
So work through the Python tutorial, to find out how it all hangs
together ... this will be much better than trying to translate
snippets of language X into Python.
> I ca
> Not sure if this would qualify as a patch, but a workaround that seems
> to be working for me is to change the bash environment's default
> locale setting -- to a value acceptable to py3.
>
> I did this by adding the following line to /etc/profile:
>
> export LC_ALL="en_US.UTF-8"
It's not a pa
On Nov 8, 7:21 pm, pineapple <[EMAIL PROTECTED]> wrote:
> On Nov 8, 12:24 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
>
> > The code you gave works perfectly:
>
> Weird! Doesn't work at all on my system (WinXP, Python 2.5).
>
> > Please post some of the actual code so that we can determine the pr
On Nov 1, 4:40 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
>
> It would be best if a Mac user could propose a patch for that problem
> before the release of Python 3.0.
Not sure if this would qualify as a patch, but a workaround that seems
to be working for me is to change the bash environmen
On Nov 8, 1:02 pm, "Mark Tolonen" <[EMAIL PROTECTED]> wrote:
> Also, you don't need a lambda for this example:
Interestingly, this works - thanks. I'd still like to know why the
other doesn't work, but I suppose at this juncture it isn't worth the
time and energy trying to figure it out
--
ht
On Nov 8, 12:24 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> The code you gave works perfectly:
Weird! Doesn't work at all on my system (WinXP, Python 2.5).
> Please post some of the actual code so that we can determine the problem.
> Taking a guess, I'd suspect Blah and commands are in differ
76 matches
Mail list logo