Robert Kern wrote:
>> I can't find "?, ?, or ?" on my keyboard.
>
> Get a better keyboard? or OS?
>
> On OS X,
>
> ? is Alt-,
> ? is Alt-.
> ? is Alt-=
>
> Fewer keystrokes than <= or >= or !=.
Sure, but I can't find OS X listed as a prerequisite for using Python. So,
while I don't give a damn if
"py" <[EMAIL PROTECTED]> wrote:
>
>I have the following code:
>...
>there are two problems.
>1) i want the sizer (that is returned from buildTopPanel()) to fill the
>screen wide/tall. now the text control in it is very small in the
>upper-left corner.
>
>2) the scroll bars and borders on the t
rbt <[EMAIL PROTECTED]> wrote:
>
>Can someone detail the differences between these two? On Windows which
>is preferred?
os.unlink() calls unlink() in the C run-time library. In VC++, unlink()
passes its parameter directly to DeleteFile. There is no difference.
DeleteFile() is the only way to de
On 23 Jan 2006 04:00:40 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote:
>
>Bengt Richter wrote:
>
[...]
>> It wouldn't be shadowing, but I suppose you could replace sys.stdout with
>> a custom object whose methods check where they were called from.
>> Then you could give the object initialization par
On 23/01/2006 18:41, Mathijs uttered:
>> len([ref.pop(ref.index(x)) for x in lis if x in ref])
> This is the type of solution I was hoping to see: one-liners, with no
> use of local variables. As Tim Chase already wrote, it has only one
> less elegant side: it alters the original ref list.
>
> T
Simmons, Stephen wrote:
>
> I've come across a bug in CSV where the csv.reader() raises an
> exception if the input line contains '\r'. Example code and output
> below shows a test case where csv.reader() cannot read an array
> written by csv.writer().
>
> Error: newline inside string
> WARNING
Dear all,
I've installed python 2.4.2 and Zope 2.8.5 on a 64-bit Linux. As I'm
installing FLE (http://fle3.uiah.fi/), I find that it will call the
rotor module i npython. However, rotor is removed from python 2.4.2
(http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14434). Could
I e
[rbt]
| Can someone detail the differences between these two? On
| Windows which is preferred?
Looks like that's been answered elsewhere.
| Also, is it true that win32api.DeleteFile() can remove the 'special'
| files located in the 'special' folders only accessible by the shell
| object such as
[Mathijs]
> Example2:
> ref=[2, 2, 4, 1, 1]
> list=[2, 2, 5, 2, 4]
> solution: 3 (note that only the first two 2's count, the third 2 in the
> list should not be counted)
[Morten Vold]
> May I suggest another one-liner:
>
> len(set(ref).intersection(lis))
>
> I have no idea how this scales/p
Aahz wrote:
> >the sample site contains ~600 pages. each page has been automatically
> >translated from python.org sources to moinmoin markup, and then stored
> >in a moinmoin 1.5 instance. a separate component has then extracted the
> >pages from moinmoin, and converted them XHTML fragments for
On 24/01/2006 09:46, Peter Otten uttered:
len(set([2, 2, 4, 1, 1]).intersection([2, 2, 5, 2, 4]))
> 2
> Close, but no cigar.
I need more coffee! (note to self: Always read entire problem set first)
-- Morten
--
http://mail.python.org/mailman/listinfo/python-list
Will McDonald wrote:
> Hi all.
>
> I'm writing a little script that operates on either stdin or a file
> specified on the command line when run. I'm trying to handle the
> situation where the script's run without any input gracefully but
> can't think how to test for stdin.
>
Hi,
maybe http://d
Patrick Maupin wrote:
def occurrences(t):
> ... res = {}
> ... for item in t:
> ... res.setdefault(item,[0])[0] += 1
> ... return res
>
...
> I think somebody was mentioning "mutable ints" at one point,
> which is basically what I abuse [0] to provide. If I were doing a l
I compiled python 2.3.5 and copy the lib-dynload/rotor.so to the 2.4.2
lib and it works... Thanks anyway. :)
Murphy
Murphy Wong wrote:
>
> Dear all,
>
> I've installed python 2.4.2 and Zope 2.8.5 on a 64-bit Linux. As I'm
> installing FLE (http://fle3.uiah.fi/), I find that it will cal
Pankaj <[EMAIL PROTECTED]> wrote:
>search for :for ( i = 0; i < 10; i++)
>Replace with: for( printf( "10" ), i =0; i < 10; i++)
>Where 10 is the line no.
>f = open( "./1.c", "r")
>fNew = open( "./1_new.c", "w")
>for l in f:
>print l
>lineno = lineno + 1
>strToFind = "f
On 23 Jan 2006 11:28:37 -0800, Tuvas <[EMAIL PROTECTED]> wrote:
> I am building a tkinter program. A part of this program is to read data
> from an incoming interface, and depending on the data, will display a
> bit of text on the tk dialog, it decodes this data, so to speak. If one
> command is s
On 24/01/06, Roland Heiber <[EMAIL PROTECTED]> wrote:
> Will McDonald wrote:
> > Hi all.
> >
> > I'm writing a little script that operates on either stdin or a file
> > specified on the command line when run. I'm trying to handle the
> > situation where the script's run without any input gracefully
Will McDonald wrote:
> > There are more experienced UNIXers here, but from my POV I don't see how
> > that can happen. The reason is simply that
> >
> > - sys.stdin alwasy exists (unless you close it yourself)
> >
> > - in a pipe (which this essentially is) there is now way to know if there
> >
Murphy Wong wrote:
> Dear all,
>
> I've installed python 2.4.2 and Zope 2.8.5 on a 64-bit Linux. As I'm
> installing FLE (http://fle3.uiah.fi/), I find that it will call the
> rotor module i npython. However, rotor is removed from python 2.4.2
> (http://savannah.nongnu.org/bugs/?func=detailit
Hi all!
I have an application that uses a gtk.Notebook to show the content of a
GUI. Each page of it has a gtk.Label with a text that explains the
content. Each page is added to the notebook with the method
append_page(child, tab_label=None), passing a gtk.Label instance as
tab_label variable.
No
Hi,
I've read the Gordon McMillan's "Socket Programming HOWTO" and I'm
looking for other documents that show examples on how to write a socket
server that can answer multiple clients at the same time.
Does someone know where I can find those documents/tutorials ?
Very thanks,
K.
--
http://mail
"le dahut" wrote:
> I've read the Gordon McMillan's "Socket Programming HOWTO" and I'm
> looking for other documents that show examples on how to write a socket
> server that can answer multiple clients at the same time.
> Does someone know where I can find those documents/tutorials ?
see
ht
Firstly i would like to do the Send/Receive function. In the second moment i would implement the threading with this functions. is it a good way?In your opinion where could i found a valid implementation of udp send/receive?
2006/1/23, Eric Brunson <[EMAIL PROTECTED]>:
This is a reasonably simple t
Peter Gsellmann <[EMAIL PROTECTED]> writes:
> Will McDonald wrote:
>> That's a good point. I did wonder if it'd just have to sit there
>> waiting for input much like cat would. I think that's preferable, and
>> simpler :), than implementing timeouts.
>>
> In unix you can always use select.select
In message <[EMAIL PROTECTED]>, Frank
Millman <[EMAIL PROTECTED]> writes
>> You could then also categorize this by type, e.g.
If you want a nice GUI and no requirement to modify your code Python
Memory Validator could be useful. http://www.softwareverify.com
Stephen
--
Stephen Kellett
Object M
Hi all, i have a python udp client/server.I would send a packed like this: |int|string| . How can i do it with tih client?Another question: buf is the total packet size?
from socket import *
# Set the socket parameters
host = "192.168.11.49"
port = 21567
buf = 1024
addr = (host,port)
# Creat
I'm using plone primary as a news system for my school.
Now I want to integrate external sources into my plone site.
The page is
http://www.vucaarhusamtvucwin.dk/hold.asp?v1=randers&v2=randers&v3=a&v4=a
which shows the various courses my school offers.
This site i updated from a database. And i wan
I have a server that receives data from a client, detect the end of this
data and send other data back to the client (it's to measure bandwidth).
I think the best way is to thread a part of the server's program am I
right ?
HOST = socket.gethostname()
try:
PORT = int(sys.argv[1])
print
Bengt Richter wrote:
[snip..]
> >The following in the write method of the custom out object works :
> >
> >sys._getframe(1).f_globals['__name__']
> >
> >sys.stdout.write is *always* called from at least one frame deep in the
> >stack - so it works.
> Yes, that's about what I had in mind, not b
On Tue, 24 Jan 2006 04:09:00 +0100, Christoph Zwerschke wrote:
> On the page http://wiki.python.org/moin/Python3%2e0Suggestions
> I noticed an interesting suggestion:
>
> "These operators ≤ ≥ ≠ should be added to the language having the
> following meaning:
>
><= >= !=
>
> this should
No, no, that wasn't my intention (I'm just not conscious enough what's
going on with these fork, exec, spawn.. functions).
My parent process should start the child process and go back to it's
tasks. Before executing it for the next time the parent should check if
the previous child process is done
Christoph Zwerschke wrote:
> On the page http://wiki.python.org/moin/Python3%2e0Suggestions
> I noticed an interesting suggestion:
>
> "These operators ≤ ≥ ≠ should be added to the language having the
> following meaning:
>
> <= >= !=
>
> this should improve readibility (and make language
Tim Golden wrote:
> [rbt]
>
> | Can someone detail the differences between these two? On
> | Windows which is preferred?
>
> Looks like that's been answered elsewhere.
>
> | Also, is it true that win32api.DeleteFile() can remove the 'special'
> | files located in the 'special' folders only acces
Hey guys
I'm currently screenscraping some Swedish site, and i need a method to
convert XML entities (& etc, plus d etc) to Unicode characters.
I'm sure one of python's myriad of XML processors can do this but I can't
find which one.
Can anyone make any suggestions?
Thanks
-Rob
--
http://mail.
Sebastjan Trepca wrote:
> I was wondering is it possible to find out which colour is dominant in an
> image using PIL?
> It would be very easy to create interesting mozaic images with that :)
some alternatives:
>>> i = Image.open(...)
>>> i.quantize(1).convert("RGB").getpixel((0, 0))
(208, 205,
The date for the second PyWeek challenge has been set: Sunday 26th March
to Sunday 2nd April (00:00UTC to 00:00UTC).
The PyWeek challenge invites entrants to write a game in one week from
scratch either as an individual or in a team. Entries must be developed
in Python, during the challenge, and m
Hi,Do anyone know the Python source codes on how to write a simple multithreaded webserver class?RegardsFind the lowest fare online with MSN Travel
--
http://mail.python.org/mailman/listinfo/python-list
Robin Haswell wrote:
> I'm currently screenscraping some Swedish site, and i need a method to
> convert XML entities (& etc, plus d etc) to Unicode characters.
> I'm sure one of python's myriad of XML processors can do this but I can't
> find which one.
>
> Can anyone make any suggestions?
any de
[EMAIL PROTECTED] wrote:
> i put this together to fix a bunch of files with wierd names, please
> gimme feedback, i am a newbie
Ok, so let's go... Hope you won't hate me too much !-)
>
> #!/usr/bin/env python
> import os
> import sys
> import string
> import platform
> dir = sys.argv[1]
This wil
I've been digging around, but can't seem to come up with the
right combo of words to google for to get helpful results. Is
there some handy wrapper/module that allows code to target
existance as both a CGI script and a mod_python script, with only
one "import" statement? Perhaps some common o
>> Is this idea absurd or will one day our children think
>> that restricting to 7-bit ascii was absurd?
Both... this idea will only become none-absurd when unicode will become
as prevalent as ascii, i.e. unicode keyboards, universal support under
almost every application, and so on. Even if you c
I have a productional Linux web server with a Python/Zope/Plone. Now I'd
like to install a non-Zope Python/ZODB application on the same server.
What is the recommended way of doing that?
Option 1:
Install ZODB in the Python installation in the usual way. Should I expect
problems when I install and
Gerhard Häring wrote:
> > the sample site contains ~600 pages. each page has been automatically
> > translated from python.org sources to moinmoin markup, and then stored
> > in a moinmoin 1.5 instance. a separate component has then extracted the
> > pages from moinmoin, and converted them XHTML
>
>
> notebook = gtk.Notebook()
> ...
> child = gtk.Frame()
> ...
> label = gtk.Label('Any text')
> label.connect('button_press_event', a_function)
> ...
> notebook.append_page(child, label)
>
>
>
> But the button_press_event event is not intercepted (nothing happens
> when I click on the tab
Christoph Zwerschke wrote:
> "These operators ≤ ≥ ≠ should be added to the language having the
> following meaning:
>
> <= >= !=
>
> this should improve readibility (and make language more accessible to
> beginners).
>
I assume most python beginners know some other programming language
On Tue, 24 Jan 2006 14:46:46 +0100, Fredrik Lundh wrote:
> Robin Haswell wrote:
>
>> I'm currently screenscraping some Swedish site, and i need a method to
>> convert XML entities (& etc, plus d etc) to Unicode characters.
>> I'm sure one of python's myriad of XML processors can do this but I can
Hi there,
I seem to be unable to find a way to appends more keys/values to the end
of a dictionary... how can I do that?
E.g:
mydict = {'a':'1'}
I need to append 'b':'2' to it to have:
mydict = {'a':'1','b':'2'}
How to do?
Best regards,
Yves
--
http://mail.python.org/mailman/listinfo/pyt
I can specify the question, so you can request me easily...The int should be an integer of 32 bit fixed. This is total packet size. The string should contain XML.In this example the string is taken from keyboard, so for example.
Thanks all for your helps...2006/1/24, Sbaush <[EMAIL PROTECTED]>:
Hi
Hallöchen!
At http://pyvisa.sourceforge.net you can find information about the
PyVISA package. It realises Python bindings for the VISA library
functions, which enables you to control GPIB, USB, and RS232-serial
measurement devices via Python.
Today I released version 1.0. If you have v0.9.7 of
Yves Glodt wrote:
> Hi there,
>
> I seem to be unable to find a way to appends more keys/values to the end
> of a dictionary... how can I do that?
>
> E.g:
>
> mydict = {'a':'1'}
>
> I need to append 'b':'2' to it to have:
>
> mydict = {'a':'1','b':'2'}
>
mydict['b'] = '2'
--
http://mail.py
> I seem to be unable to find a way to appends more keys/values to the end
> of a dictionary... how can I do that?
>
> E.g:
>
> mydict = {'a':'1'}
>
> I need to append 'b':'2' to it to have:
>
> mydict = {'a':'1','b':'2'}
my understanding is that the order of a dictionary should never
be rel
Yves Glodt:
>I seem to be unable to find a way to appends more keys/values to the end
>of a dictionary
A dictionary has no order, and therefore no end.
>mydict = {'a':'1'}
>
>I need to append 'b':'2' to it to have:
>
>mydict = {'a':'1','b':'2'}
>
>How to do?
Like this:
>>> mydict = {'a':'1'}
>
Yves Glodt wrote:
> I seem to be unable to find a way to appends more keys/values to the end
> of a dictionary... how can I do that?
>
> E.g:
>
> mydict = {'a':'1'}
>
> I need to append 'b':'2' to it to have:
>
> mydict = {'a':'1','b':'2'}
to add stuff to a dictionary, use item assignment:
m
Yves Glodt wrote:
> I seem to be unable to find a way to appends more keys/values to the end
> of a dictionary... how can I do that?
A dictionary doesn't have an 'end' because it is an unordered
collection.
> E.g:
> mydict = {'a':'1'}
> I need to append 'b':'2' to it to have:
mydict['b'] = '2'
p
Murphy Wong <[EMAIL PROTECTED]> writes:
> I've installed python 2.4.2 and Zope 2.8.5 on a 64-bit Linux. As I'm
> installing FLE (http://fle3.uiah.fi/), I find that it will call the
> rotor module i npython. However, rotor is removed from python 2.4.2
> (http://savannah.nongnu.org/bugs/?func=detai
Rene Pijlman wrote:
> Yves Glodt:
>> I seem to be unable to find a way to appends more keys/values to the end
>> of a dictionary
>
> A dictionary has no order, and therefore no end.
that means I can neither have a dictionary with 2 identical keys but
different values...?
I would need e.g. thi
Yves Glodt wrote:
> Hi there,
>
> I seem to be unable to find a way to appends more keys/values to the end
> of a dictionary... how can I do that?
>
> E.g:
>
> mydict = {'a':'1'}
>
> I need to append 'b':'2' to it to have:
>
> mydict = {'a':'1','b':'2'}
>
>
>
> How to do?
Sorry for the no
> that means I can neither have a dictionary with 2 identical keys but
> different values...?
correct :)
> I would need e.g. this:
> (a list of ports and protocols, to be treated later in a loop)
>
> ports = {'5631': 'udp', '5632': 'tcp', '3389': 'tcp', '5900': 'tcp'}
> #then:
> for port,protoc
Yves Glodt <[EMAIL PROTECTED]> writes:
> that means I can neither have a dictionary with 2 identical keys but
> different values...?
No.
> I would need e.g. this:
> (a list of ports and protocols, to be treated later in a loop)
>
> ports = {'5631': 'udp', '5632': 'tcp', '3389': 'tcp', '5900': 't
Now i can explain better than previous messages.This string has to be sent to another host via UDP with the previous attached simple client/server udp implementation in python. The big problem is:The packet
MUST be like this c struct:
#define PAYLOAD_LENGHT 5000
struct command_hdr { int lengh
Paul Rubin wrote:
> Yves Glodt <[EMAIL PROTECTED]> writes:
>> that means I can neither have a dictionary with 2 identical keys but
>> different values...?
>
> No.
>
>> I would need e.g. this:
>> (a list of ports and protocols, to be treated later in a loop)
>>
>> ports = {'5631': 'udp', '5632': '
New book on wxPython: http://www.manning.com/books/rappin
Release date of this month. Does anyone know if it's out yet / has
anyone read it and has an opinion?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
First off, I'm new to Python, so please forgive if I've overlooked
something obvious. I work for a publisher and I'm trying to use
PyAmazon to programmatically examine our books' listings on Amazon.com.
One of the crucial fields for this task is Book Description, which is
not one of the available e
Yves Glodt:
>I would need e.g. this:
>(a list of ports and protocols, to be treated later in a loop)
[...]
>What would be the appropriate pythonic way of doing this?
In the case of tcp and udp ports, it's the combination of protocol and
port number that's unique, not the port number by itself.
So
Tim Chase wrote:
> I've been digging around, but can't seem to come up with the
> right combo of words to google for to get helpful results. Is
> there some handy wrapper/module that allows code to target
> existance as both a CGI script and a mod_python script, with only
> one "import" statement?
Simmons, Stephen wrote:
> >
> > I've come across a bug in CSV where the csv.reader() raises an
> > exception if the input line contains '\r'. Example code and output
> > below shows a test case where csv.reader() cannot read an array
> > written by csv.writer().
> >
> > Error: newline inside s
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>Aahz wrote:
>>Fredrik:
>>>
>>>the sample site contains ~600 pages. each page has been automatically
>>>translated from python.org sources to moinmoin markup, and then stored
>>>in a moinmoin 1.5 instance. a separate compone
[EMAIL PROTECTED] wrote:
> i put this together to fix a bunch of files with wierd names, please
> gimme feedback, i am a newbie
See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442517
--
http://mail.python.org/mailman/listinfo/python-list
Giovanni Bajo wrote:
> Robert Kern wrote:
>
>
>>>I can't find "?, ?, or ?" on my keyboard.
Posting code to newsgroups might get harder too. :-)
--
http://mail.python.org/mailman/listinfo/python-list
Robin Haswell wrote:
> On Tue, 24 Jan 2006 14:46:46 +0100, Fredrik Lundh wrote:
>
> > Robin Haswell wrote:
> >
> >> I'm currently screenscraping some Swedish site, and i need a method to
> >> convert XML entities (& etc, plus d etc) to Unicode characters.
> >> I'm sure one of python's myriad of XML
Aahz wrote:
> >I think I mentioned this in an earlier post; simply adding a special SideBar
> >link list at the top of a page should be good enough
> >
> > SideBar:
> > * [link title]
> > * [link title]
> > * [link title]
> >
> >
>
> Hrm. So you're suggesting that each page have a ma
Rocco Moretti wrote:
[James Stroud wrote:]
I can't find "?, ?, or ?" on my keyboard.
>
> Posting code to newsgroups might get harder too. :-)
His post made it through fine. Your newsreader messed it up.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Ar
another approach (probably frowned upon, but it has worked for me) is
to use python syntax (a dictionary, say, or a list) and just import (or
reload) the file
--
http://mail.python.org/mailman/listinfo/python-list
Giovanni Bajo wrote:
> Sure, but I can't find OS X listed as a prerequisite for using Python. So,
> while I don't give a damn if those symbols are going to be supported by
> Python,
> I don't think the plain ASCII version should be deprecated. There are too many
> situations where it's still usefu
Ido Yehieli wrote:
>>>Is this idea absurd or will one day our children think
>>>that restricting to 7-bit ascii was absurd?
>
> Both... this idea will only become none-absurd when unicode will become
> as prevalent as ascii, i.e. unicode keyboards, universal support under
> almost every applicatio
Christoph Zwerschke wrote:
> On the page http://wiki.python.org/moin/Python3%2e0Suggestions
> I noticed an interesting suggestion:
>
> "These operators ≤ ≥ ≠ should be added to the language having the
> following meaning:
>
> <= >= !=
>
> this should improve readibility (and make language
Fernando Perez wrote:
> IPython's homepage is at:
>
> http://ipython.scipy.org
>
> and downloads are at:
>
> http://ipython.scipy.org/dist
And if you have easy_install ( install it by running
http://peak.telecommunity.com/dist/ez_setup.py if you already haven't
done it), you can just say:
easy_i
Tim Chase <[EMAIL PROTECTED]> wrote:
>unless you have a way of doing an in-line sort, in which you
>would be able to do something like
>
> orderedDict = [(k,mydict[k]) for k in mydict.keys().sort()]
>
>Unfortunately, the version I've got here doesn't seem to support
>a sort() method for the li
Duncan Booth wrote:
> I prefer writing an 'if' statement here, Bryan prefers 'get', that's just a
> choice of style. But 'setdefault' here, that has no style.
Well, I'm often told I have no style, and I _did_ admit that it's an
abuse of setdefault. However, I often use setdefault to populate
nes
>> orderedDict = [(k,mydict[k]) for k in mydict.keys().sort()]
>>
>>Unfortunately, the version I've got here doesn't seem to support
>>a sort() method for the list returned by keys(). :(
>
> I bet it does, but it doesn't do what you think it does. See
> http://docs.python.org/lib/typesseq-mutabl
thanks for the feedback!
I'll work on your suggestions.
bruno at modulix wrote:
> [EMAIL PROTECTED] wrote:
> > i put this together to fix a bunch of files with wierd names, please
> > gimme feedback, i am a newbie
>
> Ok, so let's go... Hope you won't hate me too much !-)
>
> >
> > #!/usr/bin/en
Juho Schultz wrote:
> Fortran 90 allowed >, >= instead of .GT., .GE. of Fortran 77. But F90
> uses ! as comment symbol and therefore need /= instead of != for
> inequality. I guess just because they wanted. However, it is one more
> needless detail to remember. Same with the suggested operators.
On Tue, 24 Jan 2006 16:33:16 +0200 in comp.lang.python, Juho Schultz
<[EMAIL PROTECTED]> wrote:
[...]
>
>Fortran 90 allowed >, >= instead of .GT., .GE. of Fortran 77. But F90
>uses ! as comment symbol and therefore need /= instead of != for
>inequality. I guess just because they wanted. However,
On Tue, 24 Jan 2006 04:09:00 +0100 in comp.lang.python, Christoph
Zwerschke <[EMAIL PROTECTED]> wrote:
[...]
>Once you open your mind for using non-ascii symbols, I'm sure one can
>find a bunch of useful applications. Variable names could be allowed to
>be non-ascii, as in XML. Think class names
Hi,
In python 2.0, this number was an integer:
0x88776655
but in python 2.4 it is a long (every number > 0x7fff it is a long)
in python 2.4, is there a way to convert that number to a integer
(notice that it only occupies 32 bits) ?
thanks,
riq.
--
http://mail.python.org/mailman
Robert Kern wrote:
> Rocco Moretti wrote:
>
> [James Stroud wrote:]
>
>I can't find "?, ?, or ?" on my keyboard.
>>
>>Posting code to newsgroups might get harder too. :-)
>
>
> His post made it through fine. Your newsreader messed it up.
I'm not exactally sure what happened - I can see the
Ricardo Quesada <[EMAIL PROTECTED]> writes:
> 0x88776655
>
> but in python 2.4 it is a long (every number > 0x7fff it is a long)
>
> in python 2.4, is there a way to convert that number to a integer
> (notice that it only occupies 32 bits) ?
It would be -2005440939 but that's maybe not
On Tue, 24 Jan 2006 13:23:05 -0300 in comp.lang.python, Ricardo
Quesada <[EMAIL PROTECTED]> wrote:
>Hi,
>
> In python 2.0, this number was an integer:
>0x88776655
>
> but in python 2.4 it is a long (every number > 0x7fff it is a long)
>
>in python 2.4, is there a way to convert that numb
Take a look at ConfigParser module. The format of the file would be
something like:
[members]
peter=16
anton=21
People are accustomed to this format file (windows .ini format).
-Larry
Ilias Lazaridis wrote:
> within a python script, I like to create a collection which I fill with
> values fro
Christoph Zwerschke wrote:
> Juho Schultz wrote:
>
>> Fortran 90 allowed >, >= instead of .GT., .GE. of Fortran 77. But F90
>> uses ! as comment symbol and therefore need /= instead of != for
>> inequality. I guess just because they wanted. However, it is one more
>> needless detail to remember
In article <[EMAIL PROTECTED]>,
"ToMasz" <[EMAIL PROTECTED]> wrote:
> No, no, that wasn't my intention (I'm just not conscious enough what's
> going on with these fork, exec, spawn.. functions).
> My parent process should start the child process and go back to it's
> tasks. Before executing it fo
Hi all,
I need to retrieve an integer from within a range ... this works ... below
is my out puts ... it just does not seem so random ...
Is there perhaps a suggestion out there to create a more random int ...?
>>> random.randint(3, 8)
7
>>> random.randint(3, 8)
3
>>> random.randint(3, 8)
3
>>>
some time after posting my `Linkdict recipe`__ to aspn__
-- basically, a dictionary with run-time delegational
lookup, but this is not important here -- i thought gee
that would be fun to make such a customized dictionary
thingie an instance dictionary, and get some custom
namespace behavior out of
"Steven Macintyre" <[EMAIL PROTECTED]> writes:
> I need to retrieve an integer from within a range ... this works ... below
> is my out puts ... it just does not seem so random ...
It's pretty normal for random small ints to not look random. Are
there some statistical tests that the prng is defi
Bryan Olson wrote:
> The claim "everything is a set" falls into the category of
> 'not even wrong'.
No, it falls into the category of the most fundamental Mathematical
concepts. You actually *define* tuples as sets, or functions as sets or
relations as sets, or even all kinds of numbers and othe
Steven Macintyre wrote:
> Hi all,
>
> I need to retrieve an integer from within a range ... this works ... below
> is my out puts ... it just does not seem so random ...
What's wrong with it?
>
> Is there perhaps a suggestion out there to create a more random int ...?
What do you think the outp
Patrick Maupin wrote:
> Duncan Booth wrote:
>
>> I prefer writing an 'if' statement here, Bryan prefers 'get', that's
>> just a choice of style. But 'setdefault' here, that has no style.
>
> Well, I'm often told I have no style, and I _did_ admit that it's an
> abuse of setdefault. However, I o
> I need to retrieve an integer from within a range ... this
> works ... below is my out puts ... it just does not seem so
> random ...
>
> Is there perhaps a suggestion out there to create a more
> random int ...?
I'm not sure how you determine that "it just does not seem so
random"...I tried th
Bryan Olson wrote:
> The claim "everything is a set" falls into the category of
> 'not even wrong'.
No, it falls into the category of the most fundamental Mathematical
concepts. You actually *define* tuples as sets, or functions as sets or
relations as sets, or even all kinds of numbers and ot
Rocco Moretti schrieb:
> My point still stands: _somewere_ along the way the rendering got messed
> up for _some_ people - something that wouldn't have happened with the
> <=, >= and != digraphs.
Yes, but Python is already a bit handicapped concerning posting code
anyway because of its signific
1 - 100 of 180 matches
Mail list logo