En Mon, 14 May 2007 12:35:16 -0300, elventear <[EMAIL PROTECTED]>
escribió:
> Since I am defining a hash for my object, it makes sense that I should
> be able to define equality. But I am not sure about inequality, in my
> specific case. The paragraph above mentions that __cmp__ should be
> defi
On May 14, 1:20 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
> Dicts first compare hashes and if they are equal, then check equality. If
> two unequal strings have the same hash value, as is possible of course
> (given only 2**32 possible hashes and many more possible strings), both can
> still
On May 14, 2:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
>
> Dicts and sets use the key's hash value to determine the "bucket" where
> the key will be placed, and == to distingish between different objects
> with the same hash value.
> That is, you should define __hash__ and one of (_
On 2007-05-14, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch schrieb:
>> In <[EMAIL PROTECTED]>, Michel Claveau
>> wrote:
>>
>>> And Il1 O0 ?
>>
>> Hm, we should ban digits from identifier names. :-)
>
> Ah, good idea - and capital letters also. After all, they are
> rare
On Mon, 14 May 2007 20:56:20 +
Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to track the cpu usage of a couple of
> programs using python. Maybe it works somehow with
> piping 'top' to python read the cpu load for a greped
> application and clocking th
On 2007-05-14, Michael Yanowitz <[EMAIL PROTECTED]> wrote:
> Let me guess - the next step will be to restrict the identifiers
> to be at most 6 characters long.
Of course. If they're any longer than that then you can't fit
an entire identifier into a 26-bit CDC 6600 machine register so
you can do
On 2007-05-14, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Mon, 14 May 2007 11:27:35 -0300, HMS Surprise <[EMAIL PROTECTED]>
> escribió:
>
>> On May 14, 9:22 am, HMS Surprise <[EMAIL PROTECTED]> wrote:
>>
>> Oops +=1, should be:
>> hrMn[0] = int(hrMn[0]
>> if t[2] == 'PM':
>> hrMn[0]
On 2007-05-14, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-05-14, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> En Mon, 14 May 2007 11:27:35 -0300, HMS Surprise <[EMAIL PROTECTED]>
>> escribió:
>>
>>> On May 14, 9:22 am, HMS Surprise <[EMAIL PROTECTED]> wrote:
>>>
>>> Oops +=1, should be
On 2007-05-14, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-05-14, Michael Yanowitz <[EMAIL PROTECTED]> wrote:
>
>> Let me guess - the next step will be to restrict the identifiers
>> to be at most 6 characters long.
>
> Of course. If they're any longer than that then you can't fit
> an entir
[EMAIL PROTECTED] wrote:
> I see. I figured that list comprehensions made another list(duh), but
> I thought I could relink the object(List) to the new list and keep it
> once the function ended.
>
> Is it possible to pass a reference(to an object.. Like 'List',
> basically) to a function and chan
Hi!
- should non-ASCII identifiers be supported? why?
- would you use them if it was possible to do so? in what cases?
Yes.
JScript can use letters with accents in identifiers
XML (1.1) can use letters with accents in tags
C# can use letters with accents in variables
SQL: MySQL/MS-Sql/Oralcle/
hello,
I want to find all files with the extension "*.txt".
From the examples in "Learning Python, Lutz and Asher" and
from the website I see examples where you also may specify a wildcard filegroup.
But when I try this
files = os.listdir('D:\\akto_yk\\yk_controle\\*.txt')
I get an error mes
On May 14, 4:09 pm, Stef Mientki <[EMAIL PROTECTED]>
wrote:
> hello,
>
> I want to find all files with the extension "*.txt".
> From the examples in "Learning Python, Lutz and Asher" and
> from the website I see examples where you also may specify a wildcard
> filegroup.
>
> But when I try this
>
Arnaud Delobelle wrote:
> I'm interested! I was tempted to have a go at it after your
> initial post, it sounded like a nice little project :)
Here you go, see below (quite long). It works from Python 2.5
and above and should be straightly executable from command line.
(It'll work with lower Pyt
On May 14, 9:49 pm, Méta-MCI <[EMAIL PROTECTED]> wrote:
> Hi!
>
> - should non-ASCII identifiers be supported? why?
> - would you use them if it was possible to do so? in what cases?
>
> Yes.
>
> JScript can use letters with accents in identifiers
> XML (1.1) can use letters with accents in tags
Hi!
>>> I suspect that's there's some invisible character in the file
No ; because I reproduce the problem, on another CPU, with typing from
scratch.
>>> I can't reproduce this -- Python 2.5.1, Windows XP Pro SP2
I'm sorry. Perhaps my "french" windows is a co-factor?
Perhaps my locale has Or
What's the customary way to keep your own local Python and package
directory? For example, when you're on a server where you don't have
root access, and everything must go in your home directory.
* What directories do you create?
* What environment variables do you set?
* What config files do you
On May 14, 12:01 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I have created a button widget with a button click binding. The button
> > initially has a state=disabled. I can see the greyed out version of
> > the button in the GUI. But If I click on the button it still
On May 14, 4:46 am, andrea <[EMAIL PROTECTED]> wrote:
> On 12 Mag, 01:09, [EMAIL PROTECTED] wrote:
>
>
>
> > On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote:
>
> > > Hi everyone,
> > > I use python on macosx with textmate as editor (great program).
>
> > > I also use macport to install unix pr
En Mon, 14 May 2007 16:20:27 -0300, Grant Edwards <[EMAIL PROTECTED]>
escribió:
On May 14, 9:22 am, HMS Surprise <[EMAIL PROTECTED]> wrote:
Oops +=1, should be:
hrMn[0] = int(hrMn[0]
if t[2] == 'PM':
hrMn[0] += 12
Need more starter fluid, coffee ple
On 13 Maj, 08:45, Peter Otten <[EMAIL PROTECTED]> wrote:
> Thomas Jansson wrote:
> > Dear all
>
> > I am writing a program with tkinter where I have to create a lot of
> > checkbuttons. They should have the same format but should have
> > different names. My intention is to run the functions and th
Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
> Hi,
>I would like to track the cpu usage of a couple of
>programs using python. Maybe it works somehow with
>piping 'top' to python read the cpu load for a greped
>application and clocking the the first and last
>appearence. Is t
Hi!
;-)))
In whitespace-programming-language, only three characters are used :
Space - Tab - RC
No parasitic characters in listings ; economy of ink ; ecological
behavior ; LOL programming...
Must, Python, follow this way?
--
@-salutations
Michel Claveau
--
http://mail.python.org/m
Stef Mientki wrote:
hello,
I want to find all files with the extension "*.txt".
From the examples in "Learning Python, Lutz and Asher" and
from the website I see examples where you also may specify a wildcard filegroup.
But when I try this
files = os.listdir('D:\\akto_yk\\yk_controle\\*.txt
timw.google wrote:
> On May 14, 4:09 pm, Stef Mientki <[EMAIL PROTECTED]>
> wrote:
>> hello,
>>
>> I want to find all files with the extension "*.txt".
>> From the examples in "Learning Python, Lutz and Asher" and
>> from the website I see examples where you also may specify a wildcard
>> filegro
Hi!
> You want the glob module
Warning: glob has "unix like behavior"; just a little different with
windows's DIR
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
En Mon, 14 May 2007 17:46:32 -0300, <[EMAIL PROTECTED]> escribió:
> On May 14, 12:01 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>> > b=Button(frame, text = "Button", state = 'disabled')
>> > b.bind("",
>> > lambda
>> > ev
En Mon, 14 May 2007 18:24:23 -0300, Stef Mientki
<[EMAIL PROTECTED]> escribió:
>>>files = os.listdir('D:\\akto_yk\\yk_controle\\*.txt')
>>>
>>> I get an error message
>>>
>>>WindowsError: [Errno 123] The filename, directory name, or volume
>>> label syntax is incorrect:
>>>'D:\
I'm trying to map a security_context_t ** to a python list. After
calling the method that returns this type when I process the returned
list in a for loop I get:
TypeError: expected string or Unicode object, NoneType found
after processing the last list entry. Can anyone see what I'm doing
wrong? D
Michel Claveau wrote:
> Hi!
>
>
>> You want the glob module
>
> Warning: glob has "unix like behavior"; just a little different with
> windows's DIR
Don't know the details of "Unix"
but I thought "unix" was case-sensitive,
and glob.glob doesn't seem to be,
at least not on windows systems ;-)
The case sensitivity has to do with the OS you're on. So, using glob
from Un*x is case sensitive, but from Windows it isn't.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Stef Mientki
Sent: Monday, May 14, 2007 3:39 PM
To: python-list@python.org
Subje
I'm writing a C++ application with an embedded Python interpreter.
Command text is captured and passed to the interpreter a single line
at a time. My question is this: is there a simple way of determining
whether a given input line of text will cause the prompt to change
from the regular ">>>" to t
[EMAIL PROTECTED] wrote:
> What's the customary way to keep your own local Python and package
> directory? For example, when you're on a server where you don't have
> root access, and everything must go in your home directory.
>
> * What directories do you create?
> * What environment variables do
Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Sun, 13 May 2007 18:41:16 -0300, Sick Monkey <[EMAIL PROTECTED]>
> escribi?:
>> If anyone has a simpler way of checking to see if
>> a file already exists (prior to uploading to a server) and renaming it,
>> please let me know.
> I will ignore t
> In <[EMAIL PROTECTED]>, Nick Craig-Wood
> wrote:
>
>> My initial reaction is that it would be cool to use all those great
>> symbols. A variable called OHM etc!
>
> This is a nice candidate for homoglyph confusion. There's the Greek
> letter omega (U+03A9) Ω and the SI unit symbol (U+2126) Ω,
>
> Do you mean 12 Noon or 12 Midnight? 12AM and 12PM don't exist,
> do they?
>
>>> t = (2007, 5, 14, 12, 0,0,0,0,0)
>>> strftime('%p', t)
'PM'
>>> t = (2007, 5, 14, 0,0,0,0,0,0)
>>> strftime('%p', t)
'AM'
>>>
--
http://mail.python.org/mailman/listinfo/python-list
You'd think that using things like gettext would be easy. Superficially
it seems well documented in the Library Reference(*). However, it can
be surprisingly difficult to get the external details right.
* http://docs.python.org/lib/node738.html
Here's what I finally came up with a
> Not providing an explicit listing of allowed characters is inexcusable
> sloppiness.
That is a deliberate part of the specification. It is intentional that
it does *not* specify a precise list, but instead defers that list
to the version of the Unicode standard used (in the unicodedata
module).
On May 14, 9:32 am, Erin <[EMAIL PROTECTED]> wrote:
> Does anyone have experience developing deployment scripts with Jython?
csound blue is open source and uses jython, .. I don't have the url
on me though
http://www.stormpages.com/edexter/csound.html
--
http://mail.python.org/mailman/listinfo
Snippet 1 below doesn't do much but works (more code is inserted by a
generator). In the next to last line the class name is also used as
argument. I have seen this construct before and have had error
messages tell me that the name is expected. Why is this so? In snippet
2 that I concocted is not r
Hi,
I want to give a short presentation in my group about benefits of
python, why should one use python and some basic starting information
about python, about its data type, etc.
Can somebody point me to the right references on the web. I have
searched a lot and I do get quite a few but I though
Neil Hodgson schrieb:
> Paul Rubin wrote:
>>> Plenty of programming languages already support unicode identifiers,
>>
>> Could you name a few? Thanks.
>
>C#, Java, Ecmascript, Visual Basic.
Specification-wise, C99 and C++98 also support Unicode identifiers,
although many compilers still don
Martin v. Löwis:
> Specification-wise, C99 and C++98 also support Unicode identifiers,
> although many compilers still don't.
Ada 2005 allows Unicode identifiers and even includes the constant
'π' in Ada.Numerics.
Neil
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have created a button widget with a button click binding. The button
> initially has a state=disabled. I can see the greyed out version of
> the button in the GUI. But If I click on the button it still invokes
> the callback/binding function.
>
> Any suggestions as to
Krypto wrote:
> Hi,
>
> I want to give a short presentation in my group about benefits of
> python, why should one use python and some basic starting information
> about python, about its data type, etc.
>
> Can somebody point me to the right references on the web. I have
> searched a lot and I d
On May 14, 6:00 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> [snip], but on *nix,
> you can compile python with the "--prefix=" option set to a directory in
> your home dir and install there.
Check.
> I recommend having your own python install if you want a comprehensi
James T. Dennis <[EMAIL PROTECTED]> wrote:
... just to follow-up my own posting --- as gauche as that is:
> You'd think that using things like gettext would be easy. Superficially
> it seems well documented in the Library Reference(*). However, it can
> be surprisingly difficult to get the ext
On Mon, 2007-05-14 at 11:41 -0700, [EMAIL PROTECTED] wrote:
> On May 13, 8:24 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
> > On Sat, 12 May 2007 21:50:12 -0700, [EMAIL PROTECTED] wrote:
> > >> >
> > >> > "if arg==True" tests whether the object known as arg is equal to the
> > >> > object kno
Stefan Behnel <[EMAIL PROTECTED]> writes:
> But then, where's the problem? Just stick to accepting only patches that are
> plain ASCII *for your particular project*.
There is no feature that has ever been proposed for Python, that cannot
be supported with this argument. If you don't like having
I'm trying to figure out why Popen captures the stderr of a specific
command when it runs through the shell but not without it. IOW:
cmd = [my_exe, arg1, arg2, ..., argN]
if 1: # this captures both stdout and stderr as expected
pipe = Popen(' '.join(cmd), shell=True, stderr=PIPE, stdout=PIPE)
On Mon, 14 May 2007 09:49:56 -0700, Thomas Nelson wrote:
> The thing is that [x for x in List[1:]...] is a brand new list created
> by iterating over the old one.
> How about:
> qSortHelp(List):
> newlist = qSort(List)
> for i, val in enumerate(newlist):
> List[i] = val
> You have
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> walterbyrd a ?crit :
>> With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax
>> and non-Ajax solutions abound.
>> With Python, finding such library, or apps. seems to be much more
>> difficult to find.
>> I thought django might be
En Mon, 14 May 2007 18:50:35 -0300, <[EMAIL PROTECTED]> escribió:
> I'm writing a C++ application with an embedded Python interpreter.
> Command text is captured and passed to the interpreter a single line
> at a time. My question is this: is there a simple way of determining
> whether a given inp
En Mon, 14 May 2007 19:34:52 -0300, HMS Surprise <[EMAIL PROTECTED]>
escribió:
> Snippet 1 below doesn't do much but works (more code is inserted by a
> generator). In the next to last line the class name is also used as
> argument. I have seen this construct before and have had error
> messages
On May 14, 8:10?pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Mon, 2007-05-14 at 11:41 -0700, [EMAIL PROTECTED] wrote:
> > On May 13, 8:24 am, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
> > > On Sat, 12 May 2007 21:50:12 -0700, [EMAIL PROTECTED] wrote:
> > > >> >
> > > >> > "if arg==True"
On May 15, 5:35 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Mon, 14 May 2007 09:49:56 -0700, Thomas Nelson wrote:
> > The thing is that [x for x in List[1:]...] is a brand new list created
> > by iterating over the old one.
> > How about:
> > qSortHelp(List):
> > newlist = qSort(List)
>
Hi
I'd like to write a generator in C, callable from Python.
The only way to create a generator object I can see, is using
PyGen_New(frame) - and a frame object implies Python code, right? holding
global state and local variables and stack and a lot of stuff, so perhaps
there is no (easy) wa
On May 14, 9:55 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> I feel I'm out of luck, but if someone could point some way to write a
> generator in C, I'be very grateful!
Perhaps the code in the itertools module will provide a good example
-- they behave like generators in many respects e
Neil Hodgson wrote:
> Ada 2005 allows Unicode identifiers and even includes the constant
> '?' in Ada.Numerics.
this. is. cool.
(oh, and +1 for the pep)
--
Under construction
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 15 May 2007 02:48:47 +0200, Irmen de Jong wrote:
> Krypto wrote:
>> Hi,
>>
>> I want to give a short presentation in my group about benefits of
>> python, why should one use python and some basic starting information
>> about python, about its data type, etc.
>>
>> Can somebody point me
I've written a script using ClientForm to automate opening and closing
ports on my Linksys router. It works, but I wonder if there isn't a
better way to do it.
The problem is that the list of arguments in the request generated by
.click()ing the form is incomplete and I have to edit it manually.
I'm trying to do some integral calculation. I have searched the web, but
haven't found any useful information. Will somebody point me to the
right resources on the web for this job ?
Thanks a lot.
ps. Can numpy be used for this job?*
*
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin schrieb:
>> Plenty of programming languages already support unicode identifiers,
>
> Could you name a few? Thanks.
The GNU assembler also supports non-ASCII symbol names on object file
formats that support it; this includes at least ELF (not sure about
PE32). Higher-level programming
En Tue, 15 May 2007 01:37:07 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
>> >
>> > Sec 2.2.3:
>> > Objects of different types, *--->except<---* different numeric types
>> > and different string types, never compare equal;
>> >
>>
>> The exceptions you mean are not exceptions to "'X=
Hi All,
I am currently trying to decide between using python or java and have
a few quick questions about python that you may be able to help with.
#1 Does python have something like javas .jar packages. A jar file
contains all the program files and you can execute the program with
java -jar p
En Tue, 15 May 2007 02:12:40 -0300, Raymond Hettinger <[EMAIL PROTECTED]>
escribió:
>> I feel I'm out of luck, but if someone could point some way to write a
>> generator in C, I'be very grateful!
>
> Perhaps the code in the itertools module will provide a good example
> -- they behave like gene
Hi,
Suppose i have a string stored in variable,how do i remove the
space between them,like if i have the name:
"USDT request" in a variable.i need "USDTrequest",without any space .
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi,
> Suppose i have a string stored in variable,how do i remove the
> space between them,like if i have the name:
> "USDT request" in a variable.i need "USDTrequest",without any space .
> Thanks
>
>
from string import replace
st = 'abcd acdfgx
Paul Rubin wrote:
> Stefan Behnel <[EMAIL PROTECTED]> writes:
>> But then, where's the problem? Just stick to accepting only patches that are
>> plain ASCII *for your particular project*.
>
> There is no feature that has ever been proposed for Python, that cannot
> be supported with this argument
Paul Rubin wrote:
> Stefan Behnel <[EMAIL PROTECTED]> writes:
>> But then, where's the problem? Just stick to accepting only patches that are
>> plain ASCII *for your particular project*.
>
> There is no feature that has ever been proposed for Python, that cannot
> be supported with this argument
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Teach said that the optimal threshold in hybrids is 14-16, but guess
| he wasn't so right after all =\\ The overhead of using insertion sort
| on a longer list turns out to be faster than just piling on
| recursions, when confronted wi
On May 15, 12:14 am, Steven Howe <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi,
> > Suppose i have a string stored in variable,how do i remove the
> > space between them,like if i have the name:
> > "USDT request" in a variable.i need "USDTrequest",without any space .
> >
In <[EMAIL PROTECTED]>, Anthony Irwin wrote:
> #1 Does python have something like javas .jar packages. A jar file
> contains all the program files and you can execute the program with
> java -jar program.jar
There are .egg files but usually distributing a program consisting of
several files isn
On May 14, 11:00 pm, [EMAIL PROTECTED] wrote:
> Hi,
> Suppose i have a string stored in variable,how do i remove the
> space between them,like if i have the name:
> "USDT request" in a variable.i need "USDTrequest",without any space .
> Thanks
s = "jk hij ght"
print "".join(s.
101 - 174 of 174 matches
Mail list logo