On 2020-01-28 12:14 PM, L A Smit wrote:
Please help me with this.
squares =input("\nSquares: ")
print(float((squares) *float(.15)) *(1.3))
Cant print answer.
print(float((squares) * float(.15)) *(1.3))
TypeError: can't multiply sequence by non-int of type 'float'
You have some superfluo
Please help me with this.
squares =input("\nSquares: ")
print(float((squares) *float(.15)) *(1.3))
Cant print answer.
print(float((squares) * float(.15)) *(1.3))
TypeError: can't multiply sequence by non-int of type 'float'
Thx
L Smit
--
https://mail.python.org/mailman/listinfo/python-lis
On Sun, 17 Jan 2016 12:49 am, Robert James Liguori wrote:
> I'm doing a data conversion and all is garbled when I add an extra hundred
> lines to the print in my for loop. Is there a limit?
Is this the same problem as the "print size limit" thread you started one
minute earlier, or a different
On 16/01/2016 13:49, Robert James Liguori wrote:
I'm doing a data conversion and all is garbled when I add an extra hundred
lines to the print in my for loop. Is there a limit?
This will probably get answered under the thread with subject "print
size limit" that arrived one minute before th
I'm doing a data conversion and all is garbled when I add an extra hundred
lines to the print in my for loop. Is there a limit?
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Dec 5, 2014 at 10:31 AM, wrote:
>
> Hi Guys,
>
> I am trying to combine string and dict in the print statement, however
getting an error. Would someone let me know what will be correct way to do
that.
>
> stats={'lname': 'shah', 'fname':
gaurangns...@gmail.com wrote:
> I am trying to combine string and dict in the print statement, however
> getting an error. Would someone let me know what will be correct way to do
> that.
>
> stats={'lname': 'shah', 'fname': 'gaurang'}
Hi Guys,
I am trying to combine string and dict in the print statement, however getting
an error. Would someone let me know what will be correct way to do that.
stats={'lname': 'shah', 'fname': 'gaurang'}
a=test
print "%s %(fname)s %(lname)s&quo
On Thu, Aug 28, 2014 at 8:23 AM, KS wrote:
> Can you please let me know where do I add flush(self) and get
> sys.stdout.flush() to work?
Check the dates. You're responding to a 2013 response to a 2003 post.
If you have a question about something this old, it's probably best to
start a new thread
Hi Mike/Ami,
Can you please let me know where do I add flush(self) and get
sys.stdout.flush() to work?
Thanks,
KS
--
https://mail.python.org/mailman/listinfo/python-list
On 20/9/2013 17:57, Sam wrote:
>
> print("\nThe total amount required is ", total )
>
>
> ('\nThe total amount required is ', 3534)
>
> ===> the problem is obviously on the last print statement that is supposed to
> print the outut
Others have poin
On Sat, Sep 21, 2013 at 7:57 AM, Sam wrote:
> car=int(input("Lamborghini tune-up:"))
> print("\nThe total amount required is ", total )
> OUTPUT
> ('\nThe total amount required is ', 3534)
As others have said, this output indicates that you're running under a
Python 2.x interpreter. I strongly re
In <05bbf1a3-6480-48ee-8984-2482b90c7...@googlegroups.com> Sam
writes:
> print("\nThe total amount required is ", total )
> OUTPUT
> ('\nThe total amount required is ', 3534)
In older versions of python (like the one you are using), 'print' is a
statement instead of a function.
In other word
Remove both brackets in last line, You are creating a tuple in last
statement not making a function call.
2013/9/20 Sam
> hi everybody i am just starting to learn python, i was writing a simple
> i/o program but my print statement is acting weird. here is my code i want
> to know why
On 21 September 2013 07:57, Sam wrote:
> hi everybody i am just starting to learn python, i was writing a simple
> i/o program but my print statement is acting weird. here is my code i want
> to know why it prints this way. thank you
>
> print("\nThe total amount
hi everybody i am just starting to learn python, i was writing a simple i/o
program but my print statement is acting weird. here is my code i want to know
why it prints this way. thank you
car=int(input("Lamborghini tune-up:"))
rent=int(input('\nManhatan apartment: '
On Thursday, February 13, 2003 2:51:02 PM UTC+2, Mike Müller wrote:
> "Mark McEahern" wrote in message
> news:...
> > Same basic idea:
> >
> > #!/usr/bin/env python
> >
> > import sys
> >
> > class MyWriter:
> >
> > def __init__(self, stdout, filename):
> > self.stdout = stdout
>
On 24/08/12 21:59:12, Prasad, Ramit wrote:
> Also, print doesn't work inside a class.
It works for me:
> python3
Python 3.3.0a1 (v3.3.0a1:f1a9a6505731, Mar 4 2012, 12:26:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more informati
ython-list-bounces+wbrucek=gmail@python.org] On Behalf Of Chris
Kaynor
Sent: August-24-12 12:54 PM
To: python-list@python.org
Subject: Re: help with simple print statement!
On Fri, Aug 24, 2012 at 12:43 PM, Willem Krayenhoff mailto:wbru...@gmail.com> > wrote:
Any idea why print is
Prasad, Ramit wrote:
Willem Krayenhoff
Any idea why print isn't working here?
I tried restarting my Command prompt. Also, print doesn't work inside a class.
Ramit,
The standard for attribution is something along the lines of:
Prasad, Ramit wrote:
or
Willem Kayenhoff wrote:
Just havi
Willem Krayenhoff
Any idea why print isn't working here?
I tried restarting my Command prompt. Also, print doesn't work inside a class.
--
Best Wishes,
Bruce
C: 604-441-5791
My Availability
Just as a note, this is a usenet group that can be accessed via email; a good
po
:
On 24 August 2012 15:43, Willem Krayenhoff wrote:
> Any idea why print isn't working here?
http://docs.python.org/release/3.0.1/whatsnew/3.0.html#print-is-a-function
Also, pasting images into emails to this list is unlikely to gain you
many friends ...
-[]z.
--
http://mail.python.org/mailm
On Fri, 2012-08-24 at 12:43 -0700, Willem Krayenhoff wrote:
> Any idea why print isn't working here?
You're using Python 3.2, but trying Python 2.7 syntax -
http://docs.python.org/release/3.0.1/whatsnew/3.0.html#print-is-a-function
should explain the problem adequately.
(Incidentally - you can
On Fri, Aug 24, 2012 at 12:43 PM, Willem Krayenhoff wrote:
> Any idea why print isn't working here?
>
> I tried restarting my Command prompt. Also, print doesn't work inside a
> class.
>
> [image: Inline image 2]
>
In Python 3, print was made into a function rather than a statement for
various r
Excuse the top-post, but thanks to all, the tuple was the way to go.
On Oct 22, 2:16 pm, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
On Thu, Oct 22, 2009 at 11:16 PM, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally w
KB writes:
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally would over the list "v" due to
>
On Thu, Oct 22, 2009 at 5:16 PM, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally w
KB wrote:
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments
KB wrote:
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments between each var.
On Tue, 17 Mar 2009 22:41:26 -0700, John Machin wrote:
> On Mar 18, 4:19 pm, Matt Nordhoff wrote:
>> The implicit string concatenation is actually done by the compiler; it
>> isn't an operator at all. Look:
>>
>> >>> import dis
>> >>> def f():
>>
>> ... return "foo" "bar"
>> ...>>> dis.dis(f
On Mar 18, 4:19 pm, Matt Nordhoff wrote:
> bdb112 wrote:
> > Thanks for all the replies:
> > I think I see now - % is a binary operator whose precedence rules are
> > shared with the modulo operator regardless of the nature of its
> > arguments, for language consistency.
> > I understand the argum
bdb112 wrote:
> Thanks for all the replies:
> I think I see now - % is a binary operator whose precedence rules are
> shared with the modulo operator regardless of the nature of its
> arguments, for language consistency.
> I understand the arguments behind the format method, but hope that the
> sli
Thanks for all the replies:
I think I see now - % is a binary operator whose precedence rules are
shared with the modulo operator regardless of the nature of its
arguments, for language consistency.
I understand the arguments behind the format method, but hope that the
slightly idiosyncratic print(
bdb112 wrote:
... the difference between ...
print(" %d, %d, buckle my shoe" % (1,2))
... and ...
print(" %d, " + " %d, buckle my shoe" % (1,2))
# a bug or a feature?
A feature. a + b % c is a + (b % c)
But do note that string constant concatentation is higher priority
than the other ope
> On Mar 16, 5:00 pm, bdb112 wrote:
> > # is the difference between
> > print(" %d, %d, buckle my shoe" % (1,2))
> > # and
> > print(" %d, " + " %d, buckle my shoe" % (1,2))
> > # a bug or a feature?
It is correct behavior. On the other hand, it is one of the, well,
bugs, that is avoided by
>
> print(10 + 20 % 7)
> a bug or a feature?
It is a feature
print ((10+20) % 7)
-Alex Goretoy
http://www.goretoy.com
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 16, 7:00 pm, bdb112 wrote:
> # is the difference between
> print(" %d, %d, buckle my shoe" % (1,2))
> # and
> print(" %d, " + " %d, buckle my shoe" % (1,2))
> # a bug or a feature?
Here's a question for you:
Is the difference between
print(30 % 7)
and
print(10 + 20 % 7)
a bug or
#whoops, the first output is actually
1, 2, buckle my shoe
# in case it wasn't obvious
On Mar 16, 5:00 pm, bdb112 wrote:
> # is the difference between
> print(" %d, %d, buckle my shoe" % (1,2))
> # and
> print(" %d, " + " %d, buckle my shoe" % (1,2))
> # a bug or a feature?
>
> First ou
# is the difference between
print(" %d, %d, buckle my shoe" % (1,2))
# and
print(" %d, " + " %d, buckle my shoe" % (1,2))
# a bug or a feature?
First output
... print(" %d " + " %d, buckle my shoe" % (1,2))
Second output
TypeError: not all arguments converted during string formatting
Versio
print "Removing external local directory:", localDir
> > rmdirs( localDir )
> > vfxrepo.copy( remoteDir, localDir )
>
> > I noticed that the print statement above does not show up before
> > vfxrepo.copy() is called. the copy() function (as wel
Robert Dailey wrote:
I have the following code:
Python version? Plafform?
def ReplaceExternalWithCopy( localDir, remoteDir ):
print "Removing external local directory:", localDir
rmdirs( localDir )
vfxrepo.copy( remoteDir, localDir )
I noticed that the print state
remoteDir ):
> > print "Removing external local directory:", localDir
> > rmdirs( localDir )
> > vfxrepo.copy( remoteDir, localDir )
> >
> > I noticed that the print statement above does not show up before
> > vfxrepo.copy() is called. the copy()
> vfxrepo.copy( remoteDir, localDir )
>
> I noticed that the print statement above does not show up before
> vfxrepo.copy() is called. the copy() function (as well as the rmdirs()
> function) are very long file-system calls that take up to 5 minutes. I
> should see a print state
Hi,
I have the following code:
def ReplaceExternalWithCopy( localDir, remoteDir ):
print "Removing external local directory:", localDir
rmdirs( localDir )
vfxrepo.copy( remoteDir, localDir )
I noticed that the print statement above does not show up before
vfxrepo.copy()
On Apr 27, 9:45 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Paul McGuire <[EMAIL PROTECTED]> wrote:
> > The Enable/Disable decorators on the Python wiki (http://
> > wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator
> > %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you
Paul McGuire <[EMAIL PROTECTED]> wrote:
> The Enable/Disable decorators on the Python wiki (http://
> wiki.python.org/moin/PythonDecoratorLibrary?highlight=%28decorator
> %29#head-8298dbf9ac7325d9ef15e7130e676378bbbda572) help you do
> something very similar, without having to replicate the functi
On Apr 26, 7:31 am, Dustan <[EMAIL PROTECTED]> wrote:
> On Apr 26, 1:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
> > > hello,
>
> > > As part of a procedure I've a number sequences like this:
>
> > >
> > > if Print_Info
> or (untested):
>
> if Print_Info:
> def printOrNot(arg):
> print arg
> else:
> def printOrNot(arg):
> pass
>
> printOrNot(Datafile.readline())
>
>
thanks for the creative solution, and indeed it does work ;-)
cheers,
Stef Mientki
--
http://mail.python.org/mailman/lis
On Apr 26, 1:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
> > hello,
>
> > As part of a procedure I've a number sequences like this:
>
> >
> > if Print_Info: print Datafile.readline()
> > else:Datafile.readline(
Antoon Pardon wrote:
> On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
>> hello,
>>
>>
>> As part of a procedure I've a number sequences like this:
>>
>>
>> if Print_Info: print Datafile.readline()
>> else:Datafile.readline()
>>
>>
>> Is there a more compress
On 2007-04-25, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
>
> As part of a procedure I've a number sequences like this:
>
>
> if Print_Info: print Datafile.readline()
> else:Datafile.readline()
>
>
> Is there a more compressed way to write such a statement,
> espec
"Stef Mientki" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| if Print_Info: print Datafile.readline()
| else:Datafile.readline()
Since both branches discard the data read, I presume Martin's fix is what
you really want.
| Is there a more compressed way t
Stef Mientki schrieb:
> hello,
>
>
> As part of a procedure I've a number sequences like this:
>
>
> if Print_Info: print Datafile.readline()
> else:Datafile.readline()
>
>
> Is there a more compressed way to write such a statement,
> especially I dislike the redundanc
hello,
As part of a procedure I've a number sequences like this:
if Print_Info: print Datafile.readline()
else:Datafile.readline()
Is there a more compressed way to write such a statement,
especially I dislike the redundancy "Datafile.readline()".
thanks,
Stef Mient
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Sun, 07 May 2006 00:09:06 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed
>the following in comp.lang.python:
>
>> [EMAIL PROTECTED] wrote:
>>
>> >6) Would it be correct to infer that the print statement
[EMAIL PROTECTED] wrote:
> Thank you. Yes, that post answers most of the questions. I now have a
> bit of an understanding of the \xhh pattern. It's still unclear to me,
> however, how one can go from the \x92 pattern and arrive at the
> apostrophe character. Is \x92 theh apostrophe character i
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> bit of an understanding of the \xhh pattern. It's still unclear to me,
> however, how one can go from the \x92 pattern and arrive at the
> apostrophe character. Is \x92 the apostrophe character in another
> character set? If so, whi
Thank you. Yes, that post answers most of the questions. I now have a
bit of an understanding of the \xhh pattern. It's still unclear to me,
however, how one can go from the \x92 pattern and arrive at the
apostrophe character. Is \x92 theh apostrophe character in another
character set? If so,
our VGA font happens to display "left single quote" and "right single
quote" with the same glyph as "apostrophe".
>4) what is the role/function of the backslash character in the variable
>y?
See above. \x introduces a hex character. \047 is another special
sequ
[EMAIL PROTECTED] writes:
> My questions are:
Mostly answered in the language reference:
http://docs.python.org/ref/strings.html>
--
\ "Facts are meaningless. You could use facts to prove anything |
`\ that's even remotely true!" -- Homer, _The Simpsons_ |
_o__)
e y a signal that what
follows is a hex value?
2) is it more than just a coincidence that 146 (the result of
ord(y[3])) is the decimal equivalent of the hex number 92?
3) is there any character set in which 146 represents the
single-quote/apostrophe character? if so, which character set?
4) what i
Robert:
> After "is_platform_unicode = ", scintilla displays some unicode
> as you showed. but the win32-functions (e.g. MessageBox) still do not
> pass through wide unicode.
Win32 issues are better discussed on the python-win32 mailing list
which is read by more of the people interested in
"Robert" <[EMAIL PROTECTED]> writes:
>
> Guess I have to create special C-code for my major wide unicode needs -
> especially listctrl-SetItem and TextOut-Stuff...
>
> Or does anybody know of some existing wide-unicode functions/C-code
> parallel to normal pywin32?
You could use ctypes to access
Neil Hodgson schrieb:
> Robert:
> PythonWin did have some Unicode support but I think Mark Hammond was
> discouraged by bugs. In pythonwin/__init__.py there is a setting
> is_platform_unicode = 0 with a commented out real test for Unicode on
> the next line. Change this to 1 and restart and yo
Robert:
> u'sytest3\\\u041f\u043e\u0448\u0443\u043a.txt'
>
> u'\u043a' is cyrillic: к
>
> no matter, I guess no (small) system can know all unicode ranges in use
> wordwide. The real problem is: to get a smoot, smart an tolerant setup
> by default - not a mixup of 4 codecs and (most bothersome)
Fredrik Lundh wrote:
> > Are you certain that this is a valid unicode character? Checking other
> > values (like \u0020 which is a blank space) seems to work okay. What
> > does \u034A represent?
>
> >>> import unicodedata
> >>> unicodedata.name(u"\u034A")
> 'COMBINING NOT TILDE ABOVE'
>
> (space
> Are you certain that this is a valid unicode character? Checking other
> values (like \u0020 which is a blank space) seems to work okay. What
> does \u034A represent?
>>> import unicodedata
>>> unicodedata.name(u"\u034A")
'COMBINING NOT TILDE ABOVE'
(space is a valid CP850 character, combining
gregarican wrote:
> Robert wrote:
>
> > (windows or linux console)
> >
> > >>> print u'\u034a'
> >
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > File "C:\PYTHON23\lib\encodings\cp850.py", line 18, in encode
> > return codecs.charmap_encode(input,errors,encoding_map)
>
Robert wrote:
> (windows or linux console)
>
>
>
> >>> print u'\u034a'
>
>
> Traceback (most recent call last):
> File "", line 1, in ?
> File "C:\PYTHON23\lib\encodings\cp850.py", line 18, in encode
> return codecs.charmap_encode(input,errors,encoding_map)
> UnicodeEncodeError: 'charmap'
armap' codec can't encode character u'\u034a' in
position
0: character maps to
>>>
How to get a replacement behaviour into Python's print statement
generally ?
Fumble on sys.stdout/stderr? sys.stdout.write(u) puts at least random
chars. Thus print seems to do
On Wed, 14 Dec 2005 15:27:58 -0800, TY wrote:
> So I guess then my next question is why does adding comma to print
> statement cause buffering, but not when you don't have comma?
Because of the line buffering. If you don't have a comma at the end, the
print statement prints the n
So I guess then my next question is why does adding comma to print
statement cause buffering, but not when you don't have comma?
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-12-14, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>
>> > try this instead:
>> >
>> > import time, sys
>> >
>> > for i in range(10):
>> > time.sleep(0.8) # seconds; tune as necessary
>> > print i,
>> > sys.stdout.flush() # flush stdout
>>
Grant Edwards wrote:
> > try this instead:
> >
> > import time, sys
> >
> > for i in range(10):
> > time.sleep(0.8) # seconds; tune as necessary
> > print i,
> > sys.stdout.flush() # flush stdout
> > print
>
> Is mixing print and sys.stdout.X never a problem
On 2005-12-14, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> try this instead:
>
> import time, sys
>
> for i in range(10):
> time.sleep(0.8) # seconds; tune as necessary
> print i,
> sys.stdout.flush() # flush stdout
> print
Is mixing print and sys.stdout.X n
ints 1 on the next line prints 2
> etc.
>
> But if you add a comma at the end of print statement on the last line
> like this:
>
> for i in range(10):
> for j in range(500): pass # Timing-delay loop
> print i,
>
> Now it does this:
>
> then p
sorry ... i don'understand a question from first read
my previos aswer is not an aswer at all
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-12-14, TY <[EMAIL PROTECTED]> wrote:
> for i in range(10):
> for j in range(500): pass # Timing-delay loop
> print i,
>
> Now it does this:
>
> then prints 0 1 2 3 4 5 6 7 8 9 all at once.
>
> Why?
>
> How can I make it to print each numbers on the same line with pauses
>From doc:
range( [start,] stop[, step])
This is a versatile function to create lists containing arithmetic
progressions. It is most often used in for loops. The arguments must be
plain integers. If the step argument is omitted, it defaults to 1. If
the start argument is omitted, it defaults to 0
print statement on the last line
like this:
for i in range(10):
for j in range(500): pass # Timing-delay loop
print i,
Now it does this:
then prints 0 1 2 3 4 5 6 7 8 9 all at once.
Why?
How can I make it to print each numbers on the same line with pauses in
between them
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
est.py
> ['test1.txt']
> files in c:\ :None
The function ListFiles() is being called first. This produces the
result that will be used to replace the %s of the print statement. In
this case, the return value is None, so nothing is printed.
How to Think Like a Computer Scientist
http://www.ibiblio.org.obp/thinkCSpy/
--
http://mail.python.org/mailman/listinfo/python-list
Can someone explain to me the output of this simple script? I wonder
why ['test1.txt'] is printed before "files in c:\", and also why None
shows up?
in file test.py:
def main():
print "files in c:\ :%s" % ListFiles("c:\")
def ListFiles(path):
for root,dirs,files in os.
Jeremy Bowers wrote:
> Then I'd honor his consistency of belief, but still consider it impolite
> in general, as asking someone to do tons of work overall to save you a bit
> is almost always impolite.
This is not what he did, though - he did not break "the protocol" by
sending in patches by email
On Sun, 08 May 2005 13:46:22 +, John J. Lee wrote:
> I don't mean to put words into FranÃois' mouth, but IIRC he managed,
> for example, GNU tar for some time and, while using some kind of
> tracking system "under the covers", didn't impose it on his users.
>
> IMVHO, that was very nice of him
Jeremy Bowers <[EMAIL PROTECTED]> writes:
> On Sat, 07 May 2005 12:10:46 -0400, François Pinard wrote:
>
> > [Martin von Löwis]
> >
> >> François Pinard wrote:
> >>
> >> > Am I looking in the wrong places, or else, should not the standard
> >> > documentation more handily explain such things?
>
On Sat, 07 May 2005 12:10:46 -0400, FranÃois Pinard wrote:
> [Martin von LÃwis]
>
>> FranÃois Pinard wrote:
>>
>> > Am I looking in the wrong places, or else, should not the standard
>> > documentation more handily explain such things?
>
>> It should, but, alas, it doesn't. Contributions are wel
François Pinard wrote:
> My contributions are not that welcome. If they were, the core team
> would not try forcing me into using robots and bug trackers! :-)
Ok, then we need to wait for somebody else to contribute a documentation
patch.
> Thanks. Your kind explanation, above, should make it,
[Martin von Löwis]
> François Pinard wrote:
>
> > Am I looking in the wrong places, or else, should not the standard
> > documentation more handily explain such things?
> It should, but, alas, it doesn't. Contributions are welcome.
My contributions are not that welcome. If they were, the core t
François Pinard wrote:
> Am I looking in the wrong places, or else, should not the standard
> documentation more handily explain such things?
It should, but, alas, it doesn't. Contributions are welcome.
The algorithm to set sys.std{in,out}.encoding is in
sysmodule.c:_PySys_Init and pythonrun.c:Py
code string.
Much thanks for this information.
I was not aware of this file attribute. Looking around, I found a
quick description in the Library Reference, under "2.3.8 File Objects".
However, I did not find in the documentation the rules stating how
or when this attribute receives a
t;
> However, this morning, I mistakenly forgot to do so before using one
> Unicode string (containing a non-ASCII character) as an argument to
> the `print' statement, and I did _not_ get an error. This is rather
> surprising to me. I reread the section of the Python reference ma
icode string (containing a non-ASCII character) as an argument to
the `print' statement, and I did _not_ get an error. This is rather
surprising to me. I reread the section of the Python reference manual
(version 2.3.4, this machine uses 2.3.3 currently), and it does not say
anything about
vegetax wrote:
> So it would be something like this, right??
>
> class ThreadSpecificFile:
> def __init__(s):
> self.files = []
> def set_stdout(f,thread_id):
> self.files[thread_id] = f
> def clean_up(thread_id):
> del self.files[t
Bengt Richter wrote:
> On Mon, 02 May 2005 20:24:02 -0400, vegetax <[EMAIL PROTECTED]> wrote:
>
>>Irmen de Jong wrote:
>>
>>> vegetax wrote:
>>>> How can i use cgi'like print statement in a multitreaded web framework?
>>>> each thr
vegetax wrote:
> Jeff Epler wrote:
>
>> You could write something like
>> class ThreadSpecificFile:
>> def set_stdout(f):
>> self.files[thread_id] = f
>> def write(data):
>> self.files[thread_id].write(data)
>> sys.stdout = ThreadSpecificFile()
>> w
On Mon, 02 May 2005 20:24:02 -0400, vegetax <[EMAIL PROTECTED]> wrote:
>Irmen de Jong wrote:
>
>> vegetax wrote:
>>> How can i use cgi'like print statement in a multitreaded web framework?
>>> each thread has its own Servlet instance with request/respons
Jeff Epler wrote:
> You could write something like
> class ThreadSpecificFile:
> def set_stdout(f):
> self.files[thread_id] = f
> def write(data):
> self.files[thread_id].write(data)
> sys.stdout = ThreadSpecificFile()
> where you'll have to fill out
1 - 100 of 108 matches
Mail list logo