Paul Rubin wrote:
> Steven D'Aprano writes:
>> It is never
>> correct to avoid using "is" when you need to compare for identity.
>
> When is it ever necessary to compare for identity?
Is that a trick question? The obvious answer is, any time you need to.
The standard library has dozens of test
On Mar 7, 10:57 am, s...@pobox.com wrote:
> Right. Again though, when newcomers conflate the concepts they can deceive
> themselves into thinking "is" is just a faster "==".
But _you_ only _just_ stated "It does have some (generally small)
performance ramifications as
well" and provided timing ex
s...@pobox.com wrote:
> Steven> Mutable versus immutable is irrelevant. The complexity of the
> Steven> object is irrelevant. The phase of the moon is irrelevant. The
> Steven> *only* relevant factor is the programmer's intention:
>
> Which for a new user not familiar with the differi
On Mar 7, 9:35 am, Minesh Patel wrote:
> I need to monitor each directory for the latest install, take it and
> go perform some tests on a specific machine. I would like these
> testing tasks to run concurrently for the obvious reasons.
There are two other options to consider:
* greenlet, which
"andrew cooke" writes:
> def copy(src, dst, name, quote_none=False):
> value = src[name]
> dst[name] = 'None' if quote_none and value is None else value
def copy(src, dst, name, default=None):
value = src[name]
dst[name] = value if value is not None else default
> copy(row, ad, name,
Thanks a lot! that copy function is a really neat trick!
Yes the ni's are sorted, and yes the query SHOULD be the one to limit it to
just one set of ni's; however, i am having trouble implementing that in sql.
I am using sqlite3 atm and right now i have a very large select statment the
gets me wha
odeits wrote:
> I am looking to clean up this code... any help is much appreciated.
> Note: It works just fine, I just think it could be done cleaner.
>
> The result is a stack of dictionaries. the query returns up to
> STACK_SIZE ads for a user. The check which i think is very ugly is
> putting an
On Mar 6, 1:54 am, Ben Finney
wrote:
> (Could you please set a valid email address for people to contact you
> if necessary?)
>
> TP writes:
> > I would like to prevent the loading of modules in the current
> > directory.
>
> You will, I think, like the new distinction between “absolute” and
> “r
iu2 wrote:
Do you have any idea of what is going wrong?
I think this might be related to the OS's process prioritization,
focused Windows would get more priority than background window.
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-03-07, Rhodri James wrote:
> On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards wrote:
>
>> On 2009-03-06, Fencer wrote:
>>
>>> Hi, I need a boolean b to be true if the variable n is not
>>> None and not an empty list, otherwise b should be false.
>>
>>> I ended up with:
>>
>>> b = n is n
Travis Kirstine wrote:
I have be attempting to resize (downsample) a RGB image using the
python image library resize function. Everything works fine but I
would like to exclude black values 0,0,0 from the calculations. I
have tried creating a alpha mask based on black values then performing
the
Minesh Patel wrote:
On Fri, Mar 6, 2009 at 3:16 PM, Jean-Paul Calderone wrote:
On Fri, 6 Mar 2009 14:50:51 -0800, Minesh Patel wrote:
I am trying to figure out the best approach to solve this problem:
I want to poll various directories(can be run in the main thread).
Once I notice a file has
I am looking to clean up this code... any help is much appreciated.
Note: It works just fine, I just think it could be done cleaner.
The result is a stack of dictionaries. the query returns up to
STACK_SIZE ads for a user. The check which i think is very ugly is
putting another contraint saying th
BigHand gmail.com> writes:
>
> Finally I got the results now. This did take me 10 hours to solve
> this. the docs of 3.0..
> I hope this could help someone else:
> const char *strExcType = PyBytes_AS_STRING(pyStr);
> Py_XDECREF(str_exc_type);
> Py_XDECREF(pyStr);
You can't Py_DECREF() pySt
On Mar 7, 11:40 am, BigHand wrote:
> Guys:
> I have a embedded python in MFC app. to execute a py script of a.py,
> the is only one line in a.py, it "a()" , normally ,excute this script
> file ,you will get a
> "the exception type is "
> "The exception value is name 'a' is not defined "
>
> Pytho
On Mar 7, 11:40 am, BigHand wrote:
> Guys:
> I have a embedded python in MFC app. to execute a py script of a.py,
> the is only one line in a.py, it "a()" , normally ,excute this script
> file ,you will get a
> "the exception type is "
> "The exception value is name 'a' is not defined "
>
> Pytho
Guys:
I have a embedded python in MFC app. to execute a py script of a.py,
the is only one line in a.py, it "a()" , normally ,excute this script
file ,you will get a
"the exception type is "
"The exception value is name 'a' is not defined "
Python3.0 with VS2005.
here is the brief code:
Py_Initi
On Mar 6, 7:42 pm, a...@pythoncraft.com (Aahz) wrote:
> [posted and e-mailed -- please reply to the group]
>
> In article
> <492d5db9-3681-4ae8-827e-f2a4f66be...@v39g2000yqm.googlegroups.com>,
>
> gert wrote:
>
> >After reading the docs and seeing a few examples i think this should
> >work ?
>
>
>> Why this hostility? The guy has worked on an interesting piece of
>> software and tries to promote it to people who are most probably
>> interested in programming languages. What's wrong with that?
>
> Because there's no particular reason for it to be in a Python-specific
> forum.
Yes there is,
This is to announce the first official release of Dao.
Dao is a simple yet powerful object-oriented programming language
>>> So, you pimp your language in news groups for other languages? I see
>>> your off topic post in 3 language groups I frequent, that's not the way
>>> to get in
On Mar 7, 9:34 am, BigHand wrote:
> On Mar 7, 3:50 am, Benjamin Peterson wrote:
>
> > BigHand gmail.com> writes:
>
> > > > There is no PyString_AsString. Everything
> > >> string is unicode now. (PyUnicode API)
> > > hello,Ben,
> > > could you give me an example? I almost know the
> > > PyUnicod
"Gabriel Genellina" writes:
> > for x in population:
> > f = fitness(x)
> > fap += [(f, x)]
> > total += f
> > return sorted(fap, reverse=True), total
> ...
> Environmentally friendly Pythoneers avoid using discardable
> intermediate envelopes:
>
> fap.a
En Fri, 06 Mar 2009 21:31:01 -0200, mattia escribió:
Thanks, I've found another solution here:
http://www.obitko.com/tutorials/
genetic-algorithms/selection.php
so here is my implementation:
def get_fap(fitness, population):
fap = []
total = 0
for x in population:
f = fi
I've been downsampling RGB images using pil, but know I would like to
exclude black 0,0,0 values from the resize calculations. I was hoping that
applying a alapha mask to black areas and creating RGBA image then
performing the resample would fix the issue but no such luck.
any ideas?
--
http://
On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards wrote:
On 2009-03-06, Fencer wrote:
Hi, I need a boolean b to be true if the variable n is not
None and not an empty list, otherwise b should be false.
I ended up with:
b = n is not None and not not n
I'd do it like this:
b = (n is
On Mar 7, 3:50 am, Benjamin Peterson wrote:
> BigHand gmail.com> writes:
>
> > > There is no PyString_AsString. Everything
> >> string is unicode now. (PyUnicode API)
> > hello,Ben,
> > could you give me an example? I almost know the
> > PyUnicode API,but the
> > docs of 3.0 is too brief for me.
En Fri, 06 Mar 2009 22:05:53 -0200, Richard Thomas
escribió:
Say I have a project like this:
./run.py
./package/__init__.py
./package/mod1.py
./package/subpackage/__init__.py
./package/subpackage/mod2.py
./package/subpackage/mod3.py
And suppose that "." and "package"
Gary Herron wrote:
>>> Newbies: Never use "is" to compare anything.
>>
>> Worse and worse! Now you're actively teaching newbies to write buggy
>> code!
>
> Nonsense. Show me "newbie" level code that's buggy with "==" but
> correct with "is".
What's "newbie" level code? What does that even *mean
Steven> Mutable versus immutable is irrelevant. The complexity of the
Steven> object is irrelevant. The phase of the moon is irrelevant. The
Steven> *only* relevant factor is the programmer's intention:
Which for a new user not familiar with the differing concepts of "is" and
"==" can
On 2009-03-06 18:29, Paul Rubin wrote:
Steven D'Aprano writes:
It is never
correct to avoid using "is" when you need to compare for identity.
When is it ever necessary to compare for identity?
Caches of arbitrary objects.
When checking if an object (which may be have an arbitrarily pervers
s...@pobox.com wrote:
> Of course, the more complex the objects you are comparing the
> stronger the recommendation agaist using 'is' to compare two objects.
Why is there so much voodoo advice about "is"? Is object identity really
such a scary concept that people are frightened of it?
Mutable ve
Steven D'Aprano writes:
> It is never
> correct to avoid using "is" when you need to compare for identity.
When is it ever necessary to compare for identity?
--
http://mail.python.org/mailman/listinfo/python-list
Catherine Moroney wrote:
Are the temporary filenames generated by the tempfile module
guaranteed to be unique?
I suspect this answers your question...
Emile
>>> import tempfile
>>> help(tempfile)
Help on module tempfile:
NAME
tempfile - Temporary files.
FILE
c:\python25\lib\tempfil
Stefan Spoettl wrote:
In the pass it was always a good idea to use the newest Python verison
for starting the development of a new application. First one could
benefit from the additional features and second one could be sure that
the community would have been passing during development.
Nowa
So, it sounds like your update means that it is related to a specific
url.
I'm curious about this issue myself. I've often wondered how one
could properly crawl an AJAX-ish site when you're not sure how quickly
the data will be returned after the page has been.
John, your advice has really helpe
Daniel Fetchinson writes:
> Why this hostility? The guy has worked on an interesting piece of
> software and tries to promote it to people who are most probably
> interested in programming languages. What's wrong with that?
Because there's no particular reason for it to be in a Python-specific
f
Say I have a project like this:
./run.py
./package/__init__.py
./package/mod1.py
./package/subpackage/__init__.py
./package/subpackage/mod2.py
./package/subpackage/mod3.py
And suppose that "." and "package" (or their absolute paths) are in
sys.path.
Now mod1.py and mod2.p
On Mar 6, 12:23 pm, Gary Herron wrote:
> Robert Kern wrote:
> > On 2009-03-06 13:46, Gary Herron wrote:
> >> Emanuele D'Arrigo wrote:
> >>> Hi everybody,
>
> >>> while testing a module today I stumbled on something that I can work
> >>> around but I don't quite understand.
>
> >> *Do NOT use "is"
Are the temporary filenames generated by the tempfile module
guaranteed to be unique?
I have a need to generate temporary files within an application,
and I will have many instances of this application running as a
sub-process (so I can submit them to a batch queue). Is there
any danger of my di
En Fri, 06 Mar 2009 19:31:02 -0200, Emanuele D'Arrigo
escribió:
a = "a"
b = "a"
a is b
True
a = "/a" <- same as above, except the forward slashes!
b = "/a" <- same as above, except the forward slashes!
a is b
False
So, it appears that in the first case a and b are names to the same
str
Krishnakant wrote:
Hello all,
I am looking out for a python library which does the followingg.
1, create and manipulate openoffice spreadsheets.
OpenOffice, by default, creates ODF -- Open Document Format -- documents
as zipped xml subdocuments. Ooo is just one of many programs that work
wit
On Mar 6, 3:31 pm, odeits wrote:
> On Mar 6, 11:53 am, awel wrote:
>
>
>
> > Hi,
>
> > I am trying to get a value from an xml file, increment it by 1,
> > replace by the new value and write another xml with the new value
> > inside.
>
> > I have found this code to get the line and it works but I
krishnakishore.nakarika...@gmail.com wrote:
I want to read the Special Administration Console (SAC) output spew
using python. Is it possible for me?
It looks like that's just serial port I/O. If that doesn't get you
going in the right direction it'll be a tough road...
Emile
--
http://ma
On Fri, Mar 6, 2009 at 3:16 PM, Jean-Paul Calderone wrote:
> On Fri, 6 Mar 2009 14:50:51 -0800, Minesh Patel wrote:
>>
>> I am trying to figure out the best approach to solve this problem:
>>
>> I want to poll various directories(can be run in the main thread).
>> Once I notice a file has been ad
On Mar 6, 11:53 am, awel wrote:
> Hi,
>
> I am trying to get a value from an xml file, increment it by 1,
> replace by the new value and write another xml with the new value
> inside.
>
> I have found this code to get the line and it works but I have to do
> everything manualy:
>
> import re
> lin
Il Fri, 06 Mar 2009 14:13:47 -0800, Scott David Daniels ha scritto:
> mattia wrote:
>> Here is my last shot, where I get rid of all the old intermediate
>> functions:
>>
>> def selection(fitness, population):
>> lp = len(population)
>> roulette_wheel = []
>> for x in population:
>>
Daniel Fetchinson wrote:
This is to announce the first official release of Dao.
Dao is a simple yet powerful object-oriented programming language
So, you pimp your language in news groups for other languages? I see
your off topic post in 3 language groups I frequent, that's not the way
to get
On Fri, 6 Mar 2009 14:50:51 -0800, Minesh Patel wrote:
I am trying to figure out the best approach to solve this problem:
I want to poll various directories(can be run in the main thread).
Once I notice a file has been added to any directory, I grab a lock,
spawn a thread to go perform the nece
Limin> Honest to say, there is no solid connection between Dao and
Limin> Python. It's just that I had received some good suggestions and
Limin> comments from these groups when I made a few previous
Limin> announcements in these groups. So I guessed somebody might be
Limin> i
Gary> *Do NOT use "is" to compare immutable types.* **Ever! **
The obvious followup question is then, "when is it ok to use 'is'?"
Robert> Well, "foo is None" is actually recommended practice
Indeed. It does have some (generally small) performance ramifications as
well. Two trivia
Emanuele D'Arrigo wrote:
On 6 Mar, 19:46, Gary Herron wrote:
It is an implementation choice (usually driven by efficiency considerations) to
choose when two strings with the same value are stored in memory once or twice.
In order for Python to recognize when a newly created string has the
I am trying to figure out the best approach to solve this problem:
I want to poll various directories(can be run in the main thread).
Once I notice a file has been added to any directory, I grab a lock,
spawn a thread to go perform the necessary actions, and then release
the lock.
--
Thanks for
> So, it appears that in the first case a and b are names to the same
> string object, while in the second case they are to two separate
> objects. Why?
This question is ambiguous:
a) Why does the Python interpreter behave this way?
(i.e. what specific algorithm produces this result?)
or
b) Why
Steven D'Aprano wrote:
Gary Herron wrote:
Robert Kern wrote:
...
Use "is" when you really need to compare by object identity and not
value.
But that definition is the *source* of the trouble. It is *completely*
meaningless to newbies. Until one has experience in programm
> i agree it's not clear how this is related to python (although i can see
> the influence), but it does look like a nice language.
thanks.
>
> one thing i was surprised to find missing was that the discussion of types
> doesn't include classes (the discussion of macros doesn't include types,
A
On 2009-03-03, Mike Driscoll wrote:
> It should be noted that the port for 3.0 hasn't started yet for
> wxPython and I'm not seeing anything about a port for PyQt either
> on their website.
On 2009-03-05, Peter Billam wrote:
> I mailed riverbankcomputing about PyQt for Py3; Phil Thompson replied
>> This is to announce the first official release of Dao.
>>
>> Dao is a simple yet powerful object-oriented programming language
>
> So, you pimp your language in news groups for other languages? I see
> your off topic post in 3 language groups I frequent, that's not the way
> to get interest in
Il Fri, 06 Mar 2009 18:46:44 -0300, andrew cooke ha scritto:
> i have not been following this discussion in detail, so someone may have
> already explained this, but it should not be necessary to actually
> construct the roulette wheel to select values from it. what you are
> doing is selecting f
mattia wrote:
Here is my last shot, where I get rid of all the old intermediate
functions:
def selection(fitness, population):
lp = len(population)
roulette_wheel = []
for x in population:
roulette_wheel += [x]*fitness(x)
selected_population = [[]]*lp
selected_popula
Hello list,
I have a question. I'm writing a simple object serialization module
using shelve to write arbitrary objects to a file (M.py). Now I have the
problem, that if I create a simple object in the doctest documentation
file M.txt like this:
>>> class tdata(object):
... def __init
Emanuele D'Arrigo wrote:
> So, it appears that in the first case a and b are names to the same
> string object, while in the second case they are to two separate
> objects. Why? What's so special about the forward slash that cause the
> two "/a" strings to create two separate objects? Is this an
>
Benjamin Peterson wrote:
> While the solutions given by others in this thread will work, I think it
> is best policy to not name your own modules after stdlib ones. When I see
> "os" referenced in code, I assume it is the stdlib one, and don't want to
> be confused by the presence of your own modu
i have not been following this discussion in detail, so someone may have
already explained this, but it should not be necessary to actually
construct the roulette wheel to select values from it. what you are doing
is selecting from a list where the there are different probabilities of
selecting d
On 6 Mar, 19:46, Gary Herron wrote:
> It is an implementation choice (usually driven by efficiency considerations)
> to choose when two strings with the same value are stored in memory once or
> twice. In order for Python to recognize when a newly created string has the
> same value as an alre
Il Fri, 06 Mar 2009 22:28:00 +0100, Peter Otten ha scritto:
> mattia wrote:
>
>> Il Fri, 06 Mar 2009 14:06:14 +0100, Peter Otten ha scritto:
>>
>>> mattia wrote:
>>>
Hi, I'm new to python, and as the title says, can I improve this
snippet (readability, speed, tricks):
def g
TP Paralleles.invalid> writes:
>
> Hi everybody,
>
> I would like to prevent the loading of modules in the current directory.
> For example, if I have a personal module in the current directory
> named "os", when I do "import os", I would like Python to import os
> standard module, not my perso
Thank you everybody for the contributions and sorry if I reawoke the
recurring "is vs ==" issue. I -think- I understand how Python's
object model works, but clearly I'm still missing something. Let me
reiterate my original example without the distracting aspect of the
"==" comparisons and the four
I have be attempting to resize (downsample) a RGB image using the
python image library resize function. Everything works fine but I
would like to exclude black values 0,0,0 from the calculations. I
have tried creating a alpha mask based on black values then performing
the resize but that only cre
>
> i agree it's not clear how this is related to python (although i can see
> the influence), but it does look like a nice language.
thanks.
>
>
> one thing i was surprised to find missing was that the discussion of types
> doesn't include classes (the discussion of macros doesn't include
Ac
mattia wrote:
> Il Fri, 06 Mar 2009 14:06:14 +0100, Peter Otten ha scritto:
>
>> mattia wrote:
>>
>>> Hi, I'm new to python, and as the title says, can I improve this
>>> snippet (readability, speed, tricks):
>>>
>>> def get_fitness_and_population(fitness, population):
>>> return [(fitness(
Gary Herron wrote:
>> Huh? How am I supposed to compare immutable types for identity then? Your
>> bizarre instruction would prohibit:
>>
>> if something is None
>>
>
> Just use:
>
> if something == None
>
> It does *exactly* the same thing.
Wrong.
"something is None" is a pointer compar
Gary Herron wrote:
> Robert Kern wrote:
...
>> Use "is" when you really need to compare by object identity and not
>> value.
>
> But that definition is the *source* of the trouble. It is *completely*
> meaningless to newbies. Until one has experience in programming in
> general and experience
Steven D'Aprano wrote:
Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.***Ever! **
Huh? How am I suppos
I like to see closure on a thread. This should do it.
from Tkinter import *
# Use of control variables and callbacks
def mycallback():
print "User entered:" , e.get()
print "Operation by 2 gives: ", e.get()*2, "and", v.get()*2
master = Tk()
#v=StringVar()
v=IntVar()
print v,type(v)
pri
Steven D'Aprano wrote:
> Steve Holden wrote:
>
>> If x and b are meant to be global than bite the bullet and *make* them
>> global.
>
> Well, there's global, and there's global.
>
> There's global to a few functions in a module, there's global to
> everything
> in a module, and global to an entire
Steve Holden wrote:
> If x and b are meant to be global than bite the bullet and *make* them
> global.
Well, there's global, and there's global.
There's global to a few functions in a module, there's global to everything
in a module, and global to an entire application. They're not necessarily
t
Robert Kern wrote:
On 2009-03-06 14:23, Gary Herron wrote:
Robert Kern wrote:
On 2009-03-06 13:46, Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare
Emanuele D'Arrigo wrote:
> Hi everybody,
>
> while testing a module today I stumbled on something that I can work
> around but I don't quite understand.
Why do you have to work around it?
What are you trying to do that requires that two strings should occupy the
same memory location rather than
Gary Herron wrote:
> Emanuele D'Arrigo wrote:
>> Hi everybody,
>>
>> while testing a module today I stumbled on something that I can work
>> around but I don't quite understand.
>>
>
> *Do NOT use "is" to compare immutable types.***Ever! **
Huh? How am I supposed to compare immutable type
On 2009-03-06 14:23, Gary Herron wrote:
Robert Kern wrote:
On 2009-03-06 13:46, Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.* *
Robert Kern wrote:
On 2009-03-06 13:46, Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.* **Ever! **
Well, "foo is None" is actual
On Mar 6, 1:23 pm, "andrew cooke" wrote:
> 3 and 2.6 are compatible. so develop on 3, to make sure you don't use old
> junk, and then switch to 2.6 if you need to. there are a few wrinkles in
> doing so, but it is not a big problem.
>
> 3.0 is a nicer language. it's cleaner and more consistent.
Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.***Ever! **
Then it should be a detected error to do so.
On 2009-03-06 13:46, Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.* **Ever! **
Well, "foo is None" is actually recommended pract
2009/3/6 :
> This is an interesting post, it shows me that fitness plateau where
> design of Python syntax lives is really small, you can't design
> something just similar:
>
> http://unlimitednovelty.com/2009/03/indentation-sensitivity-post-mortem.html
I don't think the article is right that "it
Hi,
I am trying to get a value from an xml file, increment it by 1,
replace by the new value and write another xml with the new value
inside.
I have found this code to get the line and it works but I have to do
everything manualy:
import re
lines = open("c:\\File1.xml").readlines()
for i in rang
BigHand gmail.com> writes:
> > There is no PyString_AsString. Everything
>> string is unicode now. (PyUnicode API)
> hello,Ben,
> could you give me an example? I almost know the
> PyUnicode API,but the
> docs of 3.0 is too brief for me.
PyString_FromString -> PyUnicode_FromString
PyString_Concat
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do NOT use "is" to compare immutable types.***Ever! **
It is an implementation choice (usually driven by efficiency considerations) to
cho
Emanuele D'Arrigo wrote:
c = "/a"
d = "/a"
c == d
> True # all good so far
c is d
> False # ek!
>
> Why c and d point to two different objects with an identical string
> content rather than the same object?
Because you instantiated two difference
Hello all,
I am looking out for a python library which does the followingg.
1, create and manipulate openoffice spreadsheets.
2, allow for cell formatting including merging cells.
3, allow for colouring cells and formatting data as bold italics etc.
4, alignment of data should be possible.
I looked
Limin Fu wrote:
> To Tim Greer and others:
>
> Some people may think this kind of announcement are off topic in a
> group for another language. This is not exactly true. This is still
> about programming, there are so many programmers out there, who knows
> if there would be somebody interested i
Honest to say, there is no solid connection between Dao and Python.
It's just that I had received some good suggestions and comments from
these groups when I made a few previous announcements in these groups.
So I guessed somebody might be interested in Dao, and thought it might
be a good idea to a
On Mar 6, 7:20 am, Jean-Paul Calderone wrote:
> On Fri, 6 Mar 2009 05:00:03 -0800 (PST), DLitgo wrote:
> >Hello everyone,
>
> >I have a curious problem which I'm wondering if anyone here can shed
> >some light on. I'm basically just following along with a guide which
> >is going through some of t
On Feb 17, 11:03 am, oamram wrote:
> Hi All,
> new to python. i have a directory with about 50 text file and i need to
> iterate through them and get
> line 7 to 11 from each file and write those lines into another file(one file
> that will contain all lines).
>
import glob
file("output.txt","w")
3 and 2.6 are compatible. so develop on 3, to make sure you don't use old
junk, and then switch to 2.6 if you need to. there are a few wrinkles in
doing so, but it is not a big problem.
3.0 is a nicer language. it's cleaner and more consistent. i think
important libraries will move there. no
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
>>> a = "a"
>>> b = "a"
>>> a == b
True
>>> a is b
True
>>> c = "/a"
>>> d = "/a"
>>> c == d
True # all good so far
>>> c is d
False # ek!
Why c
(Could you please set a valid email address for people to contact you
if necessary?)
TP writes:
> I would like to prevent the loading of modules in the current
> directory.
You will, I think, like the new distinction between “absolute” and
“relative” imports http://www.python.org/dev/peps/pep-0
In the pass it was always a good idea to use the newest Python verison for
starting the development of a new application. First one could benefit from the
additional features and second one could be sure that the community would have
been passing during development.
Nowadays we have at least th
> Sorry, I think you didn't get my later post -- than in fact was from a
> month ago...
> Seehttp://article.gmane.org/gmane.comp.python.general/613312/
> urllib2 should handle a 302 redirect automatically.
>
> --
> Gabriel Genellina
I went to the link you provided and sure enough there was your
Casey wrote:
I have a new laptop that came with Vista 64 and I'm having problems
with some of my older code that I use for multimedia processing. I
narrowed the problem down to the winsound library; any attempt to play
sounds results in a fatal error. The simplest case is:
from winsound impor
1 - 100 of 201 matches
Mail list logo