On May 2, 3:01 am, "Martin P. Hellwig"
wrote:
> mark.sea...@gmail.com wrote:
> > On May 1, 5:57 pm, "Martin P. Hellwig"
> > wrote:
> >> mark.sea...@gmail.com wrote:
> >>> Hi;
> >>> I am trying to retrieve financial data off website for stock market
> >>> analysis. Just hobby not for pay. I actu
On May 1, 5:57 pm, "Martin P. Hellwig"
wrote:
> mark.sea...@gmail.com wrote:
> > Hi;
>
> > I am trying to retrieve financial data off website for stock market
> > analysis. Just hobby not for pay. I actually am impressed that
> > urllib2 and BeautifulSoup work pretty well to do what I want, and
Hi;
I am trying to retrieve financial data off website for stock market
analysis. Just hobby not for pay. I actually am impressed that
urllib2 and BeautifulSoup work pretty well to do what I want, and the
first little routine actually gets the data from the web page...
except if my VPN client is
Just as feedback, I went back to the __init__ style routine, weeded
out a few things, installed python 2.6.1, and it works great. Thanks
for all your help. Now I've got to convince 1000 people at my company
to switch. That's going to be the tough part.
--
http://mail.python.org/mailman/listinfo
On Mar 30, 12:05 pm, mark.sea...@gmail.com wrote:
> On Mar 30, 12:01 pm, mark.sea...@gmail.com wrote:
>
>
>
>
>
> > On Mar 30, 11:53 am, Dave Angel wrote:
>
> > > After taking out the class myclass stuff, the code worked for me in
> > > Python 2.6.1, through the cat line. Could you please tell u
On Mar 30, 12:01 pm, mark.sea...@gmail.com wrote:
> On Mar 30, 11:53 am, Dave Angel wrote:
>
> > After taking out the class myclass stuff, the code worked for me in
> > Python 2.6.1, through the cat line. Could you please tell us what
> > version of Python you're running this on?
>
> > import sy
On Mar 30, 11:53 am, Dave Angel wrote:
> After taking out the class myclass stuff, the code worked for me in
> Python 2.6.1, through the cat line. Could you please tell us what
> version of Python you're running this on?
>
> import sys
> print "Python version: ", sys.version
>
> yielded (on my m
If I cast it long then it prints fine, but I was hoping there would be
a slicker way (to accomplish this in the class itself).
print 'bird val = 0x%016X' % long(bird)
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 10:53 am, David Bolen wrote:
> mark.sea...@gmail.com writes:
> > class myclass(object):
> > #
> > # def __new__(class_, init_val, size, reg_info):
> > def __init__(self, init_val, size, reg_info):
>
> > # self = object.__new__(class_)
> > self.reg_info = reg_info
On Mar 30, 9:40 am, Scott David Daniels wrote:
> mark.sea...@gmail.com wrote:
> > ...
> > It seems like there's no way to do what I'm trying. I am confined to
> > Python 2.5.3 for business reasons.
>
> > So I want a class ShadowRegister, which just has a value that I can do
> > get/set bit sel an
Here again is example:
from ctypes import *
class REG_INFO(Structure):
_fields_ = [
('address', c_ubyte),
('message', c_char * 256),
('size', c_ubyte)
]
class myclass(object):
#
# def __new__(class_, init_val, size, reg_info):
def __init__(self, init_
It needs to read HW reg and adjust ChipRegister value, or
ShadowRegister and change the HW value (order was reversed). I will
look at MyHDL again though to see if there is some reason it can print
class subclassed from intbv, or if it even has a class subclassed from
intbv, without casting as a l
On Mar 30, 2:30 am, Jan Decaluwe wrote:
> mark.sea...@gmail.com wrote:
> > Python 2.5.3 for business reasons.
>
> > So I want a class ShadowRegister, which just has a value that I can do
> > get/set bit sel and slice ops. I got that working with __init__. It
> > was subclass from "object". Then
On Mar 29, 11:16 pm, Chris Rebert wrote:
> 2009/3/29 Scott David Daniels :
>
> > mark.sea...@gmail.com wrote:
>
> >> On Mar 29, 9:52 pm, Chris Rebert wrote:
>
> >>> On Sun, Mar 29, 2009 at 9:18 PM, wrote:
>
> ...
>
> >>> ... Also, you shouldn't use `class_ ` as the name of the first argume
On Mar 29, 9:52 pm, Chris Rebert wrote:
> On Sun, Mar 29, 2009 at 9:18 PM, wrote:
> > Hi. So now I have this class that works to allow me to pass in my
> > reg_info struct. However when I try to make it part of my class it
> > gets an error "global name 'self' is not defined. I've never seen
Hi. So now I have this class that works to allow me to pass in my
reg_info struct. However when I try to make it part of my class it
gets an error "global name 'self' is not defined. I've never seen
this error before. If I comment out the line below 'self.reg_info =
reg_info" then the code runs
On Mar 28, 1:47 pm, Scott David Daniels wrote:
> mark.sea...@gmail.com wrote:
> > ...
> > It appears that if I make the class a subclass of long...
> > class bignumber(long):
> > def __init__(self, initval):
> > self.val = initval
>
> > Then if I make a new class of subclass of bignumb
On Mar 27, 4:00 pm, Miles wrote:
> On Fri, Mar 27, 2009 at 6:56 PM, Gabriel Genellina wrote:
> > En Fri, 27 Mar 2009 18:43:16 -0300, escribió:
> >> Python print recognizes the local constant "dog", but it goes and
> >> fetches the __int__ type from my object-based class, even though it's
> >> val
On Mar 27, 7:48 pm, mark.sea...@gmail.com wrote:
> On Mar 27, 4:00 pm, Miles wrote:
>
>
>
>
>
> > On Fri, Mar 27, 2009 at 6:56 PM, Gabriel Genellina wrote:
> > > En Fri, 27 Mar 2009 18:43:16 -0300, escribió:
> > >> Python print recognizes the local constant "dog", but it goes and
> > >> fetches t
On Mar 27, 4:00 pm, Miles wrote:
> On Fri, Mar 27, 2009 at 6:56 PM, Gabriel Genellina wrote:
> > En Fri, 27 Mar 2009 18:43:16 -0300, escribió:
> >> Python print recognizes the local constant "dog", but it goes and
> >> fetches the __int__ type from my object-based class, even though it's
> >> val
What I mean is, is there a way to change the class so that print will
see it as a long, without having to cast it as one in the main
program.
--
http://mail.python.org/mailman/listinfo/python-list
Python 2.5, PC.
I have a question about getting Python print to be able to recognize a
long type.
class bignumber(object):
def __init__(self, initval=0):
self.val = initval
#
def __int__(self):
print 'bignumber.__int__ returning a %s' % type(self.val)
return self
On Feb 11, 5:51 pm, Marc 'BlackJack' Rintsch wrote:
> On Wed, 11 Feb 2009 17:33:23 -0800, mark.seagoe wrote:
> > Not sure what generic attribute container is. I am reading in from xml
> > file all reg names for a chip.
>
> Are you using instances of that class to interface C code or to read/
> wr
Hi Gabriel;
Not sure what generic attribute container is. I am reading in from
xml file
all reg names for a chip. So then I'd be able to use python scripts
to
access the regs. So eventually this class will get subclassed w/ hw
access
instead of just saving in int. So I want to call this modu
In last post, I mixed code w/ 'p' and 'point'. Should be:
>>> point._fields_.append(('z', c_int))
>>> point.z = 30
>>> print 'List:', list(point)
List: [10, 20, 30]
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 11, 9:01 am, mark.sea...@gmail.com wrote:
> On Feb 10, 9:52 pm, "Gabriel Genellina"
> wrote:
>
>
>
>
>
> > En Wed, 11 Feb 2009 00:31:26 -0200, escribió:
>
> > > I like the ability to access elements of a struct such as with ctypes
> > > Structure:
> > myStruct.elementName1
> > > 4
>
>
On Feb 10, 9:52 pm, "Gabriel Genellina"
wrote:
> En Wed, 11 Feb 2009 00:31:26 -0200, escribió:
>
> > I like the ability to access elements of a struct such as with ctypes
> > Structure:
> myStruct.elementName1
> > 4
>
> > What I like about it is there are no quotes needed.
>
> > What I don't
I like the ability to access elements of a struct such as with ctypes
Structure:
>>>myStruct.elementName1
4
What I like about it is there are no quotes needed.
What I don't like about it is that it's not iterable:
>>>for n in myStruct: <== gives error
>>>print n
I don't want to force the en
On Jan 29, 8:03 pm, Terry Reedy wrote:
> Erik Max Francis wrote:
> > mark.sea...@gmail.com wrote:
>
> >> Is there a way to lock down myInst so that it still refers to the
> >> original object, and is there some special member that will allow me
> >> to override the equals operator in this case? O
I know this may be asking too much of Python, but you never know
unless you ask...
So now having a class that can be treated like an int as far as math
upon the instance name, and can be treated as in HDL simulators,
allowing bitslice and bitselect ops, I was stoked. Also reading back
the instanc
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit, I
gotta then do another operati
On Jan 29, 1:50 pm, Oleksiy Khilkevich
wrote:
> Hello, everyone,
> This may be a totally noob question, but since I am one, so here is it.
For the input function, python is expecting you to input a number or a
string. If you enter 'asd' without the '' then it thinks you are
entering some variabl
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I would like it to write/read the whole value.
For example, if I have someth
35 matches
Mail list logo