Dear Kent,
May someone recommend any simple solution to distribute some dozen
parametrizable sql reports
for some dozen users with a minimal access controll.
Some kind of charting possibilty needed, but I needn't web-based front
end.
I'm not sure I understand your requirements. Do you
The docs list it at http://docs.python.org/ref/augassign.html, and
send you to http://docs.python.org/ref/primaries.html#primaries,
which seems a dead end.
I've tried ^= out a bit:
n = 5
n ^= 8
n
13
n ^= 8
n
5
n ^= 8
n
13
n ^= 8
n
5
and get that strange alternating behavior.
Hi
Well now I have configured an old machine in the garage to run at the same
time.
I would really like to find out how to do this as it must be possible. I have
been googling like mad and can't find how. Kind of frustrating when you don't
know how. At the same time a challenge to
On 2/19/07, Dick Moores [EMAIL PROTECTED] wrote:
I've tried ^= out a bit:
[...]
and get that strange alternating behavior. Can someone explain?
And while at it, please also explain = and |=.
^ is XOR, is AND, | is OR, all bitwise.
You can read more about them here:
2007/2/19, Dick Moores [EMAIL PROTECTED]:
The docs list it at http://docs.python.org/ref/augassign.html, and
send you to http://docs.python.org/ref/primaries.html#primaries,
which seems a dead end.
I've tried ^= out a bit:
n = 5
n ^= 8
n
13
n ^= 8
n
5
n ^= 8
n
13
n ^= 8
n
5
and get
ray sa wrote:
Hi
Well now I have configured an old machine in the garage to run at the
same time.
I would really like to find out how to do this as it must be possible. I
have been googling like mad and can't find how. Kind of frustrating when
you don't know how. At the same time a
At 02:17 AM 2/19/2007, Andre Engels wrote:
To understand these operators, you will have to think of the numbers
as binary numbers. Look at the digits. For two numbers x and y, x^y
is the effect of doing an exclusive or on all digits (that is, 0^1 =
1^0 = 1 and 0^0 = 1^1 = 0), of doing an and
János Juhász wrote:
Dear Kent,
May someone recommend any simple solution to distribute some dozen
parametrizable sql reports
for some dozen users with a minimal access controll.
Some kind of charting possibilty needed, but I needn't web-based
front end.
I'm not sure I
Dick Moores wrote:
The docs list it at http://docs.python.org/ref/augassign.html, and
send you to http://docs.python.org/ref/primaries.html#primaries,
which seems a dead end.
a += n is more-or-less a shortcut for a = a + n. There are a few
subtleties which the first page you reference talks
At 03:32 AM 2/19/2007, you wrote:
Dick Moores wrote:
The docs list it at http://docs.python.org/ref/augassign.html,
and send you to
http://docs.python.org/ref/primaries.html#primaries, which seems a dead end.
a += n is more-or-less a shortcut for a = a + n. There are a few
subtleties which the
2007/2/19, Dick Moores [EMAIL PROTECTED]:
At 02:17 AM 2/19/2007, Andre Engels wrote:
To understand these operators, you will have to think of the numbers
as binary numbers. Look at the digits. For two numbers x and y, x^y
is the effect of doing an exclusive or on all digits (that is, 0^1 =
1^0
On 2/19/07, Dick Moores [EMAIL PROTECTED] wrote:
It's the remaining seven I'm wondering about, or really about , ,
, ^, and | .
This webpage will tell you - in detail - about all the operators:
http://www.lnf.infn.it/Calcolo/doc/aixcxx/html/language/ref/ruclxbin.htm
The bitwise operators are
Dick Moores [EMAIL PROTECTED] wrote
Thanks, Andre! I've got it for the three operators, for non-negative
integers. But I'm not sure I understand how negative integers work.
For example, is 3 -3 = 1
because it is 11 -11 = 01, and that's because one of the first
digits of 11 and -11 is not
Hi all,
I read in some conversations that the struct module maybe helpful in
converting Hex values to binary or decimal. Maybe I understood it
incorrectly.
Here is my problem.
I have a 22 byte data packet on a tcp socket connection. My data field is
from the 6th byte to byte 20. 14 bytes in
This kind of thing is usually handled at the level of the OS's
routing table. Routing tables have an entry called metric that is
used to weight the different routes, so that when there are multiple
possible links available, the one with the lowest metric is used
first. In Unix at least,
Johan Geldenhuys [EMAIL PROTECTED] wrote
The first two bytes of the data is a 16 bit value. Eg: \xe2\x01'
I can the first byte into binary if I use 'e2', but I don't know
how to get the '\x' out of the first byte to use it in python.
Are you sure it is there?
Usually the \x is only part
My sincere thanks to Rikard Bosnjakovic, Andre Engels, and Alan
Gauld. I think you've given me a good start toward understanding the
operators , , , ^, and | ; 32-bit numbers, and negative binary numbers.
Dick Moores
___
Tutor maillist -
Here is what I have:
data
'\xa5\x16\x0b\x0b\x00\xd5\x01\x01\x01\x00\x00\xe3\x84(\x01\xc6\x00\x00\x17\x
01C\xc7'
data[0]
'\xa5'
len(data[0])
1
You see that data[0] is only one byte and it doesn't see all four
characters.
If I want to do this:
int(data[0], 16)
File console, line 1, in ?
import __builtin__ occurs frequently in files in Lib/, but I'm
unable to find a module named __builtin__ or __builtin__.py
anywhere in my Python 2.5. Is there one? If there is, where is it?
Thanks,
Dick Moores
___
Tutor maillist -
You're way off base... :)
On Feb 19, 2007, at 9:25 AM, Johan Geldenhuys wrote:
Here is what I have:
data
'\xa5\x16\x0b\x0b\x00\xd5\x01\x01\x01\x00\x00\xe3\x84(\x01\xc6\x00
\x00\x17\x
01C\xc7'
data[0]
'\xa5'
len(data[0])
1
You see that data[0] is only one byte and it doesn't see
Hello,
I am trying to understand some sample code that includes the following
for a main program:
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] +
Johan Geldenhuys [EMAIL PROTECTED] wrote
data
'\xa5\x16\x0b\x0b\x00\xd5\x01\x01\x01\x00\x00\xe3\x84(\x01\xc6\x00\x00\x17\x
01C\xc7'
data[0]
'\xa5'
len(data[0])
1
OK, So that tells you that you have one byte.
The '\xa5' is a 4 character representation of that byte but it
is only one byte
On 2/19/07, Dick Moores [EMAIL PROTECTED] wrote:
Is there one? If there is, where is it?
Yes, there is one. It'sbuiltin(!) in the interpreter! ;-)
--
- Rikard.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dick Moores [EMAIL PROTECTED] wrote
import __builtin__ occurs frequently in files in Lib/,
Really? I'm surprised, I can't think why.
unable to find a module named __builtin__ or __builtin__.py
anywhere in my Python 2.5. Is there one? If there is, where is it?
It's C code so it's not a .py
On Mon, Feb 19, 2007 at 10:15:08AM -0600, Hazlett, Les wrote:
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
[snip]
if__name__=='__main__' only runs when this program file is executed.
But, I can't find any
Hazlett, Les wrote:
Hello,
I am trying to understand some sample code that includes the following
for a main program:
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
if __name__ == '__main__':
import sys,os
import run
run.main(['',
David Perlman [EMAIL PROTECTED] wrote
first. In Unix at least, you'll be able to use either the command
route or routed to manually change the routing table;
I don't think the routing systems on ordinary computers
were designed with the idea in mind that you might
want to use a
Rikard Bosnjakovic wrote:
On 2/19/07, Dick Moores [EMAIL PROTECTED] wrote:
Is there one? If there is, where is it?
Yes, there is one. It'sbuiltin(!) in the interpreter! ;-)
More info here:
http://docs.python.org/lib/module-builtin.html
Kent
It's wxpython demo's code.
It's necessary to have the run.py in the same path, to make it run, and usually
also some other files.
--
Tom, http://www.vscripts.net
I've never heard of this module. Where did this code come from?
___
Tutor maillist -
Dave,
Thanks for the guidance. I followed your advice and learned the
following:
import run
print run module:, run
run module: module 'run' from 'C:\Python25\Lib\idlelib\run.pyc'
The run.py file is there also. I can read but not understand what
run.py does. It may be something new in
Hazlett, Les wrote:
Dave,
Thanks for the guidance. I followed your advice and learned the following:
import run
print run module:, run
run module: module 'run' from 'C:\Python25\Lib\idlelib\run.pyc'
I don't think that is the correct run.py.
Luke,
I found this mystery main
Thanks Kent,
Yes, there is a run.py in the demo folder. I is the one that runs and
not the one in the Python25 lib.
So, I tried to see if I could find it if I previously imported
everything that the code imports. It didn't - see below:
IDLE 1.2
import wx
import sys,os
Hazlett, Les wrote:
Thanks Kent,
Yes, there is a run.py in the demo folder. I is the one that runs and
not the one in the Python25 lib.
So, I tried to see if I could find it if I previously imported
everything that the code imports. It didn’t – see below:
IDLE 1.2
import wx
Thanks very much for your responses, all. Just to clarify, yes, by
through class methods I actually meant through methods of instances
of a class.
Now for more discussion: I'm confused. On the one hand we have Mr.
Kent Johnson's statement:
On 2/13/07, Kent Johnson [EMAIL PROTECTED] wrote:
On Mon, 2007-02-19 at 18:31 -0500, Chris Lasher wrote:
I'm used to just setting and getting attributes straight, which would
be Pythonic according to Kent and yet also outright wrong according to
Alan and academic papers. So is direct access actually not Pythonic,
or is it Pythonic and
Chris Lasher [EMAIL PROTECTED] wrote
Now for more discussion: I'm confused.
:-)
Actually there is no real contradiction. I'll try to explain
and if I misrepresent Kent I'm sure he'll say so!
Kent Johnson's statement:
Python practice is to use direct attribute access. If you need to
do
Ah ha! All is clear, now. I understand what I misinterpreted in your
first post, Alan. Thanks also to Lloyd for reinforcing the concept.
Much appreciated!
Chris
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Thanks, Dave.
On the struct module, How can I het the binary 1's and 0's of the Hex value?
Let say I want to get the 8 bit value of '\xe2', can I use struct to convert
that into binary code so that I get 8 binary bits as a string?
Thanks for helping with struct.
Johan
-Original
38 matches
Mail list logo