@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19



Comments:

<0> Jerub: I don't see how python would work with one-bit reference counting, actually.
<1> altf2o: it's not just over the war tho.
<1> http://www.dailykos.com/story/2006/3/1/235828/9378 is the link
<2> is there somthing wrong with this command (well there is, but can someone help me understand it better) ...
<2> self->dueDate = PyObject_CallMethod(foo, "datetime", "iii", "2003", "02", "03");
<1> Arafangion: it can't be 1-bit.
<2> where foo is PyObject*
<1> I don't even know how that would work
<3> to bad they can't impeach based on lack of native tongue. He'd been gone a long time ago </low blow> :)
<0> Jerub: Well, in _my_ case, each item is either referred to by exactly one other item, or it's garbage.
<1> crap, the site is down.
<0> Jerub: Such as is the case with XML, afaik.
<1> http://shiny.thorne.id.au/~stephen/impeach.txt <- this is a copy of the submission
<1> it doesn't mention the war
<3> nice @ Jerub, thx...
<3> in many opinions that's where he's comitted the biggest\most severe (w/ regards to negative impact on our nation) crimes. It's odd they haven't thrown war crimes in there.



<4> this is just the mini-civil-war here between moralists who consider *** evil, and moralists who consider killing evil
<1> altf2o: no jury would convict him of that
<1> but torture and wiretapping they can nail him on
<3> agreed.
<5> hi all. please suggest any xml with schema validation ability?
<5> package i meant
<6> hi, does anybody know a python-based online bookmarking system?
<7> reddit, kinda
<8> ? y python in particular?
<6> something like http://www.frech.ch/online-bookmarks in python would be cool.
<7> For what purpose?
<6> Brend: for keeping track of your bookmarks
<7> Bracki, why do you care whether it's in Python?
<6> cos i dont want to install php on my server.
<6> plus if there was something like it i wouldnt have to write it from scratch ;)
<7> Why do you need to install anything on your server?
<7> Use del.icio.us, like everyone else does
<6> dont like it. i want control over my stuff
<7> Control? They'
<7> Control? They're bookmarks!
<7> (stupid keyboard)
<9> Bracki: put up your own private wiki, e.g. MoinMoin?
<6> well considered that as well.
<7> There is something seriously wrong with you people.
<6> but then again, i'll just keep doing it like always.
<6> remember some keywords, google/yahoo the stuff and remember which link to click.
<6> Brend: ?
<10> started a new chan #linuxsociety if you want ops jump in
<7> I'm trying to figure out what your decision-making criteria are. Evidently productivity and stability do not figure amongst them. Paranoia? Some kind of geek machismo? I'm lost.
<11> Loyalty.
<7> Really? I bet his _microwave_ doesn't run Python, why should his bookmarks have to?
<6> i dont use a microwave, bad for the food.
<6> well but thanks for the help anyways.
<6> http://del.icio.us/help/privacy <- read this and you know why i dont like it.
<7> Ah, paranoia it is.
<7> You realise that Google collects even more information about you than that, right? ;)
<7> At least del.icio.us say "unless _required_ by law". Google's equivalent privacy statement says "Unless we feel like it"
<9> worth a look from time to time: http://www.google-watch.org/
<6> http://fravia.com/ <- regarding search engines quite interesting as well
<12> hello
<12> I have a question. I'm writing a C module/extension that makes some calls to a library, and when I use it without being called in a thread, all works ok, but when I run some calls in a python thread some methods aren't called.
<12> I've tried Py_BEGIN_ALLOW_THREADS
<12> but I must've used it wrong
<12> so if anyone knows something about this, I'd be thankful
<13> hi fellows :)
<14> hi
<2> Can someone help me with embedded pythoning - I'm trying to have as a struct member of a new type, a data member of type PyObject* which is a datetime.datetime
<2> however it is coming out as a string for some reason, initialized to ''
<13> i have this: ((1,),(2,),(3,),(4,)) i want just this: (1,2,3,4) i m using this to convert it: for i in range(len(fb_dados)):
<13> fb_dados.append(int(fb_dados[i][0]));
<13> the question is: is there a faster way? i think this stuff is slow cause i have a lot of data O_o
<7> >>> tuple(x for (x,) in ((1,),(2,),(3,),(4,)))
<7> (1, 2, 3, 4)
<13> O_O
<13> Brend, thanx man :)
<7> It may not be much faster though
<2> http://pastebin.com/579943
<7> If you have _lots_ of data, consider using one of the real array packages
<13> Bread, its just numbers.. but its a lot of them.. i m making one script to sincronize a database, and i have to do a select in all the primary keys.. so it returns me something like 15k numbers hehe
<2> what I'm aiming for is to be able to do `myObj.dueDate' and get the set value of type datetime.datetime, and where required have that as a const
<15> what's the best way of detecting if i have an instance of my python script running already (win32), and how should I p*** data to it?



