On 2006-08-29, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Tuesday 29/8/2006 02:45, Antoon Pardon wrote:
>
>> >>That may be true. But one may wonder if this is a failing of the
>> >>programmer or a failing of the language that doesn't support
>> >>such things.
>> >
>> > In any case, I don't s
On 2006-08-29, Simon Forman <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> > Antoon Pardon wrote:
>> >> There seem to be enough problems that work with ints but not with
>> >> floats. In such a case enforcing that the number you w
> [OP] What is the proper way to test (using unit test) a method that print
> information?
> [...]
Fredrik Lundh <[EMAIL PROTECTED]> writes:
>
> Scott David Daniels wrote:
>
>> For silly module myprog.py:
>> def A(s):
>> print '---'+s+'---'
>> in test_myprog.py:
>> import unitte
At Tuesday 29/8/2006 02:45, Antoon Pardon wrote:
>>That may be true. But one may wonder if this is a failing of the
>>programmer or a failing of the language that doesn't support
>>such things.
>
> In any case, I don't see how this supports the original claim that
> strict type checking input pa
Hi, Travis
I can pack my scripts into an executable with py2exe, but errors occur
once it runs:
No scipy-style subpackage 'random' found in D:\test\dist\numpy.
Ignoring: No module named info
import core -> failed: No module named _internal
import lib -> failed: 'module' object has no attribute '_
Thanks a lot Fredrik and Tim for your help.
Cheers,
Mohit
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-08-29, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Tuesday 29/8/2006 01:28, Antoon Pardon wrote:
>
>> > Antoon Pardon wrote:
>> >> There seem to be enough problems that work with ints but not with
>> >> floats. In such a case enforcing that the number you work with
>> >> is indeed an
Antoon Pardon wrote:
> On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Antoon Pardon wrote:
> >> There seem to be enough problems that work with ints but not with
> >> floats. In such a case enforcing that the number you work with
> >> is indeed an int seems fully appropiate.
> >
>
rdrink wrote:
> Ok, maybe now I can make some more sense of this, with an example of
> real code (sorry if it's a bit dense):
> This is the basic function...
>
> def equate(parts,new_eq):
>
> oL = int(parts[0])
> iL = int(parts[1])
> iR = int(parts[2])
> oR = int(parts[3])
>
At Tuesday 29/8/2006 01:28, Antoon Pardon wrote:
> Antoon Pardon wrote:
>> There seem to be enough problems that work with ints but not with
>> floats. In such a case enforcing that the number you work with
>> is indeed an int seems fully appropiate.
>
> I've _never_ seen a case where enforcing
rdrink wrote:
> Hey Simon, Thanks for the reply.
>
> Simon Forman wrote:
> > You must be doing something weird, that equation works for me:
> > Try posting the minimal code example that causes the error and the
> > full, exact traceback that you get.
>
> I appreciate the offer... but at this point
At Tuesday 29/8/2006 01:13, rdrink wrote:
File "the_farmer2.py", line 112, in equate
iL = int(parts[1])
ValueError: invalid literal for int(): -
So parts[1] is '-'.
Try adding a few print statements; I'd add a try/except around those
lines, printing parts, I bet it's not what you expect
On Mon, 2006-08-28 at 21:13 -0700, rdrink wrote:
>
> (BTW, as a footnote: For each of the above 'equations' the function
> equate() was called 500 times... in some cases with the list 'parts'
> equaling things like ['0',2','3','0'], so I have no reason to believe
> that the problem is with the wa
On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> There seem to be enough problems that work with ints but not with
>> floats. In such a case enforcing that the number you work with
>> is indeed an int seems fully appropiate.
>
> I've _never_ seen a case where en
Claudio Grondi wrote:
> Sorin Schwimmer wrote:
[...]
> It doesn't.
>
> Claudio
Sometimes silence is preferable to a concrete response. It takes less
time and occupies less bandwidth.
regards
Steve
who should perhaps have followed his own advice
--
Steve Holden +44 150 684 7255 +1 8
fegge wrote:
> what module should i import?
>
You probably want urllib. If you have the Tools directory in your Python
distro you can take a look at the webchecker.py application for an
example of how it might be done.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Hol
At Tuesday 29/8/2006 00:04, alf wrote:
is there any way in Python to have iostream like __str__ operator?
Define a method writeTo(f) if you want, and instead of:
f.write('%s' % obj)
use:
obj.writeTo(f)
Gabriel Genellina
Softlab SRL
_
Ray wrote:
> Paul Boddie wrote:
>
>>>But at least in most developers' perception, it is (not necessarily in
>>>the absolute sense, but perhaps relative to Django or Turbogears).
>>>Mind, it doesn't even need to be true, we're talking of perception
>>>here.
>>
>>So actual maturity isn't important w
Ok, maybe now I can make some more sense of this, with an example of
real code (sorry if it's a bit dense):
This is the basic function...
def equate(parts,new_eq):
oL = int(parts[0])
iL = int(parts[1])
iR = int(parts[2])
oR = int(parts[3])
oLoL = int(str(o
Chaos wrote:
> I am looking for ways to have a Desktop Alert, like the one most IM
> Messengers have (MSN, AIM) at the lower right above the taskbar. Can
> anyone point me to the right resources to use?
I am not sure exactly what you are looking for but
I assume you are using windows, so I would
alf wrote:
> Martin v. Löwis wrote:
>
>>>it's spelled "Windows installers"
>>
>>I want to second this. It was me who created the installer, and I don't
>>like to see my name abbreviated as M$ (if you think you should write
>>out the name of the MSI creator, please say "Martin's installer" :-).
>
Martin v. Löwis wrote:
>>it's spelled "Windows installers"
> I want to second this. It was me who created the installer, and I don't
> like to see my name abbreviated as M$ (if you think you should write
> out the name of the MSI creator, please say "Martin's installer" :-).
ok, let me clarify, b
Hi,
is there any way in Python to have iostream like __str__ operator?
--
alf
--
http://mail.python.org/mailman/listinfo/python-list
robinsiebler wrote:
> The other thing I failed to mention is that I need to ensure that I
> find the fsType *before* I find the next FontName.
Given these requirements, I'd formulate the script something like this:
f = open(filename)
NUM_LINES_BETWEEN = 7
Fo = '/FontName /ACaslonPro-Semibold'
Ray wrote:
>
> Is it the same in the Python world? What version of Python is used in,
> say, Google? Is it even 2.4 yet?
Google uses many versions of Python including 2.2, 2.3 and 2.4. Though
2.4 is relatively new. I hope to start introducing Python 2.5 sometime
next year. Mid-year is about as
On 8/27/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> First, I don't intend this to be a flame war, please. Python
> and Ruby are the only two languages I'd willingly work in
> (at least amongst common languages), and TurboGears and
> Rails seem roughly equivalent.
>
> I'm much more knowledgab
Jorge Vargas wrote:
> for ones 2.5 is not consider production code yet so noone should be
> running anything on it. same with 1.6.
Yes, certainly, in fact in a lot of companies I've worked for the
criteria for upgrading is when the Vendor is about to stop supporting
it :) But are there many compa
On 28 Aug 2006 20:13:54 -0700, Ray <[EMAIL PROTECTED]> wrote:
> Since I haven't used Python at work, I am using Python 2.5 right now.
> However I wonder, how fast are you guys moving from version to version
> at work? As an illustration my ex-company just moved to Java 5, which
> was released aroun
Ray> Since I haven't used Python at work, I am using Python 2.5 right
Ray> now. However I wonder, how fast are you guys moving from version
Ray> to version at work?
At my day job (a trading firm) we moved from 2.3 to 2.4 a couple months ago.
At home I use whatever's in CVS. For my m
Since I haven't used Python at work, I am using Python 2.5 right now.
However I wonder, how fast are you guys moving from version to version
at work? As an illustration my ex-company just moved to Java 5, which
was released around... what, 2-3 years ago? (While I am running Java 6
at home)
Is it t
http://www.heiselman.com/MultiSSH.zip
--
http://mail.python.org/mailman/listinfo/python-list
At Monday 28/8/2006 20:45, Nicolas G wrote:
If I want to run my program as a web service I need to setup a
webserver , am I right ?
Whars that difference ? can a webservice be run without a webserver ?
Well, a webservice uses HTTP as its transport protocol, so you need
an HTTP server, but you
Paul Boddie wrote:
> > But at least in most developers' perception, it is (not necessarily in
> > the absolute sense, but perhaps relative to Django or Turbogears).
> > Mind, it doesn't even need to be true, we're talking of perception
> > here.
>
> So actual maturity isn't important when using a t
hello ,I'm wondering if SOAPpy doesn't have something to generate a wsdl for a specific application.Let's say, I wrote a web service with SOAPpy, is there any way to generate the wsdl for it.If there aren't can someone give a little example of both.
thanks
--
http://mail.python.org/mailman/listin
Below is my code, which is kind of virtual and with its help ill use it
in my main project.
Now what i am looking for is can anybody write all the code inside a
class...so that I can reuse it. I am kind of novice...n kind of stuc
with that.
from Tkinter import *
root = Tk()
w = Label(root, text=
Hey Simon, Thanks for the reply.
Simon Forman wrote:
> You must be doing something weird, that equation works for me:
> Try posting the minimal code example that causes the error and the
> full, exact traceback that you get.
I appreciate the offer... but at this point my code is too recursive
an
At Monday 28/8/2006 12:59, Fredrik Lundh wrote:
> What is the proper way to test (using unit test) a method that print
> information?
> for example:
>
> def A(s):
> print '---'+s+'---'
>
> and i want to check that A("bla") really print out "---bla---"
http://docs.python.org/lib/module-
> The other thing I failed to mention is that I need to ensure that I
> find the fsType *before* I find the next FontName.
found_fontname = False
font_search = '/FontName /ACaslonPro-Semibold'
type_search = '/FSType 8'
for line in file('foo.txt'):
if font_search in line:
if
asincero wrote:
> Would it be considered good form to begin every method or function
> with a bunch of asserts checking to see if the parameters are of the
> correct type [...]
>
> This is something I miss from working with more stricter languages
> like C++, where the compiler will tell you i
The other thing I failed to mention is that I need to ensure that I
find the fsType *before* I find the next FontName.
--
http://mail.python.org/mailman/listinfo/python-list
At Sunday 27/8/2006 18:35, [EMAIL PROTECTED] wrote:
(This code don't even compile...!)
def simplecsdtoorc(filename):
file = open(filename,"r")
file is not a good name - hides the builtin type of the same name.
Same for dict, list...
alllines = file.read_until("")
read_until???
> You omit what you want to do with the results when you find
> them...or what should happen when they both appear on the same
> line (though you hint that they're a couple lines apart, you
> don't define this as a "this is always the case" sort of scenario)
I don't do anything, per se. I just n
Dieter Maurer wrote:
> "Patrick Maupin" <[EMAIL PROTECTED]> writes on 26 Aug 2006 12:51:44 -0700:
> > ...
> > The only
> > problem I personally know of is that the __slots__ aren't inherited,
>
> "__slots__" *ARE* inherited, although the rules may be a bit
> complex.
Yes, I didn't write that corr
> I want to search the file until I find '/FontName /ACaslonPro-Semibold'
> and then jump forward 7 lines where I expect to find '/FSType 8'. I
> then want to continue searching from *that* point forward for the next
> FontName/FSType pair. Unfortunately, I haven't been able to figure out
> how t
Larry Bates wrote:
> Jason Jiang wrote:
>> Hi,
>>
>> Could someone recommend a good Python editor? Thanks.
>>
>> Jason
>>
>>
>>
> For just getting started use Idle that comes with Python.
> If you are already a user or if you are looking for a more
> powerful solution you can use Eclipse (with Pyt
"Boris Duek" <[EMAIL PROTECTED]> writes:
> Yes, you excactly got my point. The thing is that I can't rely on
> Python 2.5 to be installed soon.
> So the only solution for me at this moment is to use jython and from
> there use Java JDBC API (sorry :-)
Assuming Java is installed on an arbitrary ma
At Sunday 27/8/2006 00:01, [EMAIL PROTECTED] wrote:
Hey people!
For the first time I'm doing a client/server application, and I'm
really confused with IPC stuff.
I read the fastest method is shared memory, but I tryed mmap and found
it tedious for the amount of data I'm handling (which is 30K a
I have a batch of files that I am trying to search for specific text in
a specific format. Each file contains several items I want to search
for.
Here is a snippet from the file:
...
/FontName /ACaslonPro-Semibold def
/FontInfo 7 dict dup begin
/Notice (Copyright 2000 Adobe Systems Incorporated.
Le lundi 28 août 2006 22:15, Christian Convey a écrit :
> I've looked at using imp.load_source() or imp.load_module(), but it looks
> to me like all of these polute the global namespace with the names of the
> modules I'm importing.
Really ? They don't. (there are some quirks in my little function
If I want to run my program as a web service I need to setup a
webserver , am I right ?
Whars that difference ? can a webservice be run without a webserver ?
On 8/29/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> On 26 Aug 2006 04:07:35 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi fol
[EMAIL PROTECTED]
>> The documentation for PyThreadState_SetAsyncExc says "To prevent naive
>> misuse, you must write your own C extension to call this". Anyone care
>> to list a few examples of such naive misuse?
[and again]
> No? I'll take that then as proof that it's impossible to misuse the
>
Sam Pointon a écrit :
> Bruno Desthuilliers wrote:
>
>>foo = lambda thing: thing and thing + 1 or -1
>
>
> The and ... or trick is buggy (what if thing == -1?)
Yes, true - Should be:
foo2 = lambda t: t != -1 and (t and t+1 or -1) or 0
> and bad style.
Lol. Well, so what about:
foo = lambda
tobiah wrote:
> def foo(thing):
>
> if thing:
> return thing + 1
> else:
> return -1
>
> def foo(thing):
>
> if thing:
> return thing + 1
> return -1
>
> Obviously both do the same thing. The first is
> possibly clearer, while the s
Johanna Pfalz wrote:
> Hi there,
>
> Does anyone have details on how to drive excel using python 2.4 on OSX?
> I've searched the web and have not found anything specific to excel.
>
> Thanks in advance,
>
>
> Johanna Pfalz
> Smithers, BC
>
>
>
Try AppScript: http://appscript.sourceforge.net
Jorge Vargas wrote:
> On 8/28/06, Johanna Pfalz <[EMAIL PROTECTED]> wrote:
> > To be more specific, I'm interested in reading in certain rows and columns
> > from an excel spreadsheet directly without converting the information to a
> > text file. I'd also like to be able to write directly to an e
[EMAIL PROTECTED] wrote:
> The documentation for PyThreadState_SetAsyncExc says "To prevent naive
> misuse, you must write your own C extension to call this". Anyone care
> to list a few examples of such naive misuse?
No? I'll take that then as proof that it's impossible to misuse the
function.
Thank you Sir.
I downloaded SPE from the main site.
Installed on Windows XP.
Regards.
Sybren Stuvel wrote:
> Dr. Pastor enlightened us with:
>> Please advise how to uninstal SPE.
>
> First you'll have to tell us how you installed it in the first place.
> Without that, we can only guess.
>
> Syb
Bruno Desthuilliers wrote:
> foo = lambda thing: thing and thing + 1 or -1
The and ... or trick is buggy (what if thing == -1?) and bad style. If
you -do- want a conditional expression, 2.5 provides one:
thing + 1 if thing else -1
No subtle logical bugs, and a good deal more obvious.
On the top
Johanna Pfalz wrote:
> To be more specific, I'm interested in reading in certain rows and columns
> from an excel spreadsheet directly without converting the information to a
> text file. I'd also like to be able to write directly to an excel
> spreadsheet from python.
tried http://sourceforge.n
tobiah a écrit :
> def foo(thing):
>
> if thing:
> return thing + 1
> else:
> return -1
>
> def foo(thing):
>
> if thing:
> return thing + 1
> return -1
>
> Obviously both do the same thing. The first is
> possibly clearer, while the second is more conci
On 8/28/06, Johanna Pfalz <[EMAIL PROTECTED]> wrote:
> To be more specific, I'm interested in reading in certain rows and columns
> from an excel spreadsheet directly without converting the information to a
> text file. I'd also like to be able to write directly to an excel
> spreadsheet from pyth
"KraftDiner" wrote:
> What makes asyncore.loop exit?
as most other things you ask about, that's explained in the documentation:
http://docs.python.org/lib/module-asyncore.html
loop(...)
Enter a polling loop that terminates after count passes
or all open channels have been c
On 8/28/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Jorge Vargas wrote:
>
> > seems like a feature/bug of 2.5, why your learning a language with a
> > beta version?
>
> learning?
I'm sorry I though you where the original poster.
>
> (btw, the "c" in 2.5c1 means *release candidate*, not "beta").
To be more specific, I'm interested in reading in certain rows and columns
from an excel spreadsheet directly without converting the information to a
text file. I'd also like to be able to write directly to an excel
spreadsheet from python.
On 8/28/06 3:00 PM, "Jorge Vargas" <[EMAIL PROTECTED]>
Jorge Vargas wrote:
> seems like a feature/bug of 2.5, why your learning a language with a
> beta version?
learning?
(btw, the "c" in 2.5c1 means *release candidate*, not "beta").
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> There seem to be enough problems that work with ints but not with
> floats. In such a case enforcing that the number you work with
> is indeed an int seems fully appropiate.
I've _never_ seen a case where enforcing types in the manner of the OP
is appropriate.
It fails with
Please advise how to uninstal SPE.
Regards,
Dr. Pastor.
jelle wrote:
> I think SPE is a terrible complete and efficient IDE!
>
== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
Bryan Olson wrote:
> KraftDiner wrote:
>
> > Thanks I can't seem to get this example to do anything except sit
> > there
> > http://docs.python.org/lib/asyncore-example.html
>
> Yeah, the example code, by itself, will just sit there.
> As an example, it should probably include the calls to mak
On 8/28/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Duncan Booth wrote:
>
> > Yes, the first one is a syntax error because you aren't allowed empty
> > parentheses in a class statement
>
> however,
>
> $ python
> Python 2.5c1 /.../
> >>> class foo():
> ... pass
> ...
> >>> foo
>
> >>>
>
On 8/28/06, Johanna Pfalz <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> Does anyone have details on how to drive excel using python 2.4 on OSX?
> I've searched the web and have not found anything specific to excel.
drive?
>
> Thanks in advance,
>
>
> Johanna Pfalz
> Smithers, BC
>
>
>
> --
> http://m
On 26 Aug 2006 04:07:35 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi folks, I have accomplished to make a python program that make some
> image manipulation to bmp files.
> I now want to provide this program as a web service. A user can visit a
> site and through a web interface he shou
On 8/28/06, tobiah <[EMAIL PROTECTED]> wrote:
> def foo(thing):
>
> if thing:
> return thing + 1
> else:
> return -1
>
> def foo(thing):
>
> if thing:
> return thing + 1
> return -1
>
> Obviously both do the same thing.
def foo(thing):
if thing:
return thing + 1
else:
return -1
def foo(thing):
if thing:
return thing + 1
return -1
Obviously both do the same thing. The first is
possibly clearer, while the second is more concise.
Co
http://docs.python.org/lib/module-urllib.html
On 28 Aug 2006 14:38:13 -0700, fegge <[EMAIL PROTECTED]> wrote:
> what module should i import?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
what module should i import?
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-08-28, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2006-08-25, Simon Forman <[EMAIL PROTECTED]> wrote:
>>> ...
>>> Generally asserts should be used to "enforce" invariants of your code
>>> (as opposed to typechecking), or to check certain things while
>>> deb
[EMAIL PROTECTED] wrote:
> Fredrik Lundh wrote:
>> 3) convert the data to Unicode before passing it to the database
>> interface, and leave it to the interface to convert it to whatever
>> encoding your database uses:
>>
>> data = ... get encoded string from email ...
>> text = data.deco
On 28 Aug 2006 13:51:58 -0700, [EMAIL PROTECTED] wrote:
>Fredrik Lundh wrote:
>> 3) convert the data to Unicode before passing it to the database
>> interface, and leave it to the interface to convert it to whatever
>> encoding your database uses:
>>
>> data = ... get encoded string from email
Benry wrote:
> Hi guys. I hope I can discuss Twisted here. If not, direct me to the
> correct place please.
Twisted mailing list:
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
;-)
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> 3) convert the data to Unicode before passing it to the database
> interface, and leave it to the interface to convert it to whatever
> encoding your database uses:
>
> data = ... get encoded string from email ...
> text = data.decode("iso-8859-1")
> ... write
[EMAIL PROTECTED] a écrit :
> Hi folks, I have accomplished to make a python program that make some
> image manipulation to bmp files.
> I now want to provide this program as a web service. A user can visit a
> site and through a web interface he should upload the file to the web
> server , the ser
neoedmund a écrit :
> So what? Java 5.0 has the method, why python has not?
Sidenote : I didn't say it was not possible in Python. Just that it's OS
(or desktop-manager) specific, so you have to check your OS (or
desktop-manager) API documentation.
--
http://mail.python.org/mailman/listinfo/pyt
Martin v. Löwis a écrit :
> Paul Boddie schrieb:
>
>>neoedmund wrote:
>>
>>[File icons for a given content type]
>>
>>
>>>So what? Java 5.0 has the method, why python has not?
>>
>>I'd be generally surprised if whichever Java API responsible for this
>>managed to work it out correctly for the diff
neoedmund a écrit :
please don't top-post (corrected)
> Bruno Desthuilliers wrote:
>
>>neoedmund wrote:
>>Please repeat the whole question in the message body
>>
>>=>how to get the os file icon for a given content-type?
>>
>>>any simple method?
>>
>>This is specific to your OS (and FWIW, there's
Hi there,
Does anyone have details on how to drive excel using python 2.4 on OSX?
I've searched the web and have not found anything specific to excel.
Thanks in advance,
Johanna Pfalz
Smithers, BC
--
http://mail.python.org/mailman/listinfo/python-list
Anyone know how to do this?:I want a way to dynamically import modules (module names not known until runtime). I want to end up with a handle to the resulting module object, without having poluted my global module namespace in the process.
Basically I want to something like this:def call_all_user
Claudio Grondi wrote:
> Tim Peters wrote:
>> [Claudio Grondi]
>>
>>> Here an example of what I mean
>>> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
>>> large file):
>>>
>>> >>> f = file('veryBigFile.dat','r')
>>> >>> f = file('veryBigFile.dat','r+')
>>>
>>> Traceback (m
fegge a écrit :
> when i declare a class, is there difference between the below:
> class myClass():
> class myClass(threading.Thread)
>
If you don't know the answer to this, then it's time to read the fine
manual. Please come back when done.
--
http://mail.python.org/mailman/listinfo/python-list
flit a écrit :
> Hi!
> I am using the csv modules..
>
> when I use the command:
>
> if nome in row[rowcsv]:
> print "\n"
> print row[rowcsv] + "\n > " + row[11] + "\n"
> print
> ""
Python 2
Antoon Pardon wrote:
> On 2006-08-23, Georg Brandl <[EMAIL PROTECTED]> wrote:
>> jojoba wrote:
And what im saying is that isnt it silly that we need pass an entire
namespace, when a much simpler notion would be to have each object know
its own name(s) (even if that name doesnt exist)
Bruno Desthuilliers wrote:
> Georg Brandl a écrit :
>> Antoon Pardon wrote:
>>
>>> I have been reading http://www.python.org/dev/peps/pep-3100/
>>> en there is written:
>>>
>>> To be removed:
>>> ...
>>>
>>> callable(): just call the object and catch the exception
>>> ...
>>
KraftDiner a écrit :
(snip)
>
> Here I tried this example and maybe this will explain the difficulties
> I'm having.
> 1) at the time the baseClass is constructed shouldn't the constructor
> of the appropriate type be called.
It is. But neither the constructor nor 'the appropriate type' are what
import re
if re.search(nome, row[rowcsv], re.I):
...
that's re.I [capital i] as in ignorecase.
flit wrote:
> Hi!
> I am using the csv modules..
>
> when I use the command:
>
> if nome in row[rowcsv]:
> print "\n"
> print row[rowcsv] + "\n > " + row[11] + "\n"
>
In <[EMAIL PROTECTED]>, micahc wrote:
> So, how do I store "\tsome text\xa7 some more text\n" as that instead
> of:
> " some text§ some more text
> "
>
> I don't have a problem escaping it so the above would look like
> "\\tsome text\\xa7 some more text\\n" as long as I have a way to later
>
Jim Gibson schreef:
> The problem addressed by what is know in Perl as the 'Schwartzian
> Transform' is that the compare operation can be an expensive one,
> regardless of the whether the comparison uses multiple keys. Since in
> comparison sorts, the compare operation will be executed N(logN)
> t
"Patrick Maupin" <[EMAIL PROTECTED]> writes on 26 Aug 2006 12:51:44 -0700:
> ...
> The only
> problem I personally know of is that the __slots__ aren't inherited,
"__slots__" *ARE* inherited, although the rules may be a bit
complex.
>>> class B(object):
... __slots__ = ('f1', 'f2',)
...
>>> cla
Hi!
I am using the csv modules..
when I use the command:
if nome in row[rowcsv]:
print "\n"
print row[rowcsv] + "\n > " + row[11] + "\n"
print
""
there is this case:
1- data on file PUItar
Sorin Schwimmer wrote:
> I am thinking on something in the following form:
>
>
> import time
> import thread
>
> delay=True
>
> def fn()
> global delay
> time.sleep()
> delay=False
>
> thread.start_new_thread(fn,())
>
> while delay:
>
>
> ...
>
> while :
>
>
> ...
>
>
> Or,
Scott David Daniels wrote:
> For silly module myprog.py:
> def A(s):
> print '---'+s+'---'
> in test_myprog.py:
> import unittest
> from cStringIO import StringIO # or from StringIO ...
why are you trying to reinvent doctest ?
--
http://mail.python.org/mailman/listin
Hi guys. I hope I can discuss Twisted here. If not, direct me to the
correct place please.
My question(s):
I'm working on a custom network protocol (application layer in TCP/IP
model) for a custom network. Please don't try to talk me out of this.
I'm limiting many of the other protocols, becaus
1 - 100 of 223 matches
Mail list logo