| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<0> ChiTo: that vulnerability is in libc, not in python :-) <1> if i want to distribute my program written on linux to a windows computer with python installed of course, will they have the same modules that i was able to use without downloading them seperately <2> pfote, you are right, i was confused with the realpath() one for a stack overflow <3> anyone trying to run the cheetah templates on Debian? I installed cheetah from apt, however something's up, because whenever i attempt to do something with Cheetah, I get this: ImportError: No module named Cheetah.Template <4> Laidback_01: http://aigamedev.com/Forum/viewtopic.php?t=27&sid=6df6b41bfb9e257592ef0979f92d9142 ? <3> can you check that link? I tried it and just get a few mysql errors <4> LaidBack_01: http://alnk.org/flatgig <4> LaidBack_01: (next-to-last posting.) <3> hmm.. I've already installed cheetah. I run cheetah test from any dir on the server and get a whole buch of periods and then Ran 1543 tests in 10.457s OK. I tried to ln -s the Cheetah site-install whatever dir to the local dir. <3> I can't seem to get past this. <5> Damn, coding in Java is frustrating. <6> I have a suggestion <7> LaidBack_01: what webserver are you using? <4> JoeDJ: Join us in #NewToPython! <8> is there a way to change file permissions in ftplib? <3> apache2 mod_python
<7> LaidBack_01: you can probably use the SetEnv directory to adjust the PYTHONPATH environment variable correctly <3> okay, so it's mostly that apache doesn't know where cheetah is? <7> LaidBack_01: python doesn't know <3> okay, but how come I can run cheetah and cheetah test from whereever? <7> i don't know. i've never used cheetah <1> does the windows python installer come with all the necessary modules that are found on linux python? <9> jadacyrus: it comes with a complete Python Standard Library <9> (as every normal Python installation does) <1> so anything ive used on linux and not had to download seperately, should work fine under windows? <8> tirkal, yup, but linux distros tends to have extra modules loaded as well <9> jadacyrus: there might be platform-specific issues <1> hmm <9> Sutabi: *nod*, that's why I focused on the SL <8> jadacyrus, its its simple code like "print world" you shouldn't have to worry <1> what about somethign like urllib2 <1> or, md5 <8> standard <1> k <1> awesome <8> jadacyrus, fi you used modules you not sure in in the python library check out http://docs.python.org/lib/modindex.html <1> ah, awesome! <9> jadacyrus: just keep in mind: don't take portability for granted. there are issues floating around. <1> yeah, im just actually giving this program to a friend whos on a windows machine <1> because he wanted to use it also <1> so i just wanna make sure everything goes smooth <1> looks like all my modules check out though so, awesome <10> jadacyrus: most importantly, make sure you open binary files in 'b' mode. <10> it only matters on windows, but it really does matter there. <1> the only file operation i do is saving some text <1> and thats actually just writing <9> so it shouldn't be a problem, esp. if you used os.linesep instead of just \n <1> even better, its writing a .html file so i just append <br> to the end of what im writing <9> yeah, if you're not writing a literal linebreak, that issue is irrelevant. <1> python is so simple its almost confusing <1> for me atleast <1> i came from VB :-\ <8> I came from QB ;p <5> jadacyrus: Most languages are very simple. <1> heh <1> i remember QB, i had some sweet games for it too <5> jadacyrus: The issue is the culture of that language, Java's culture (imho) results in very complicated API's (I'm _still_ trying to figure out how the heck to use XML parsing _without_ internet access) <1> yeh <11> qb rocked! <0> #d <1> every play that game very similar to tanks only it was with gorillas and you launced banana's <1> that game rocked. <5> jadacyrus: Doesn't work anymore, without modifying the source to slow it down. <1> doh! <5> (Well, it still works, but it's not very fun anymore) <1> heh <5> jadacyrus: I personally hate Basic, except perhaps on the C64 <12> one thing I don't like about modern programming culture is much stuff has gone xml based <12> sure itmakes sense in some circumstances <12> but god it sure is abused a LOT! <8> like program perferences> <8> ??? <5> kosh: Agreed, however, given simple and useful libraries, such as python and expat, or other libraries that use xml internally, it is simply convenient. <1> one thing i will never get used to is regular expressions <1> its mind boggling <5> Sutabi: No, like using XML when one should use SQL.
<4> Kosh: What's your preference? <8> Arafangion, ~_~ ouch so thats just being lazy then <12> Pythy: formats that make more sense <12> Arafangion: too often I have seen people make xml files that are meant to be mostly read and edited by humans <5> Pythy: Personally, I would use XML only where I can guarantee that the data is purely hiearchial, and needs to be extensible. <9> kosh: what do you prefer over XML? <8> tirkal, there is only one think i'd perfer <12> tirkal: in a lot of the cases I have seen it used key = value is more readable or just some other form of seperated text <12> xml is good for computer to computer work <12> however it ****s for human editing and reading <5> Same. <12> for instance csv is often far better <9> Yaml is nicer for human interface. <5> This Java XML parsing is driving me *crazy*. <9> and sure, CSV as well. <12> I have seen people use xml instead of csv where csv made obvious sense and it sure made life far harder <5> kosh: But csv isn't extensible. <12> Arafangion: right but for many cases it does not matter <12> Arafangion: for instance if you have a username,p***word,emailaddress to import into a system it is easy to generate, read etc and is even human writable trivially <12> Arafangion: no xml format is going to be easy for a human to write <8> whats about Yaml http://en.wikipedia.org/wiki/YAML <8> tirkal, ack didn't see your commenyt <6> Arafangion: extensible? <12> designing everything to be general purpose is very wasteful <5> kosh: It makes good sense in the context of OASIS, though. <12> stuff like ODF are not designed to be human editable so it does notmatter for them <5> kosh: Yup. <12> they are a good use of xml <12> however my problem is xml used where other stuff makes a lot more sense <5> Agreed. _my_ problem is overly complicated api's that simply don't work. <5> Such as currently Java's XML. <5> I've spent all day on that (Hence my ranting), to get it to work. <4> Yhg1s: Are the death-threats I'd get for using `_.' instead of `self.' justified? <12> lots of things are good until abused <12> Yhg1s: you are using _ instead of self in your functions? <10> Pythy: yes. <10> kosh: not me, Pythy. <5> Pythy: _ is often used to indicate a "junk" variable, ie, you need a variable but you want to indicate that you're not using it. <12> that is definitely a shooting offense <5> Pythy: For example: for _ in range(100): <4> Yhg1s: Why's that? (And would it conflict with the I18N usage?) <12> it is important to follow conventions <12> editors are designed to hightlight on self, people are used to seeing it, the python checkers test for it etc <10> Pythy: it would conflict, yes, if you use i18n. The reason it's a shooting offense is that 'self' is what's supposed to be used. If no one is going to see your code, or they like breaking the convention as much as you do, no one is going to shoot you. but if someone with a gun *and* a mind finds out, better hide. <10> (not that the gun & mind combination is common.) <4> Yhg1s: You packin'? <10> I'm not American. <4> hah <4> ICBM. <6> holy cow the logging module <6> I've been logging by banging two stones together for awhile now <12> if someone else ever has to maintain your code Pythy and you have replaced self with _ they are going to be very pissed <0> lol <12> and it will cost a lot of money in maintenance later <4> Yhg1s: What's the i18n conflict? <13> Pythy: _ is often used as macro/function to translate strings. <4> sanxiyn: In Python? <0> alus: and now you figured smoke signals or what ?! :-) <14> self should be self... and if it isn't, it should be called something similar <13> Pythy: Possibly in Python too. It's just a convention. <12> it should not be called something similar, it should be self period <13> Pythy: For example, _("world") could return "Welt". <6> pfote: funny you should say that, I've just sat down with my pipe <0> :-) <10> Pythy: if you use gettext.install (bad) or 'from gettext import gettext as _' (good, since it allows the standard literals-extraction-tools to work), the local _ will mask the global/builtin _. it'll mean extraction works, but translation throws an error. (unless all instances are callable and call the global _ via magic.) <15> sanxiyn: i've never seen that :) only ever seen i18n(blah) <13> lypanov: _ is also common. <15> i don't understand the point in arguing over coding style <15> when its so damn easy to fix the code
Return to
#python or Go to some related
logs:
Could not create needed directory '/var/lib/init.d/softscripts #perl #python emerge-delta-webrsync eix-sync compiling tars ubuntu #bash sockets arp with python gentoo clock tsc livecd kernel +kubuntu windows file sharing #oe
|
|