Jussi,
Thanks it worked when parsed with json.load. However, it needed this
decode('utf'):
data = json.loads(respData.decode('utf-8'))
On Thu, Apr 7, 2016 at 6:01 AM, Jussi Piitulainen <
jussi.piitulai...@helsinki.fi> wrote:
> Emeka writes:
>
> > He
Hello All,
import urllib.request
import re
url = 'https://www.everyday.com/
req = urllib.request.Request(url)
resp = urllib.request.urlopen(req)
respData = resp.read()
paragraphs = re.findall(r'\[(.*?)\]',str(respData))
for eachP in paragraphs:
print("".join(eachP.split(',')[1:-2]))
Please I downloaded Python 3.5 (32 bit) for Windows software. I installed
it but it keeps giving me an error message that a file was not found and I
should please re-install to fix the problem. I've tried that severally but
to no avail. Please what can I do or should I just install the 2.7 version
Hello All,
Could one say that generator expressions and functions are Python way of
introducing Lazy concept?
Regards, \Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Well, I checked unit 2 out the other day. It is indeed of poor standard and
to some extend a waste of time for me. However, I see it as another way of
having fun.
On Sat, Mar 3, 2012 at 5:47 AM, Josh English wrote:
> On Monday, February 27, 2012 6:37:25 PM UTC-8, Ray Clark wrote:
> >
> > You have
e today. But who are we
to question
him concerning this issue.
Is the above code the right way?
Regards, \Emeka
On Sat, Feb 18, 2012 at 5:17 AM, Emeka wrote:
> Neil,
>
> Thanks. Could you throw a simple example?
>
> Regards, \Emeka
>
>
> On Fri, Feb 17, 2012 at 3:12 PM, N
Neil,
Thanks. Could you throw a simple example?
Regards, \Emeka
On Fri, Feb 17, 2012 at 3:12 PM, Neil Cerutti wrote:
> On 2012-02-16, MRAB wrote:
> > On 16/02/2012 23:10, Emeka wrote:
> >> Hello All,
> >>
> >> I know about seek and tell while using rea
Hello All,
I know about seek and tell while using readline. What about if I am using
read, and I want to undo the last character I just read(to return it back
to the stream). How do I achieve this?
Regards, \Emeka
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Boo.__dict__
{'__module__': '__main__', 'ball': , 'daf':
, '__dict__ ..}
print hex(id(Boo.daf))
0x27de5a0
My question is why is it that the id of Boo.daf is different from daf's
hex value in the above dict?
Regards, \Emeka
*Satajanu
Dennis , Chris
Thanks so much!
On Mon, Feb 6, 2012 at 1:23 AM, Dennis Lee Bieber wrote:
> On Mon, 6 Feb 2012 00:41:24 +0200, Emeka wrote:
>
> >Hello All,
> >
> >I noticed that MySQLdb not allowing hyphen may be way to prevent injection
> >attack.
>
&
ot; )
ProgrammingError(1064, "You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 't know where to go.
How do I work around this error?
Regards,
Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
. I look forward to
your feedback and comments.
https://github.com/janus/cheeta
Thanks in advance!
Regards,
Emeka
*
*
--
http://mail.python.org/mailman/listinfo/python-list
Thanks.
Regards,
Janus
On Wed, Jan 11, 2012 at 7:12 PM, Dennis Lee Bieber wrote:
> On Wed, 11 Jan 2012 09:57:43 +0200, Emeka wrote:
>
>
> >_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL
> >syntax; check the manual that corresponds to you
ass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near ' street_number int, country_name varchar,
street_name char(40) , user_name ch' at line 1"
Hello All,
I have a dictionary object I would like to convert to xml.
Could some assist with the link to libs to use? Or good examples.
Regards,
Janus
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Chris,
Thanks a million!
Regards,
Emeka
On Thu, Dec 29, 2011 at 1:27 AM, Chris Angelico wrote:
> On Wed, Dec 28, 2011 at 11:13 PM, Emeka wrote:
> > Hello All,
> >
> > I have seen what I am looking for.. __dict__.
> >
>
> Yep! You may also want to look
Hello All,
Say I have a class like below
class Town:
state = StateClass()
cities = CityClass()
Is there way to introspect such that one can list the properties keys and
their values in such a way that it would look like playing around
dictionary ?
Regards,
Janus
--
*Satajanus Nig
Hello All,
I have seen what I am looking for.. __dict__.
Thanks!
Regards,
Janus
On Wed, Dec 28, 2011 at 1:05 PM, Emeka wrote:
>
> Hello All,
>
> Say I have a class like below
>
> class Town:
> state = StateClass()
> cities = CityClass()
>
>
> Is
Hello All,
What is the downside of using globals function
Regards,
Janus
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Noah, Calvin
Thanks so much!
Regards,
Emeka
On Wed, Dec 21, 2011 at 6:57 AM, Noah Hall wrote:
> On Wed, Dec 21, 2011 at 4:39 AM, Emeka wrote:
> >
> > Hello All,
>
> > v = []
> >
> > def add_to_list(plist):
> > u = plist.append(90)
> >
one returns nothing, why?
Regards,
Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
.__dict__[self.side] = value
class Game(object):
d6 = Die()
d10 = Die(sides=10)
d20 = Die(sides=20)
Game.d3 = 90 (This failed)
Regards,
Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Alex,
The question was not meant for you. I was responding to Greg's comment.
Regards,
Emeka
On Mon, Oct 3, 2011 at 12:14 AM, Alexander Kapps wrote:
> On 03.10.2011 00:15, Emeka wrote:
>
>> Greg,
>>
>> Do you have an example where the Controller is connected?
&
Greg,
Do you have an example where the Controller is connected?
Regards,
EMeka
On Sun, Oct 2, 2011 at 4:40 AM, Gregory Ewing
wrote:
> Alexander Kapps wrote:
>
> But I think a simple (and quick 'n' dirty) Tk MVC example can look like
>> this:
>>
>
> The Con
Hello All,
I need a basic example where MVC pattern is used with Python TK.
Regards,
Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
Philipp,
Thanks so much for your time and comment. I will re-work my code
accordingly.
Regards,
Emeka
On Sat, Sep 17, 2011 at 12:19 PM, Philipp Hagemeister wrote:
> Instead of comments, you can often use docstrings
> (http://www.python.org/dev/peps/pep-0257/ ):
>
> This is hard to
Hello All,
While learning Python I put together another Text Twist. I would want
somebody to go through it and comment.
https://github.com/janus/Text-Twist
--
Regards,
Emeka
*
*
--
http://mail.python.org/mailman/listinfo/python-list
Hello All
I have an uncompleted version of a game http://pastebin.com/gkhTaYPZ I am
trying to code I have struggled to make method unbind work. But it has
refused to listen to me. Could someone come to my help?
Regards,
Emeka
http://pastebin.com/gkhTaYPZ
--
*Satajanus Nig. Ltd
. For now, I would
like to stick with Tkinter, I checked out PIL. It seems like support for
Python27 is jet to be included.
Regards,
Emeka
--
*Satajanus Nig. Ltd
*
--
http://mail.python.org/mailman/listinfo/python-list
the
future and not the past. So, go for Python 3. Being new to programming, what
matters most is learning programming and not the minor syntactical
differences. Get them to understand the real thing and they would build up
from there.
Regards ,
Emeka
On Mon, Sep 27, 2010 at 4:48 PM, Marco Gallotta wr
Hello Dave
>
> There are more complex things that can go on, like creating "bound"
> function objects, but I think this should get you pretty far.
>
> Could explain the complex things for me?
Regards,
Janus
--
http://mail.python.org/mailman/listinfo/python-list
Okay if that is the case, why do we need it? By having int a = 65, b = 66 ,
why should we also have *kwlist[]?
static PyObject* foo(PyObject *self, PyObject *args, PyObject *kwrds)
{
int a=65, b=66;
char *kwlist[] = {"a", "b", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwrds, "|CC",
Case,
Thanks so much! However, I am still confused. This is what I understood;
foo (a = "a", b = "b") so function , foo, has default values which are "a"
and "b". pointer kwlist[] is a way of specifying default values .
Regards,
Emeka
On Fri, Dec 18
char *kwlist[] = {"a", "b", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwrds, "|CC", kwlist, &a,
&b))
I am yet to understand what pointer kwlist[] does and why it is needed?
Regards,
Emeka
On Fri, Dec 18, 2009 at 8:17 AM, casevh wrote:
>
t, &a,
&b))
return NULL;
return Py_BuildValue("(CC)", a, b);
}
Regards,
Emeka
The following code seems to work fine for me:
static PyObject* foo(PyObject *self, PyObject *args, PyObject *kwrds)
{
int a=65, b=66;
char *kwlist[] = {"a", "b", NULL};
I
Hello All,
I am finding it difficult getting my head around PyObject_CallObject(x,y). I
need a gentle and thorough introduction to it. I also need examples. Could
someone come to my need?
Thanks.
Janus.
--
http://mail.python.org/mailman/listinfo/python-list
Hello All,
I am new to python , and my aim is to use it to write sugar-based
applications on XO(OLPC). I am not new to programming in general, I would
want to know the best route to take in learning python. I have background in
FP and Imperative languages.
Regards,
Emeka
--
http
37 matches
Mail list logo