7stud <[EMAIL PROTECTED]> wrote:
> Used copies of computer books for out of date editions are always
> cheap. "Python in a Nutshell (2nd ed)" is a reference book with a
> frustratingly poor index--go figure. It also contains errors not
> posted in the errata.
You can always enter errata at
On Sun, 16 Sep 2007 00:40:13 +, Steven D'Aprano wrote:
> On Sun, 16 Sep 2007 00:05:58 +, Marc 'BlackJack' Rintsch wrote:
>
> In *general* the compiler can't tell, but in specific cases it could. A
> (hypothetical) optimizing compiler would tell the difference between:
>
>
> for item in
I'm trying to detect and intelligently deal with problems created when a
user of a Python CGI page uploads a file and then gets impatient and
clicks on some other button or the browser's cancel button (or even
closes the page). If the file is large enough, and the user is
impatient enough, thi
On Sep 14, 10:30 am, Mark Morss <[EMAIL PROTECTED]> wrote:
> I would like to construct a class that includes both the integers and
> None. I desire that if x and y are elements of this class, and both
> are integers, then arithmetic operations between them, such as x+y,
> return the same result as
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> In *general* the compiler can't tell, but in specific cases it
> could. A (hypothetical) optimizing compiler would tell the
> difference between:
>
> for item in alist[1:5]:
> print item # no possible side-effects
The 'print' statement converts t
Rob E wrote:
> On Sat, 15 Sep 2007 03:25:27 +, mouseit wrote:
>
>> I'm trying to add an element to a list which is a property of an
>> object, stored in an array. When I append to one element, all of the
>> lists are appended!
>>
>> Example Code:
>>
>> class Test:
>> array = []
>>
>> myTes
Grant Edwards wrote:
> On 2007-09-15, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Grant Edwards wrote:
>>> On 2007-09-15, Erik Jones <[EMAIL PROTECTED]> wrote:
>>>
>> print ''.join([str(i) for i in [1,2,3]])
> It's better to use generator comprehension instead of LC:
>
> ",".join(str(
On Sat, 15 Sep 2007 03:25:27 +, mouseit wrote:
> I'm trying to add an element to a list which is a property of an
> object, stored in an array. When I append to one element, all of the
> lists are appended!
>
> Example Code:
>
> class Test:
> array = []
>
> myTests = [Test() , Test() ,
Anybody introdcing something on the subject?
--
http://mail.python.org/mailman/listinfo/python-list
:)
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> On 16/09/2007 8:11 AM, James Stroud wrote:
>> Steve Holden wrote:
>>> I don't know why you have a bug up your ass about it, as the
>>> Americans say.
>> I think most Americans say "wild hare up your ass".
>
> The essence of Steve's point appears to be that the OP has ridden in
On Sat, 15 Sep 2007 02:45:10 -0700, James Stroud wrote:
> Steven D'Aprano wrote:
>> On Fri, 14 Sep 2007 18:19:45 -0700, James Stroud wrote:
>>
How do I subclass int and/or long so that my class also auto-converts
only when needed?
>>> Use __new__.
>>
>> The disadvantage of that is
On Sun, 16 Sep 2007 09:14:57 +0900, Ryan Ginstrom wrote:
>> On Behalf Of J. Cliff Dyer
>> On the other hand, this is just as bad:
>>
>> [ ( y ) for ( x , y ) in [ ( "foo" , 2 ) , ( "bar" , 4 ) ] if "foo" in
>> ( x ) ]
>
> I think that's allowed in order to recruit C/C++ programmers.
Heh :)
In
On 9 16 , 2 51 , [EMAIL PROTECTED] wrote:
> http://freesoftwareupgrades.blogspot.com/
what
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 16 Sep 2007 00:05:58 +, Marc 'BlackJack' Rintsch wrote:
> On Sat, 15 Sep 2007 14:58:15 -0700, James Stroud wrote:
>
>> I was staring at a segment of code that looked like this today:
>>
>> for something in stuff[x:y]:
>> whatever(something)
>>
>> and was wondering if the c
On Sat, 15 Sep 2007 16:07:07 +, Grant Edwards wrote:
> It's nice people have invented so many ways to spell the builting "map"
> ;)
>
",".join(map(str,[1,2,3]))
> '1,2,3'
The oldest solution, and if not the fastest, at least neck-and-neck with
the list comprehension.
>>> timeit.Time
Marc 'BlackJack' Rintsch wrote:
> But please don't use the functions in `string` that are also available as
> methods on strings. Those functions are deprecated.
>
>
Meaning (for newbie clarification):
instead of string.upper(s2), just do s2.upper(). For more detail, see
the docs.
--
http
> On Behalf Of J. Cliff Dyer
> On the other hand, this is just as bad:
>
> [ ( y ) for ( x , y ) in [ ( "foo" , 2 ) , ( "bar" , 4 ) ] if
> "foo" in ( x ) ]
I think that's allowed in order to recruit C/C++ programmers.
Regards,
Ryan Ginstrom
--
http://mail.python.org/mailman/listinfo/python-li
On Sat, 15 Sep 2007 14:15:20 +, brus stoc at gmail dot com wrote:
[snip spam]
> Hey, thanks for spamming our group.
You know, there are probably millions of people who never received the
original spam because their Usenet provider does a good job of filtering
out crud, and they wouldn't e
On Sat, 15 Sep 2007 14:58:15 -0700, James Stroud wrote:
> I was staring at a segment of code that looked like this today:
>
> for something in stuff[x:y]:
> whatever(something)
>
> and was wondering if the compiler really made a copy of the slice from
> stuff as the code seems to sugg
On Sat, 15 Sep 2007 19:52:47 -0400, Shawn Minisall wrote:
> Hi everyone, I'm a beginning programming student in Python and have a
> few questions regarding strings.
>
> If s1 = "spam"
>
> If s2 = "ni!"
>
> 1. Would string.ljust(string.upper(s2),4) * 3 start it at the left
> margin and move it
On Sat, 15 Sep 2007 15:56:40 +0200, Arnau Sanchez wrote:
> js escribió:
>
>>> On 9/15/07, Summercool <[EMAIL PROTECTED]> wrote:
>
>>> in Python... is the method to use ",".join() ? but then it must take
>>> a list of strings... not integers...
>>>
>>> any fast method?
>
> > print ''.join([st
Hi everyone, I'm a beginning programming student in Python and have a
few questions regarding strings.
If s1 = "spam"
If s2 = "ni!"
1. Would string.ljust(string.upper(s2),4) * 3 start it at the left
margin and move it 12 spaces to the right because of the 4 *3? If so,
why is it in the parath
Terry Carroll wrote:
>
> 2) The variable "skip: set to False on the first iteration, and then
> set to True on subsequent iterations? Note that this happens even if
> no buttons are selected. This is just a weirdness to me, and not my
> main concern, but I thought I'd mention it in case it's rele
On 16/09/2007 8:11 AM, James Stroud wrote:
> Steve Holden wrote:
>> I don't know why you have a bug up your ass about it, as the
>> Americans say.
>
> I think most Americans say "wild hare up your ass".
The essence of Steve's point appears to be that the OP has ridden into
town to preach a misgu
On Sep 14, 11:57 pm, Terry Carroll <[EMAIL PROTECTED]> wrote:
> I'm trying to use wx.ProgressBar, and the cancel button is not
> responding.
>
> Here is a simple program that exhibits the problem:
>
> #
> import wx
> import time
>
> max = 10
Terry Carroll wrote:
> I'm trying to use wx.ProgressBar, and the cancel button is not
> responding.
>
> Here is a simple program that exhibits the problem:
>
> #
> import wx
> import time
>
> max = 10
> app = wx.PySimpleApp()
> dlg = wx.Prog
Pretend that you have a number that is always pointing somewhere in
your temporary file.
It starts a 0.
If you then write "lalalala" (8 characters) it will point after these
at position 8, so that you can write more stuff after your previous
text later by calling write.
The read method reads all t
[EMAIL PROTECTED] wrote:
> On Sep 15, 5:24 pm, buffi <[EMAIL PROTECTED]> wrote:
>> On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>>> Hello everyone,
>>> I'm trying to test the tempfile module with the following script,
>>> which basically creates a temporary file,
On 2007-09-15, Robert Kern <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> On 2007-09-15, Erik Jones <[EMAIL PROTECTED]> wrote:
>>
> print ''.join([str(i) for i in [1,2,3]])
It's better to use generator comprehension instead of LC:
",".join(str(i) for i in [1, 2, 3])
>>> Wh
On Sep 16, 12:25 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
> This is a case where its up to the type involved. For example,
> xrange() slices the way you want but range() does not.
Coul you explain this?
As far as I know you can't slice a xrange
- Björn Kempén
--
http://mail.python.org/m
On Sep 14, 11:57 pm, Terry Carroll <[EMAIL PROTECTED]> wrote:
> I'm trying to use wx.ProgressBar, and the cancel button is not
> responding.
>
> Here is a simple program that exhibits the problem:
>
> #
> import wx
> import time
>
> max = 10
This is a case where its up to the type involved. For example,
xrange() slices the way you want but range() does not. Maybe a type
would return for slices a proxy object that got the value by index or
maybe it knows that it makes more sense to give you a copy because
changes during the iteration sh
On Sep 16, 12:20 am, James Stroud <[EMAIL PROTECTED]> wrote:
> buffi wrote:
> > On Sep 15, 11:58 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> >> Hello all,
>
> >> I was staring at a segment of code that looked like this today:
>
> >> for something in stuff[x:y]:
> >> whatever(something)
buffi wrote:
> On Sep 15, 11:58 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> Hello all,
>>
>> I was staring at a segment of code that looked like this today:
>>
>> for something in stuff[x:y]:
>> whatever(something)
>>
>> and was wondering if the compiler really made a copy of the slice
On Sep 15, 5:24 pm, buffi <[EMAIL PROTECTED]> wrote:
> On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hello everyone,
>
> > I'm trying to test the tempfile module with the following script,
> > which basically creates a temporary file, fills the file with some
> > t
On Sep 15, 11:58 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I was staring at a segment of code that looked like this today:
>
> for something in stuff[x:y]:
> whatever(something)
>
> and was wondering if the compiler really made a copy of the slice from
> stuff as the co
Steve Holden wrote:
> I don't know why you have a bug up your ass about it, as the
> Americans say.
I think most Americans say "wild hare up your ass". We do not, in fact,
say "wild hair up your ass". Many of us can testify that a hair up one's
ass would be nothing terribly unusual and would go
On Sep 15, 11:49 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> buffi wrote:
> > On Sep 15, 10:11 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> >> buffi wrote:
> >>> Am I the only one that thinks that python statements should force
> >>> whitespace before and after them?
> >>> Right now this is n
Hello all,
I was staring at a segment of code that looked like this today:
for something in stuff[x:y]:
whatever(something)
and was wondering if the compiler really made a copy of the slice from
stuff as the code seems to suggest, or does it find some way to produce
an iterator witho
buffi wrote:
> On Sep 15, 10:11 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
>> buffi wrote:
>>> Am I the only one that thinks that python statements should force
>>> whitespace before and after them?
>>> Right now this is not enforced and for an example these statements are
>>> valid
>>> print"h
US patent application services:
http://www.pinskylaw.ca/Practice/OntarioTorontoLawyers/business_patents.htm
--
http://mail.python.org/mailman/listinfo/python-list
I can't see to get any y, x coordinates to work with curses. Here is
an example:
import curses
def my_program(screen):
while True:
ch = screen.getch()
if ch == ord("q"):
break
if ch <= 255:
screen.addstr(30, 10, "*%s*" % chr(ch))
sc
On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I'm trying to test the tempfile module with the following script,
> which basically creates a temporary file, fills the file with some
> test data and prints it.
>
> import tempfile
>
> t = tempfile.TemporaryF
On Sep 15, 3:55 pm, [EMAIL PROTECTED] wrote:
> Hi,everyone: I am a c programmer,and want using Python instead of C
> I can change backcolor using C,like this:
>
> textbackground(color);
>
> How can I do in Python?
>
> Best regards
>
> 点 击 此 处!免 费 试 玩 07 年 最 受 期 待 的 游 戏 大 作 !
textbackgrou
On Sep 15, 10:11 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> buffi wrote:
> > Am I the only one that thinks that python statements should force
> > whitespace before and after them?
>
> > Right now this is not enforced and for an example these statements are
> > valid
>
> > print"hello"
> > "f
Hello everyone,
I'm trying to test the tempfile module with the following script,
which basically creates a temporary file, fills the file with some
test data and prints it.
import tempfile
t = tempfile.TemporaryFile()
t.write("lalalala")
t.flush()
print t.read()
Unfortunately, the print statem
Hi,everyone: I am a c programmer,and want using Python instead of C
I can change backcolor using C,like this:
textbackground(color);
How can I do in Python?
Best regards
点 击 此 处!免 费 试 玩 07 年 最 受 期 待 的 游 戏 大 作 ! --
http://mail.python.org/mailman/listinfo/python-list
awesome!
I should see it in about 2 wks.. im poor. So I choose super snail mail.
LN
--
http://mail.python.org/mailman/listinfo/python-list
Wow I just got it, and its nice doesn't even look used god damn. :D.
On 9/14/07, Lamonte Harris <[EMAIL PROTECTED]> wrote:
>
> Lol, you bought it, dude theres not one left imho. When I bought it, it
> still said 1 More left Lol...mines should be her no less then a hour -.-...
> Taking SO LONG.
>
On Sat, 15 Sep 2007 19:34:45 +0300, Konstantinos Pachopoulos wrote:
> Hi,
> i have the following string s and the following code, which doesn't
> successfully remove the "\", but sucessfully removes the "\\".
There is no \\ in the string; there's one \ , which gets succesfully
removed.
> >>> s=
On 9/15/07, J. Cliff Dyer <[EMAIL PROTECTED]> wrote:
> And I'd hate to have to remember all of the rules for what can go
> together and what can't, especially when it comes time to debug. No.
> I don't think it should be forced, but maybe put it in PEP8 or PEP3008.
It is: see "Whitespace in Expre
buffi wrote:
> Am I the only one that thinks that python statements should force
> whitespace before and after them?
>
> Right now this is not enforced and for an example these statements are
> valid
>
> print"hello"
> "foo"if"bar"else"foobar"
> for(x,y)in[(1,2),(3,4)]:print(x,y)
> [(y)for(x,y)in[(
Hi,
From
http://www.pyzine.com/Issue008/Section_Articles/article_Encodings.html#guessing-the-encoding:
> The way to access the information about the "normal" encoding used on the
> current computer is through the locale module. Before using locale to
> retrieve the information you want, you need
buffi wrote:
> Am I the only one that thinks that python statements should force
> whitespace before and after them?
>
> Right now this is not enforced and for an example these statements are
> valid
>
> print"hello"
> "foo"if"bar"else"foobar"
> for(x,y)in[(1,2),(3,4)]:print(x,y)
> [(y)for(x,y)in
On Sep 15, 12:57 am, Terry Carroll <[EMAIL PROTECTED]> wrote:
> I'm trying to use wx.ProgressBar, and the cancel button is not
> responding.
>
> Here is a simple program that exhibits the problem:
>
> #
> import wx
> import time
>
> max = 10
Konstantinos Pachopoulos wrote:
> Hi,
> i have the following string s and the following code, which doesn't
> successfully remove the "\", but sucessfully removes the "\\".
>
> >>> s="Sad\\asd\asd"
> >>> newS=""
> >>> for i in s:
> ... if i!="\\":
> ... newS=newS+i
> ...
> >>>
Am I the only one that thinks that python statements should force
whitespace before and after them?
Right now this is not enforced and for an example these statements are
valid
print"hello"
"foo"if"bar"else"foobar"
for(x,y)in[(1,2),(3,4)]:print(x,y)
[(y)for(x,y)in[("foo",2),("bar",4)]if"foo"in(x)
http://freesoftwareupgrades.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2007-09-15, Erik Jones <[EMAIL PROTECTED]> wrote:
>
print ''.join([str(i) for i in [1,2,3]])
>>> It's better to use generator comprehension instead of LC:
>>>
>>> ",".join(str(i) for i in [1, 2, 3])
>> Why is that? That entire expression must be evaluated to obtain
http://world-traveling-destinations.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards ha escrito:
> > Or, if you happen to like the itertools modules:
> >
> > from itertools import imap
> > ",".join(imap(str, [1, 2, 3]))
>
> It's nice people have invented so many ways to spell the
> builting "map" ;)
Did you wonder why the Python developers bother to implement "imap"
Diez B. Roggisch wrote:
> ctypes is for C. Where it is great to use.
if you need simple wrappers then swig and ctypes are both good since
they can generate it for you
pyrex is also good for wrapping and for writing c extension code
> If you need C++-wrapping, I recommend SIP.
i recommend py++
> > It's nice people have invented so many ways to spell the
> > builting "map" ;)
> >
> ",".join(map(str,[1,2,3]))
> > '1,2,3'
>
> IIRC, map's status as a builtin is going away.
Actually, py3k built-in map == itertools.imap
>>> map(str, [])
--
http://www.advogato.org/person/eopadoan/
Boo
Konstantinos Pachopoulos wrote:
> i have the following string s and the following code, which doesn't
> successfully remove the "\", but sucessfully removes the "\\".
>
s="Sad\\asd\asd"
newS=""
for i in s:
> ... if i!="\\":
> ... newS=newS+i
I'm not quite sure what
Hi,
i have the following string s and the following code, which doesn't
successfully remove the "\", but sucessfully removes the "\\".
>>> s="Sad\\asd\asd"
>>> newS=""
>>> for i in s:
... if i!="\\":
... newS=newS+i
...
>>> newS
'Sadasd\x07sd'
I have also read the following,
Free guitars here!!
http://freeguitars.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-09-15, Erik Jones <[EMAIL PROTECTED]> wrote:
>>> print ''.join([str(i) for i in [1,2,3]])
>>
>> It's better to use generator comprehension instead of LC:
>>
>> ",".join(str(i) for i in [1, 2, 3])
>
> Why is that? That entire expression must be evaluated to obtain the
> result, so what i
On Sep 15, 2007, at 11:07 AM, Grant Edwards wrote:
> On 2007-09-15, Arnau Sanchez <[EMAIL PROTECTED]> wrote:
>
in Python... is the method to use ",".join() ? but then it
must take a list of strings... not integers...
any fast method?
>>
>>> print ''.join([str(i) for i in [1,2,
On Sep 15, 2007, at 8:56 AM, Arnau Sanchez wrote:
> js escribió:
>
>>> On 9/15/07, Summercool <[EMAIL PROTECTED]> wrote:
>
>>> in Python... is the method to use ",".join() ? but then it must
>>> take
>>> a list of strings... not integers...
>>>
>>> any fast method?
>
>> print ''.join([str(i)
Hi list.
Is there any module that is compatible with RFC-3986 or 2396, which is like
Perl's URI module(http://search.cpan.org/~gaas/URI-1.35/URI.pm)?
I like to normalize lots of URIs I've got in my database to make them
all unique ones.
Thank you in advance.
--
http://mail.python.org/mailman/l
On 2007-09-15, Arnau Sanchez <[EMAIL PROTECTED]> wrote:
>>> in Python... is the method to use ",".join() ? but then it
>>> must take a list of strings... not integers...
>>>
>>> any fast method?
>
> > print ''.join([str(i) for i in [1,2,3]])
>
> It's better to use generator comprehension instead
On Sep 14, 2007, at 11:54 PM, David Trudgett wrote:
> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
>
>> The confusing way about the current Python method when you first
>> encounter it is
>> why is "self" being passed in when you write the function but not
>> when you call it. If the compiler is
On Sep 15, 2:07 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Sep 15, 10:56 pm, Paddy <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 14, 9:49 pm, Paddy <[EMAIL PROTECTED]> wrote:
>
> > > Lets say i have a generator running that generates successive
> > > characters of a 'string'>From what I know, if
On Sep 13, 5:50 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Rodney Maxwell wrote:
> > The following are apparently legal Python syntactically:
> >L[1:3, 8:10]
> >L[1, ..., 5:-2]
>
> > But they don't seem to work on lists:
> l = [0,1,2,3]
> l[0:2,3]
> > Traceback (most recent cal
On Sep 13, 5:50 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Rodney Maxwell wrote:
> > The following are apparently legal Python syntactically:
> >L[1:3, 8:10]
> >L[1, ..., 5:-2]
>
> > But they don't seem to work on lists:
> l = [0,1,2,3]
> l[0:2,3]
> > Traceback (most recent cal
On 9/15/07, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Fri, 14 Sep 2007 22:59:13 -0300, Eduardo O. Padoan wrote:
>
> > On 14 Sep 2007 18:08:00 -0700, Paul Rubin
> > <"http://phr.cx"@nospam.invalid> wrote:
> >> "Eduardo O. Padoan" <[EMAIL PROTECTED]> writes:
> >> > Not totally unrelated, but in Py3k
Stefan Behnel wrote:
> Diez B. Roggisch wrote:
>> Any suggestions on how to teach the built-in ET-parser entities?
>
> As you already do it in your code.
>
> http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
Hmmm, I never needed this, but the test doesn't work for m
How about using httplib?
http://docs.python.org/lib/httplib-examples.html
HTTPResponse has getheaders() method, too.
On 9/15/07, Johny <[EMAIL PROTECTED]> wrote:
> Can anyone provide an example how to find out the return code and
> header from an urllib2 request?
> For example
> response = url
Stefan Behnel schrieb:
> Diez B. Roggisch wrote:
>> Any suggestions on how to teach the built-in ET-parser entities?
>
> As you already do it in your code.
>
> http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
>
> But I guess your version of cET is just too old.
Un
Hi to all,
thanks for your help. The approach
print '\r\n'.join([x.strip() for x in
open('c:/flutest.txt') if 'e-0' in x])
works quite well :-)
Greetings!
Fabian
Fabian Braennstroem schrieb am 09/13/2007 09:09 PM:
> Hi,
>
> I would like to delete a region on a log file which has this
>
> Hey, thanks for spamming our group. Perhaps you should try again after
> you learn proper HTML coding.
> Results from http://validator.w3.org/ : Failed validation, 26 Errors
>
> Really, really doubt that you are doing anything but trying to gather
> e-mails. My 12 year old has made better sites.
Diez B. Roggisch wrote:
> Any suggestions on how to teach the built-in ET-parser entities?
As you already do it in your code.
http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
But I guess your version of cET is just too old.
Stefan
--
http://mail.python.org/mailma
Bryan Olson wrote:
> Amer Neely wrote:
>> This seems to indicate that maybe my host needs to configure Apache to
>> run python scripts? But I didn't need to do anything with mine.
>
> Another possibility: If it works on Windows but not Unix, check
> the end-of-line characters. Windows ends each l
On Sep 13, 3:37 am, [EMAIL PROTECTED] wrote:
> We are offering $2000 USD for the best website developed withwww.hatspin.com
>
> Are you up to it??
Hey, thanks for spamming our group. Perhaps you should try again after
you learn proper HTML coding.
Results from http://validator.w3.org/ : Failed val
Hi
First of all I am a beginner with python and I am a bit fooling around
to check wich possibilities I have. I'm trying to get some data to an
internal developped application.
Server: DDE
Topic: SCSDDeServer
Item: SendCustomerData
Item data: value, value, value
I got the following code
import
js escribió:
>> On 9/15/07, Summercool <[EMAIL PROTECTED]> wrote:
>> in Python... is the method to use ",".join() ? but then it must take
>> a list of strings... not integers...
>>
>> any fast method?
> print ''.join([str(i) for i in [1,2,3]])
It's better to use generator comprehension inste
Can anyone provide an example how to find out the return code and
header from an urllib2 request?
For example
response = urllib2.urlopen('http://www.google.com').read().strip()
provides data
but I do not know if the return code was 200 or different.
Thanks
--
http://mail.python.org/mailman/lis
Bryan Olson wrote:
> Amer Neely wrote:
>> This seems to indicate that maybe my host needs to configure Apache to
>> run python scripts? But I didn't need to do anything with mine.
>
> Another possibility: If it works on Windows but not Unix, check
> the end-of-line characters. Windows ends each l
I V wrote:
> On Thu, 13 Sep 2007 23:49:32 -0400, Amer Neely wrote:
>> In trying to track down why this script would not run on my host, it has
>> to come to light that Python is installed, however the Apache module is
>> not. So, short story is - I was flogging a dead horse.
>
> Which Apache modul
Le Fri, 14 Sep 2007 12:52:52 -0700, James Stroud a écrit:
[...]
> Other than that your strip() is stripping off some whitespace that is
> part of the name, I really can't see the problem either, but did you try
> to add in the explicit path? E.g.:
actually, the problem was in "while i <= len(li
In article <[EMAIL PROTECTED]>,
gamename <[EMAIL PROTECTED]> wrote:
>On Sep 13, 1:42 am, [EMAIL PROTECTED] wrote:
>> On Sep 12, 9:27 pm, gamename <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > Is it still the case there is no practical Expect-like module for
>> > win32? I know that cygwin can supp
On Sep 15, 10:56 pm, Paddy <[EMAIL PROTECTED]> wrote:
> On Sep 14, 9:49 pm, Paddy <[EMAIL PROTECTED]> wrote:
>
> > Lets say i have a generator running that generates successive
> > characters of a 'string'>From what I know, if I want to do a regexp search
> > for a pattern of
>
> > characters then
On Sep 14, 9:49 pm, Paddy <[EMAIL PROTECTED]> wrote:
> Lets say i have a generator running that generates successive
> characters of a 'string'>From what I know, if I want to do a regexp search
> for a pattern of
>
> characters then I would have to 'freeze' the generator and pass the
> characters
On Sep 15, 10:36 pm, Summercool <[EMAIL PROTECTED]> wrote:
> i think in Ruby, if you have an array (or list) of integers
>
> foo = [1, 2, 3]
>
> you can use foo.join(",") to join them into a string "1,2,3"
>
> in Python... is the method to use ",".join() ? but then it must take
> a list of string
print ''.join([str(i) for i in [1,2,3]])
On 9/15/07, Summercool <[EMAIL PROTECTED]> wrote:
> i think in Ruby, if you have an array (or list) of integers
>
> foo = [1, 2, 3]
>
> you can use foo.join(",") to join them into a string "1,2,3"
>
> in Python... is the method to use ",".join() ? but the
Hi,
this snippet, adapted from
http://svn.effbot.org/public/tags/celementtree-1.0-20050126/selftest.py
fails miserably with an unknown entity exception:
from xml.etree.cElementTree import *
ENTITY_XML = """
&entity;
"""
parser = XMLTreeBuilder()
parser.entity["entity"] = "text"
print parser.e
On Sat, 15 Sep 2007 12:36:02 +, Summercool wrote:
> i think in Ruby, if you have an array (or list) of integers
>
> foo = [1, 2, 3]
>
> you can use foo.join(",") to join them into a string "1,2,3"
>
> in Python... is the method to use ",".join() ? but then it must take
> a list of strings
On Sep 15, 9:55 pm, Boris Dušek <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for the best way to convert a string of length 1 (= 1
> character as string) to integer that has the same value as numeric
> representation of that character. Background: I am writing functions
> abstracting endiannes
i think in Ruby, if you have an array (or list) of integers
foo = [1, 2, 3]
you can use foo.join(",") to join them into a string "1,2,3"
in Python... is the method to use ",".join() ? but then it must take
a list of strings... not integers...
any fast method?
--
http://mail.python.org/mailm
1 - 100 of 118 matches
Mail list logo