Hi all,
I am facing a problem while importing a file in python
script.
After doing import file i am updating that file. Later i am
accessing a dictionary contained in that
file. Eventhough changes are reflected in the file... When i
access a dictionary those changes
Jim Segrave wrote:
> In article <[EMAIL PROTECTED]>,
> Paddy <[EMAIL PROTECTED]> wrote:
> >
> >What I ran was more like the version below, but i did a quick
> >separation of the line that has the ';' in it and goofed.
> >
> def interv2(inlist):
> >... for i,val in enumerate(inlist):
> >...
>> I just finished reading Learning Python 3rd ed,
For real? I thought there was only a 2nd edition.
http://www.oreilly.com/catalog/lpython2/
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
> There are thousands of threads to choose from in this forum.
> If they didn't like this question, they could have picked any other one
> to discuss.
> There's no need to be disagreeable :-)
I think the same thing.
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listi
I think Aahz stated somewhere that he was workign on Effective Python.
I'm not sure if it's an ongoing plan or it's been canned though?
Mike Meng wrote:
> Hi all,
> I just finished reading Learning Python 3rd ed, and am doing my
> first Python application, which retrieves and process text a
Fredrik Lundh wrote:
> To get better performance, you should be able to use PIL's tostring()
> method together with the QImage(buffer, width, height, depth,
> colortable, numColors, bitOrder) form of the QImage constructor.
for PyQt4, that seems to have changed to QImage(buffer, width, height,
Gerard Flanagan wrote:
> [EMAIL PROTECTED] wrote:
> > hello,
> >
> > i'm looking for a way to have a list of number grouped by consecutive
> > interval, after a search, for example :
> >
> > [3, 6, 7, 8, 12, 13, 15]
> >
> > =>
> >
> > [[3, 4], [6,9], [12, 14], [15, 16]]
> >
> > (6, not following 3
Mike Meng wrote:
> Hi all,
> I just finished reading Learning Python 3rd ed, and am doing my
> first Python application, which retrieves and process text and XML
> documents from Web. Python helped me to write the application in a few
> hours, I'm very happy with its productivity. But the pe
[EMAIL PROTECTED] wrote:
> hello,
>
> i'm looking for a way to have a list of number grouped by consecutive
> interval, after a search, for example :
>
> [3, 6, 7, 8, 12, 13, 15]
>
> =>
>
> [[3, 4], [6,9], [12, 14], [15, 16]]
>
> (6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 =>
>
Erik Max Francis wrote:
> Yeah, what jerks. They actually wanted to talk about Python, not some
> random other language that you're trying to learn that has nothing to do
> with it ...
There are thousands of threads to choose from in this forum.
If they didn't like this question, they could have
"Marvin" <[EMAIL PROTECTED]> writes:
> It's been claimed that inheritance structures are less important in
> dynamic languages like Python.
Who claimed that? I ask not because I doubt your assertion ("it was
claimed"), but rather that if someone claimed something, it seems
better to ask that pers
Neuruss wrote:
> I thougt that maybe some python programmer could have experience here
> with c# and give me a little hint.
>
> But unfortunately, there are people here who are not willing to waste
> their time helping, but enjoy to waste their time niggling...
Yeah, what jerks. They actually w
Hi all,
I just finished reading Learning Python 3rd ed, and am doing my
first Python application, which retrieves and process text and XML
documents from Web. Python helped me to write the application in a few
hours, I'm very happy with its productivity. But the performance is not
satisfacto
aljosa wrote:
> does anybody know how to load (in-memory
> representation of PNG image) from Qt (v.4.1.3) as QImage?
If you want the data from a StringIO object, you can either *read* the
data from the object (it's a file-like object, after all), or use the
getvalue() method.
Something like
Well the work is done now. I arrived home at 10:30 PM.
The application takes data from Oracle 10g stored procedures and renders
data to both HTML and CSV formats. The HTML reports have summary and
grouping sections and the HTML files are Excel friendly. The application is
modular and consis
A.M wrote:
> Hi,
>
> Is there any built in feature in Python that can format long integer
> 123456789 to 12,3456,789 ?
Apparently you need to use the locale module. This is the
example they give online to print a simple number with commas:
import locale
locale.setlocale(locale.LC_ALL, 'English
Neuruss wrote:
> John Machin wrote:
> > Neuruss wrote:
> > > I'm sorry for asking about another language here, but since I only know
> > > Python and I'm trying to write something in C#, I guess this is the
> > > best place...
> > >
> >
> > Bad guess. Ask questions about language X on comp.lang.X
Thank you DH!!
D H wrote:
> Neuruss wrote:
> > I'm sorry for asking about another language here, but since I only know
> > Python and I'm trying to write something in C#, I guess this is the
> > best place...
> >
> > I'd like to know how to write this in C#:
> >
> > x=[]
> > sz = 1000
> > x.
John Machin wrote:
> Neuruss wrote:
> > I'm sorry for asking about another language here, but since I only know
> > Python and I'm trying to write something in C#, I guess this is the
> > best place...
> >
>
> Bad guess. Ask questions about language X on comp.lang.X
Well, perhaps I should.
And I s
Neuruss wrote:
> I'm sorry for asking about another language here, but since I only know
> Python and I'm trying to write something in C#, I guess this is the
> best place...
>
> I'd like to know how to write this in C#:
>
> x=[]
> sz = 1000
> x.extend(range(sz))
>
> My question is about "ra
TWiki, written in perl, makes extensive use of versioning/diff
functionality you mention through the use of RCS, which, IIRC, is the
basis for CVS. This method eliminates the need for the repository as
such, and merely requires the presence of the RCS files (and RCS).
Unless you _want_ to host
"Neuruss" <[EMAIL PROTECTED]> writes:
> I'm sorry for asking about another language here, but since I only
> know Python and I'm trying to write something in C#, I guess this is
> the best place...
Really, it isn't. Post in a C# discussion forum, describing the
behaviour you want from your progra
Slawomir Nowaczyk <[EMAIL PROTECTED]> wrote:
> On Thu, 01 Jun 2006 15:12:23 -0700
> [EMAIL PROTECTED] wrote:
>
> #> I believe that 'is' tests equality of reference, such that
> #>
> #> >>> a = range(1,3)
> #> >>> b = range(1,3)
> #> >>> a is b
> #> False
> #>
> #> The 'is' operator tells you wh
Slawomir Nowaczyk <[EMAIL PROTECTED]> wrote:
> On Thu, 01 Jun 2006 13:40:34 -0700
> [EMAIL PROTECTED] wrote:
>
> #> Scott David Daniels wrote:
> #> > Would you say that envelope containing five $100 bills is equal to
> #> > an envelope containing five $100 bills with different serial numbers?
>
<[EMAIL PROTECTED]> wrote:
...
> I agree with Alex that checking for this type of inequality is not a
> trivial programming exercise. It requires (at least) a parallel
I'm not asking for ANY programming: I'm asking for a *straightforward
operational definition*. If the concept which you hanke
<[EMAIL PROTECTED]> wrote:
> Hi Alex,
> With all due respect to your well-deserved standing in the Python
> community, I'm not convinced that equality shouldn't imply invariance
> under identical operations.
So, why aren't you satisfying my request? Provide a simple concrete
definition of what y
Fredrik Lundh wrote:
> "Manoj Kumar P" wrote:
> > Can anyone tell me a good python editor/IDE?
> emacs!
[...]
Fredrik Lundh wrote:
> "Manoj Kumar P" wrote:
> > Can anyone tell me a good python editor/IDE?
> vim!
There is much truth in this man's replies. ;-D
Cheers,
Terry
--
Terry Hancock
Neuruss wrote:
> I'm sorry for asking about another language here, but since I only know
> Python and I'm trying to write something in C#, I guess this is the
> best place...
>
Bad guess. Ask questions about language X on comp.lang.X
--
http://mail.python.org/mailman/listinfo/python-list
I'm sorry for asking about another language here, but since I only know
Python and I'm trying to write something in C#, I guess this is the
best place...
I'd like to know how to write this in C#:
x=[]
sz = 1000
x.extend(range(sz))
My question is about "range" and "extend". Is there any equiv
Hi,
It's been claimed that inheritance structures are less important in dynamic
languages like Python. Why is that and where can i read more about that?
/Marv
--
http://mail.python.org/mailman/listinfo/python-list
Dear A.M.,
The day is complete. My TPS reports still aren't on my desk. Either
with or without cover sheets. Not a good time to try to teach yourself
a new language. Please gather your belongings and move down to basement
storage C.
That'd be great,
Bill Lumberg
John Machin wrote:
> A.M wrote:
>
Thanks for help. Is there any comprehensive library for number formatting
available on the net?
Alan
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Michael Yanowitz <[EMAIL PROTECTED]> wrote:
.
.
.
>2) Change the text of a label or button that is already drawn?
>
> based on actions taken by the user. Can it be done without destroying
>the p
In article <[EMAIL PROTECTED]>,
Michael Yanowitz <[EMAIL PROTECTED]> wrote:
>Hello:
>
>
> I have a Tkinter GUI Dialog with many buttons and labels and text
>widgets.
>What I would like to do is, can I:
>
>1) Disable/deactivate/hide a button, text widget that is already drawn (and
> of course th
[EMAIL PROTECTED] wrote:
> A.M wrote:
> > Hi,
> >
> > Is there any built in feature in Python that can format long integer
> > 123456789 to 12,3456,789 ?
> >
> > Thank you,
> > Alan
>
> I did this for putting commas into monetary amounts (thus the .2f):
>
> def commas(value):
> return "".j
> ## x.py and y.py (they are identical) ##
> import testexec
> print "1:", v, testexec.v
> testexec.v = 7
Oops, testexec should be changed to t instead. That is:
## x.py and y.py (they are identical) ##
import t
print "1:", v, t.v
t.v = 7
--
http://mail.python.or
I am seeing something strange with execfile. I've simplified the code
to:
## t.py ##
print "here"
v = None
def f():
global v
v = 6
if __name__ == "__main__":
f()
print "0:", v
execfile("x.py")
print "0:", v
execfile("y.py")
print "0:", v
#
John Machin wrote:
> A.M wrote:
> > Hi,
> >
> > Is there any built in feature in Python that can format long integer
> > 123456789 to 12,3456,789 ?
> >
>
> Sorry about my previous post. It would produce 123,456,789.
> "12,3456,789" is weird -- whose idea PHB or yours??
If it's not a typo, it's pro
A.M wrote:
> Hi,
>
> Is there any built in feature in Python that can format long integer
> 123456789 to 12,3456,789 ?
>
> Thank you,
> Alan
I did this for putting commas into monetary amounts (thus the .2f):
def commas(value):
return "".join(commafy("%.2f" % value))
def commafy(s):
A.M wrote:
> Is there any built in feature in Python that can format long integer
> 123456789 to 12,3456,789 ?
The locale module can help you here:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'English_United States.1252'
>>> locale.format('%d', 123456789, True)
'123,456,78
A.M wrote:
> Hi,
>
> Is there any built in feature in Python that can format long integer
> 123456789 to 12,3456,789 ?
>
Sorry about my previous post. It would produce 123,456,789.
"12,3456,789" is weird -- whose idea PHB or yours??
--
http://mail.python.org/mailman/listinfo/python-list
A.M wrote:
> The application is not mission critical system. It is just a simple
> reporting tool.
Famous last words.
--
http://mail.python.org/mailman/listinfo/python-list
On 2/06/2006 9:08 AM, A.M wrote:
> Hi,
>
> Is there any built in feature in Python that can format long integer
> 123456789 to 12,3456,789 ?
>
> Thank you,
> Alan
Not that I know of, but this little kludge may help:
8<---
import re
subber = re.compile(r'^(-?\d+)(\d{3})').sub
def fmt_thousands
Joel Kolstad wrote:
> Just curious... I have plenty of programming background (C++ being the
> closest
> to Python), and I have a copy of Lutz's "Learning Python," but before I dive
> head-first into that tome, does anyone know of a web-based or CD/DVD-based
> training class that's priced for i
On 2/06/2006 8:36 AM, Paddy wrote:
> [EMAIL PROTECTED] wrote:
>> hello,
>>
>> i'm looking for a way to have a list of number grouped by consecutive
>> interval, after a search, for example :
>>
>> [3, 6, 7, 8, 12, 13, 15]
>>
>> =>
>>
>> [[3, 4], [6,9], [12, 14], [15, 16]]
>>
>> (6, not following 3,
BartlebyScrivener wrote:
>>>that one column is always the same, the name of the host that
>>>the database resides on.
>
>
> Then why are you pulling all of the other stuff out of the db? Why
> don't you just
>
> UPDATE tablename
> SET hostname(or colname) = 'localhost'
> WHERE search con
>> that one column is always the same, the name of the host that
>> the database resides on.
Then why are you pulling all of the other stuff out of the db? Why
don't you just
UPDATE tablename
SET hostname(or colname) = 'localhost'
WHERE search condition = the rows you want to change
--
Just curious... I have plenty of programming background (C++ being the closest
to Python), and I have a copy of Lutz's "Learning Python," but before I dive
head-first into that tome, does anyone know of a web-based or CD/DVD-based
training class that's priced for individuals?
Example of what I'
A.M wrote:
> Do we have the conditional expressions in Python 2.4?
No.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://
Hi,
Is there any built in feature in Python that can format long integer
123456789 to 12,3456,789 ?
Thank you,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]:
>are there any specific groups for zope / plone regarding questions?
Try plone-users: http://plone.org/support
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am using Python 2.4. I read the PEP 308 at:
http://www.python.org/dev/peps/pep-0308/
I tried the statement:
a= "Yes" if 1==1 else "No"
but the interpreter doesn't accept it.
Do we have the conditional expressions in Python 2.4?
Thank you,
Alan
--
http://mail.python.org/
In article <[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
>
>What I ran was more like the version below, but i did a quick
>separation of the line that has the ';' in it and goofed.
>
def interv2(inlist):
>...for i,val in enumerate(inlist):
>...if i==0:
>...
In article <[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
>I did a little re-arranging of the generator version:
>
>def interv3(inlist):
>tmp = inlist[0]
>valinc = tmp+1
>for val in inlist[1:]:
>if val != valinc:
>yield [tmp, valinc];
>tmp = val
>
Brian wrote:
> Captain Dondo wrote:
>
>>What I'd like to do is build the correct selectlist in the first place,
>>rather than build the wrong one and then rebuild a correct one.
>
>
> This is sounding more like a SQL/DB problem and less like a Python one.
> If you have a field that is being pul
Max a écrit :
(snip)
> But now I'm ready to do it in the real world. Nothing complicated, but a
> real project. And I have to choose my tools. Zope, Plone, Django, what
> are these?
Zope -> an application server
Plone -> a CMS built upon Zope
Django -> a MVC fullstack framework (fullstack : int
Jim Segrave wrote:
> In article <[EMAIL PROTECTED]>,
> Paddy <[EMAIL PROTECTED]> wrote:
> >=== interv2 ===
> def interv2(inlist):
> >... for i,val in enumerate(inlist):
> >... if i==0:
> >... tmp = val
> >... elif val != valinc:
> >... yiel
In article <[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
>=== interv2 ===
def interv2(inlist):
>...for i,val in enumerate(inlist):
>...if i==0:
>...tmp = val
>...elif val != valinc:
>...yield [tmp, valinc]
>...
Captain Dondo wrote:
> What I'd like to do is build the correct selectlist in the first place,
> rather than build the wrong one and then rebuild a correct one.
This is sounding more like a SQL/DB problem and less like a Python one.
If you have a field that is being pulled from the database that
I did a little re-arranging of the generator version:
def interv3(inlist):
tmp = inlist[0]
valinc = tmp+1
for val in inlist[1:]:
if val != valinc:
yield [tmp, valinc];
tmp = val
valinc = val+1
yield [tmp, valinc]
--
http://mail.python.org/m
On 2/06/2006 4:18 AM, Serge Orlov wrote:
> Giovanni Bajo wrote:
>> John Machin wrote:
>>> I am an idiot, so please be gentle with me: I don't understand why you
>>> are using struct.pack at all:
>> Because I want to be able to parse largest chunks of binary datas with custom
>> formatting. Did you
[EMAIL PROTECTED] wrote:
> Hi,
> I have a python app that runs fine on MacOS X and Fedora Core 5.
>
> This evening I dragged the folder over to my windows partition and
> tried to run the rascal.
>
> The program starts up fine but at the first call to create a Table
> object
> I get
>
> Traceback
On Thu, 01 Jun 2006 15:12:23 -0700
[EMAIL PROTECTED] wrote:
#> I believe that 'is' tests equality of reference, such that
#>
#> >>> a = range(1,3)
#> >>> b = range(1,3)
#> >>> a is b
#> False
#>
#> The 'is' operator tells you whether a and b refer to the same object.
#> What I've been discussing
[EMAIL PROTECTED] wrote:
> hello,
>
> i'm looking for a way to have a list of number grouped by consecutive
> interval, after a search, for example :
>
> [3, 6, 7, 8, 12, 13, 15]
>
> =>
>
> [[3, 4], [6,9], [12, 14], [15, 16]]
>
> (6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 =>
>
David Isaac wrote:
> 2. Is this a good argmax (as long as I know the iterable is finite)?
> def argmax(iterable): return max(izip( iterable, count() ))[1]
Other than the subtle difference that Peter Otten pointed out, that's a
good method.
However if the iterable is a list, it's cleaner (and more
On Thu, 2006-06-01 at 08:31 -0400, Michael Yanowitz wrote:
> Hello:
>
>
>I have a Tkinter GUI Dialog with many buttons and labels and text
> widgets.
> What I would like to do is, can I:
>
> 1) Disable/deactivate/hide a button, text widget that is already drawn (and
>of course the opposi
Please don't post non-text message bodies to discussion
forums. Message bodies should be plain text.
"Anthra Norell" <[EMAIL PROTECTED]> writes:
> If a piece of code exits with an exception before it closes an open
> file, that file seems to remain locked, which is real pain in the
> butt
You wi
Dennis Lee Bieber wrote:
> On 1 Jun 2006 03:29:35 -0700, "Brian" <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
> > Thank you for that response. Your code was very helpful to me. I
> > think that actually seeing how it should be done in Python was a lot
> > more educational
BartlebyScrivener wrote:
>>>I've looked at various search-and-replace snippets but none that address
>>>what I am trying to do
>
>
> I think you need to tell more about what you're trying to do. You say
> it's in a database? Is that why you can't just put the whole blob in
> your text editor
[EMAIL PROTECTED] wrote:
> i'm looking for a way to have a list of number grouped by consecutive
> interval, after a search, for example :
>
> [3, 6, 7, 8, 12, 13, 15]
>
> =>
>
> [[3, 4], [6,9], [12, 14], [15, 16]]
>
> (6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 =>
> [6:9], and
I believe that 'is' tests equality of reference, such that
>>> a = range(1,3)
>>> b = range(1,3)
>>> a is b
False
The 'is' operator tells you whether a and b refer to the same object.
What I've been discussing is whether == should test for "structural"
equality so that a and b remain equivalent u
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>hello,
>
>i'm looking for a way to have a list of number grouped by consecutive
>interval, after a search, for example :
>
>[3, 6, 7, 8, 12, 13, 15]
>
>=>
>
>[[3, 4], [6,9], [12, 14], [15, 16]]
>
>(6, not following 3, so 3 => [3:4] ; 7, 8
On Thu, 01 Jun 2006 13:40:34 -0700
[EMAIL PROTECTED] wrote:
#> Scott David Daniels wrote:
#> > Would you say that envelope containing five $100 bills is equal to
#> > an envelope containing five $100 bills with different serial numbers?
#> Yes (unless I was testing the assertion that the second e
Laszlo Nagy <[EMAIL PROTECTED]> writes:
[...]
> how can I return the redirection URL?
> I tried to get this information from the exception but I could not. Is
> it possible to read it from the openerdirector?
> Any suggestions?
>
>
> try:
>self.post_multipart(
>
Edward Elliott <[EMAIL PROTECTED]> writes:
> John J. Lee wrote:
>
> > find / -maxdepth 3 -size -100k -type f -exec grep -sli pythonpath '{}' \;
> >
> >
> > The minus in '-100k' (meaning "less than 100k") seems to be
> > undocumented, at least on my system.
>
> It should be standard in linux
Truthfully, I wouldn't mind it at all. In Python, I frequently write
things like
i == int(f)
or vice versa just to avoid subtle bugs that sometimes creep in when
later modifications to code change the original assumptions.
When working in C, I always set the compiler for maximum warnings and
d
Yes, it saved my time big time.
Thank you Bruno.
I use the print >>>file to generate HTML files. print is very flexible and
nice.
The dictionary formatting that Brunto said is awesome!
Thanks again,
Alan
"Jon Clements" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Di
>> I've looked at various search-and-replace snippets but none that address
>> what I am trying to do
I think you need to tell more about what you're trying to do. You say
it's in a database? Is that why you can't just put the whole blob in
your text editor and do search-and-replace?
And is t
[EMAIL PROTECTED] wrote:
> i'm looking for a way to have a list of number grouped by consecutive
> interval, after a search, for example :
>
> [3, 6, 7, 8, 12, 13, 15]
>
> =>
>
> [[3, 4], [6,9], [12, 14], [15, 16]]
>
> (6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 =>
> [6:9]
Le Jeudi 01 Juin 2006 18:00, [EMAIL PROTECTED] a écrit :
> Perhaps the most fundamental notion is mathematics is that the left and
> right sides of an equation remain identical after any operation applied
> to both sides.
IMHO, you are not aware that the '=' symbol of mathematics exists in python,
I meant 'trailing': not leading.
mea culpa.
Jon.
Jon Clements wrote:
> Didn't know of the >> syntax: lovely to know about it Bruno - thank
> you.
>
> To the OP - I find the print statement useful for something like:
> print 'this','is','a','test'
> >>> 'this is a test'
> (with implicit newline
On 2/06/2006 3:44 AM, Giovanni Bajo wrote:
> John Machin wrote:
>
>>> Looks like you totally misread my message.
>> Not at all.
>>
>> Your function:
>>
>> def mystring_pack(s):
>> if len(s) > 20:
>> raise ValueError, "a mystring can be at max 20 chars"
>> s = (s + "\0"*20)[:20]
Skip over the file in question when you first are zipping the directory.
Unfortunately you cannot replace or remove a file from a zip without unzipping
and rezipping all the contents.
-Chris
On Wed, May 31, 2006 at 03:10:53PM +0800, majj81 wrote:
>hi:
> Good afternoon.
> Has this pr
Captain Dondo wrote:
> I have an array(?) (sorry, I'm new* to python so I'm probably mangling
> the terminology) that looks like this:
>
> [((1028L, datetime.datetime(2006, 5, 30, 7, 0), datetime.datetime(2006,
> 5, 30, 7, 30), 'Arthur', 'Prunella Sees the Light; Return of the
> Snowball', 'Prunel
Didn't know of the >> syntax: lovely to know about it Bruno - thank
you.
To the OP - I find the print statement useful for something like:
print 'this','is','a','test'
>>> 'this is a test'
(with implicit newline and implicit spacing between parameters)
If you want more control (more flexibility,
[EMAIL PROTECTED] wrote:
> does anyone know a module or something to convert numbers like integer
> to binary format ?
>
> for example I want to convert number 7 to 0111 so I can make some
> bitwise operations...
>
> Thanks
Use the gmpy module.
>>> import gmpy
>>> a = 14
>>> b = 7
>>> c = 8
>>>
hello,
i'm looking for a way to have a list of number grouped by consecutive
interval, after a search, for example :
[3, 6, 7, 8, 12, 13, 15]
=>
[[3, 4], [6,9], [12, 14], [15, 16]]
(6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 =>
[6:9], and so on)
i was able to to it withou
Roger Upole wrote:
>
> "Hari Sekhon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi,
>> Is there a way of sending winpops (Windows Pop-Up / Net Send messages)
>> in python?
>>
>> Perhaps some library or something that I can use under both Windows and
>> Linux?
>>
>> Hari
I have an array(?) (sorry, I'm new* to python so I'm probably mangling
the terminology) that looks like this:
[((1028L, datetime.datetime(2006, 5, 30, 7, 0), datetime.datetime(2006,
5, 30, 7, 30), 'Arthur', 'Prunella Sees the Light; Return of the
Snowball', 'Prunella prepares for a sleepover wi
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A.M wrote:
>
>> This is my 1st day that I am seriously diving into Python and I have to
>> finish this application by the end of today. Maybe it wasn't a good idea
>> to choose the language that I don't know when I ha
[EMAIL PROTECTED] wrote:
> With all due respect to your well-deserved standing in the Python
> community, I'm not convinced that equality shouldn't imply invariance
> under identical operations.
Doo you really want
2 == 2.0
to be False?
--
Erik Max Francis && [EMAIL PROTECTED] && http
Oh, thanks a lot Rob.
Bernard
On 6/1/06, Rob Williscroft <[EMAIL PROTECTED]> wrote:
> Bernard Lebel wrote in news:mailman.6413.1149178158.27775.python-
> [EMAIL PROTECTED] in comp.lang.python:
>
> > Hello,
> >
> > Is there an option or a way to allow the selection of multiple entries
> > in th
Yes (unless I was testing the assertion that the second envelope did
not contain counterfeits of the first)
Scott David Daniels wrote:
> Would you say that envelope containing five $100 bills is equal to
> an envelope containing five $100 bills with different serial numbers?
--
http://mail.pytho
I use Python/XML packages are xml.dom.minidom and xml.dom.ext (second
just for PrettyPrint)
--
http://mail.python.org/mailman/listinfo/python-list
I've never done anything on the web. I mean, never developed anything.
(I've got accounts on dA and wikipedia and half-a-dozen other things; I
know HTML and enough JavaScript to hack away at it when friends need help).
Mostly because I've never had anything worth doing: I've written a set
of py
Considering the number of new programmers who get bit by automatic
coercion, I wish Dennis Ritchie had made some different choices when he
designed C. But then I doubt he ever dreamed it would become so wildly
successful.
Being a curmudgeon purist I'd actually prefer it if Python raised a
TypeErr
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A.M wrote:
>
>> This is my 1st day that I am seriously diving into Python and I have to
>> finish this application by the end of today. Maybe it wasn't a good idea
>> to choose the language that I don't know when I h
Fredrik Lundh napisał(a):
>>Can anyone tell me a good python editor/IDE?
>
> vim!
jEdit!
>>It would be great if you can provide the download link also.
>
> google it!
google it!
:D(I love these Vim <-> Emacs disputes)
--
Jarek Zgoda
http://jpa.berlios.de/
--
http:/
A.M a écrit :
> Hi,
>
>
> I found print much more flexible that write method. Can I use print instead
> of file.write method?
>
f = open("/path/to/file")
print >> f, "this is my %s message" % "first"
f.close()
To print to stderr:
import sys
print >> sys.stderr, "oops"
FWIW, you and use stri
"BartlebyScrivener" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Are you trying to get banned, or what?
>
> It's the equivalent of me asking you:
>
> Hey, does Ruby have anything like dictionaries and will you teach me
> about strings? Oh, and what's an object?
>
> Go read the b
1 - 100 of 277 matches
Mail list logo