<13> Brend, that didnt work :(
<7> I need more information than "didn't work", since what I pasted clearly does work
<7> Unless you are on Python < 2.4
<9> AJC: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474070
<15> thanks pythonologist!
<13> Bread, nope, actually my structure is: [(13612,), (13613,), (13614,), (13615,), (13617,), (13618,), (13619,), (13620,)]
<13> and not ((1,),(2,),(3,),(4,))
<9> AJC: for the IPC u have a variety of options, e.g. drop file in dir, or sockets http://www.amk.ca/python/howto/sockets/
<15> ok, i'll poke around. cheers again!
<7> >>> tuple(x for (x,) in [(13612,), (13613,), (13614,), (13615,), (13617,), (13618,), (13619,), (13620,)])
<7> (13612, 13613, 13614, 13615, 13617, 13618, 13619, 13620)
<7> Are you on Python < 2.4?
<9> AJC: the first example really just "stops another instance starting", it doesn't actually identify the primary instance in any useful way
<15> heh, ok. so i need to find a way to connect the socket to something useful :-)
<13> Brend, i dont think so, how do i print out the python version?
<9> AJC: that's the point about client/server, they have to agree on port numbers etc or have a naming service
<7> Type "python" and see what it says ; )
<7> or import sys; sys.version
<2> I have a typedef struct { PyObject *dueDate; } Transact;
<2> as part of Transact_new, I try and initialize it by...
<13> Bread, 2.4.2 i think i know what i did wrong
<16> heheh, Bread
<2> self->dueDate = PyObject_CallMethod(xxx, "datetime", "(iii)", 2006, 12, 28);
<17> Wondering, where are the functions to escape/unescape HTML <-> text in the standard library? *wonder*
<18> yacc: cgi.escape, and the html parser
<13> Brend, now it worked.. lol.. i m so dumb.. i was printing out the wrong variable.. so it would never change hehe
<7> ;)
<13> Brend, thanx a lot :)
<17> deltab: htmllib sounds so "overkill" :(
<2> urllib?
<17> deltab: but it's probably the right thing to do.
<2> oh, sorry - ignore me
<18> yacc: or xml.sax.saxutils
<18> escape and unescape
<17> deltab perfect, thx.
<2> is there somewhere I should go for help on embedded python + c ?
<19> so why does this group now need names to be registered?
<12> darvish: how about PyEval_CallObject?
<12> darvish: I should warn you though that I'm still learning python's C api
<2> I'm new too don't worry; We can learn together =)
<12> :)
<20> damn
<20> pain in the *** here with encodings
<20> can't finish the damn program due to them :P
<2> hmmm the problem with that is that its talking about calling a function, I'm actually trying to have a datetime.datetime `type' in my struct
<2> so not implement it as a function. for example in python, typing myObj.dueDate will return a date
<12> oh
<12> right
<2> and I am quite lost too :/
<12> maybe search info about the functions you can specify in a *_type structure would help
<12> like tp_print and stuff like that
<21> hello fellow pythonistas
<12> darvish: http://python.active-venture.com/api/type-structs.html
<12> darvish: http://users.rcn.com/python/download/Descriptor.htm
<12> this is my best guess
<2> thankyou, that's better than I've found, now I'll read for a few hours and see... looking promising so far
<12> no problem
<22> profile.run("") agr is a string to eval, how can i p*** my local variable to the context of that eval ? Why is it a string and not a function ?
<22> profile.runctx seems to be what i'm looking for
<22> ok i understand now, it seems to be present only since python2.4
<23> I'm back to Python after almost two years. I'd like to avoid getting bad coding habits. Please take a look here and criticize, propose refactorings etc http://pastebin.com/579994
<2> personally i dont use breaks where i can avoid them, and use () instead of [] where not required
<24> howard: yes, i also recommend removing the highlighted lines: http://pastebin.com/580001
<23> darvish, please explain about () and [], post a bit of code before and after
<25> for x in (1, 2, 3):
<24> for key in ['url', 'login', 'p***word']: -> for key in ('url', 'login', 'p***word'):
<25> But I don't think that's a big deal. Tuples and lists aren't that much different internally, so why bother differentiating them.
<24> tuples are slighter faster (i believe) but for a list of size 3 it makes no practical difference anyhow
<23> mcmillen, I saw the pastebin, I can add that I also use 8-space tabs :)
<26> lists can be modiefied tuples not


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

synergy ubuntu xtest
#css
linux to empty mailq
Could not initialize video filters
ubuntu sound right speaker
ubuntu loop_clr_fd
#kde
pundai novell
#web
#perl



Home  |  disclaimer  |  contact  |  submit quotes