On 09/13/2013 08:24 AM, Peter Otten wrote:
> Anthony Papillion wrote:
>
>> And I get a traceback that says: No JSON object could be decoded. The
>> specific traceback is:
>>
>> Traceback (most recent call last):
>> File "coinbase_bot.py", line 31, in
>> getCurrentBitcoinPrice()
>> File "c
In Anthony Papillion
writes:
> I'm still working to get my head around JSON and I thought I'd done so
> until I ran into this bit of trouble. I'm trying to work with the
> CoinBase API. If I type this into my browser:
> https://coinbase.com/api/v1/prices/buy
> I get the following JSON returne
Anthony Papillion wrote:
> Hello Again Everyone,
>
> I'm still working to get my head around JSON and I thought I'd done so
> until I ran into this bit of trouble. I'm trying to work with the
> CoinBase API. If I type this into my browser:
>
> https://coinbase.com/api/v1/prices/buy
>
> I get th
Hello Again Everyone,
I'm still working to get my head around JSON and I thought I'd done so
until I ran into this bit of trouble. I'm trying to work with the
CoinBase API. If I type this into my browser:
https://coinbase.com/api/v1/prices/buy
I get the following JSON returned
{"subtotal":{"amo
The callback is a method so you need to specify the owner
builder.connect_signals({"on_window_destroy" : gtk.main_quit,
"on_btnExit_clicked" : self.btnExit_clicked})
Got this info from
http://www.pygtk.org/articles/pygtk-glade-gui/Creating_a_GUI_using_PyGTK_and_Glade.htm
cheers
--
http://mail.
Hi Everyone,
So I've used Glade to build a simple UI and I'm loading it with
gtkBuilder. The UI loads fine but, for some reason, none of my signals
are being connected. For example, in Glade, I said when the button
called btnExit was clicked, execute the btnExit_clicked method. Then, in
my App() c
On 18-May-10 17:51 PM, Alex Hall wrote:
Hi again all,
More about classes. I am still looking into my battleship game, and I
will have several different craft. All craft have common attribs
(position, alive, and so on) but each craft may be a surface ship,
submarine, or airplane. All three are cra
Dave Angel wrote:
Inside the __init__() method of Submarine, simply call the __init__()
method of Craft, with appropriate parameters.
To elaborate on that a little, it looks like this:
class Craft:
def __init__(self, position):
self.position = position
class Submarine(Craft):
Alex Hall wrote:
So by calling submarine(craft) I am bringing
in all of craft's attribs (subclassing)? Or does calling craft's
__init__ method do that instead?
By making Submarine a subclass of Craft, you are inheriting
any methods, or other class attributes, defined in the
classes themselves.
Alex Hall wrote:
Sorry, top-posting is a habit on some other lists I am on, and
sometimes it follows me to lists where in-line posting is the way to
do it.
Which list you're on shouldn't matter. You should cultivate
the habit of always quoting selectively and minimally, on
any list. It may tak
On 5/18/10, Dave Angel wrote:
> Alex Hall wrote:
>> Okay, that makes sense. So by calling submarine(craft) I am bringing
>> in all of craft's attribs (subclassing)? Or does calling craft's
>> __init__ method do that instead? Is there an advantage to doing it
>> this way, rather than just making se
Alex Hall wrote:
Okay, that makes sense. So by calling submarine(craft) I am bringing
in all of craft's attribs (subclassing)? Or does calling craft's
__init__ method do that instead? Is there an advantage to doing it
this way, rather than just making separate classes for everything,
except for m
Okay, that makes sense. So by calling submarine(craft) I am bringing
in all of craft's attribs (subclassing)? Or does calling craft's
__init__ method do that instead? Is there an advantage to doing it
this way, rather than just making separate classes for everything,
except for my own sense of orga
Alex Hall wrote:
Hi again all,
More about classes. I am still looking into my battleship game, and I
will have several different craft. All craft have common attribs
(position, alive, and so on) but each craft may be a surface ship,
submarine, or airplane. All three are craft, but a submarine can
Hi again all,
More about classes. I am still looking into my battleship game, and I
will have several different craft. All craft have common attribs
(position, alive, and so on) but each craft may be a surface ship,
submarine, or airplane. All three are craft, but a submarine can be
submerged or no
Jim Qiu wrote:
Thanks for you patience, Dave.
Obviously i have not got used to the python philosophy.
Following you guide, i implemented the following code, and you are
absolutely right.
#!/usr/bin/python
#coding:utf-8
class Parent(object):
def __init__(self):
pass
def displayAttrOfSubClass(
Thanks for you patience, Dave.
Obviously i have not got used to the python philosophy.
Following you guide, i implemented the following code, and you are
absolutely right.
#!/usr/bin/python
#coding:utf-8
class Parent(object):
def __init__(self):
pass
def displayAttrOfSubClass(self):
print self
Jim Qiu wrote:
Hi everyone,
Following is the code i am reading, i don't see anywhere the declaration of
Message.root object,
Where is it from?
#bots-modules
import bots.botslib as botslib
import bots.node as node
from bots.botsconfig import *
class Message(object):
''' abstract class; rep
Jim Qiu wrote:
> Hi everyone,
>
> Following is the code i am reading, i don't see anywhere the declaration of
> Message.root object,
> Where is it from?
...
Prehaps it gets assigned by the parent itself?
Like this:
def spawn_child(self):
child = Message()
child.root = self
--
Mike Ka
Hi everyone,
Following is the code i am reading, i don't see anywhere the declaration of
Message.root object,
Where is it from?
#bots-modules
import bots.botslib as botslib
import bots.node as node
from bots.botsconfig import *
class Message(object):
''' abstract class; represents a edi mes
On May 23, 10:47 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On May 23, 1:44 pm, Gandalf <[EMAIL PROTECTED]> wrote:
>
> > you've been very helpful but still i have only one problem. I wont the
> > window not to be close after clicking the X button.
> > I wont the program to stay on the toolbar
>
On May 23, 1:44 pm, Gandalf <[EMAIL PROTECTED]> wrote:
> you've been very helpful but still i have only one problem. I wont the
> window not to be close after clicking the X button.
> I wont the program to stay on the toolbar
>
> thanks!
Well then, in your event handler, just don't do anything.
d
you've been very helpful but still i have only one problem. I wont the
window not to be close after clicking the X button.
I wont the program to stay on the toolbar
thanks!
--
http://mail.python.org/mailman/listinfo/python-list
On May 23, 12:02 pm, Gandalf <[EMAIL PROTECTED]> wrote:
> On May 23, 6:25 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>
>
>
> > On May 23, 10:45 am, Gandalf <[EMAIL PROTECTED]> wrote:
>
> > > How can i bind function that handle the mouse clicking window X event
> > > or clicking alt+F4
>
> > > th
On May 23, 6:25 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On May 23, 10:45 am, Gandalf <[EMAIL PROTECTED]> wrote:
>
> > How can i bind function that handle the mouse clicking window X event
> > or clicking alt+F4
>
> > thanks
>
> You really need to learn to ask good questions. Unless people d
On May 23, 10:45 am, Gandalf <[EMAIL PROTECTED]> wrote:
> How can i bind function that handle the mouse clicking window X event
> or clicking alt+F4
>
> thanks
You really need to learn to ask good questions. Unless people dive
into your previous posts, they won't know what Python GUI toolkit you
How can i bind function that handle the mouse clicking window X event
or clicking alt+F4
thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-08-07, Steven W. Orr <[EMAIL PROTECTED]> wrote:
> I have a structure I need to pack. I call struct.pack about a dozen times
> and each call takes about 53 arguments.
>
> I create a sequence of the arguments:
> a1 = 1
> a2 = 2
> a3 = 3
> etc...
> a54 = 88
> myseq = (a1, a2, a3, a4 etc... a5
I have a structure I need to pack. I call struct.pack about a dozen times
and each call takes about 53 arguments.
I create a sequence of the arguments:
a1 = 1
a2 = 2
a3 = 3
etc...
a54 = 88
myseq = (a1, a2, a3, a4 etc... a53)
Also I made
def mpack ( fmt, *ss ):
print type(ss)
for ii in
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
>i think it may be,
Moral: don't use arbitrary values as booleans.
--
http://mail.python.org/mailman/listinfo/python-list
i think it may be,
i am just doing a while 1: loop to just wait for whatever comes in.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
>databack = sockobj.recv(1028)
>if databack:
> print 'caught a message %s bytes ' % len(databack)
>else:
> print 'fail to recieve data from server'
>
>the output in the terminal runs fine until it fails to get the
>databack, it
lo there all !
i finally got my script to receive info on a socket. but i need to
somehow set up a loop that will continue to listen for more info
comming across the same socket.
the way it works is, i log in with a login and password, it shoots back
an acknowlagement, then i send a request for d
33 matches
Mail list logo