| |
| |
| |
|
Page: 1 2 3
Comments:
<0> whats the best way to parse a string in python like some kind of string tokenizer <1> .split() <2> hi <2> anyone else's seen a verbose regex parser...like a dictionary translator.........i want to replace this word if it's preceeds this and not after this <3> you're better off doing that manually rather than using regular expressions <2> but regex is hard <2> i pull my hair out everytime <2> success one time doesn't mean the next will be the same <2> it'd be easy for the experts out there to translate english in some regex...maybe two or three suggestions <3> and I'm suggesting that you DON'T use regular expressions <3> regular expressions aren't very useful when you have to do conditional matching or look-ahead/look-behind <2> oh <3> anything you get working will be extremely fragile <2> what do i use then <3> search manually for the words and then backtrack <2> i still don't know what you're talking about
<3> aString.find <2> if i'm using sed today, you suggest i use something better? <3> why are you asking in #python if you're using sed? <2> it's generic <2> like regex in python <3> exactly, and so has nothing to do with #python <3> try #regexp or #somewheremoreappropriate <2> python has re <3> so do a lot of languages <3> that doesn't justify asking in ALL language channels which support regexp, does it? <4> Is there some function list for php ? <4> yyy ment python <4> I want particullary my program to sleep for some time... <1> http://docs.python.org/ <4> madewokhe yeah, I'm there <1> http://docs.python.org/lib/module-time.html <4> ok thanks madewokhe <4> ok would you give some hints about inter-process communication in python ? <1> not really :/ <1> I don't know of anything that works well on all platforms for ipc <4> I want it to work under Linux <4> on conventional PC <4> Nothing more <4> This can be done only by C ? <4> I mean C extensions <1> uh, normal linux ipc functions are available <1> and there are bindings to dbus <4> Althrough I seem skilled I know merely an ANSI C (maybe a few libs) <4> I never done interprocess communication <1> I don't really know how linux ipc works :/ <1> I just know it's there <4> ok where's info about it ? <4> Python/C API Reference Manual ? <1> I guess <1> that might not be the best resource though :/ <1> the python functions should be very similar to the C functions <4> well they are mostly the same, there's just a big mess with python <4> in C I always know what kind of value I can ***ign to variable <4> and here I need only to say x = 1 <4> or x = foo <4> no big difference - this messes everithing up <1> I don't see how that's a problem :/ <4> becouse somwhere in the code I can forget about value of variable and then I must search through all the code to see what's going on (in I would just go to the start of the function and check type of variable) <4> this is the less <4> there might be numerous bufferoverflow attacks made on python program <4> s/might be/are <4> But it comes in handy sometimes <3> huh <3> ? <3> what buffer overflow attacks? <4> xihr for example integer overflow <3> integer overflow is not a "buffer overflow" <4> isn't ?! <3> uh, no <4> I always thought it is <3> a "buffer overflow attack" has nothing to do with integer overflow <3> well, good for you, but it's not <3> (integers don't overflow in Python anyway, they convert to infinite precision integers) <4> so Denial of Service can be made <4> these integers can grow to heaven <4> and eat all the memory then
<1> if you let people evaluate arbitrary expressions involving integers, sure <3> if somehow the programmer is dumb enough to let someone gain control over their interpreter, yes <3> but that's the most elementary part of security that it doesn't even need to be mentioned <4> xihr you know that program usually interacts <3> what <4> with human or another porgram <3> the type of exploit you're referring to can only happen if you execute arbitrary code from an untrusted source <3> which is exactly equivalent to executing arbitrary machine code from an untrusted source <3> except that it can't happen simply through a buffer overflow <3> which still has nothing to do with integer overflow <4> xihr let's say I make get() with no chcecking of lenght of input, it comes to bufferoverflow or denial of service <3> get what <3> are you talking about Python? <4> some chars <4> I done it a milion times in C <3> this isn't #c <4> it's surely similar in python <3> so what is your point <3> Python does bounds checking, it raises an exception if you go out of bounds <3> maybe you should try learning something about Python? <4> I need to come up with something until morning <3> what "something" <4> So I actually read about some of the functions <3> what functions <4> I'm writing a program <3> I have no idea what you're talking about <4> how do you name in python sleep() ? <4> sleep() <4> ? <3> time module <4> It's a function in C <4> well yes this function is located in time module <4> I'm writing a trigger for MUD client <4> (Multi User Dungeon) An RPG game in the net <3> I know what a MUD is, thanks <3> what is your point <4> I want my hero to harvest plants all day when I'll be sleeping ;) <4> Ok so it's my question <3> what is <4> How do you make interporcess communication in py ? <3> same as in C <3> sockets, named pipes, etc. <4> fork() ? <3> no <4> oh <1> fork exists <3> yes, but it has nothing to do with IPC <1> it can in some situations <3> nothing about IPC requires a fork <3> you can use fork in apps which use IPC, but you can also use fork in apps which don't <1> if you make a pipe before you fork, you can use it for ipc <4> seems only sockets will do the thing <3> how does that mean that fork has anything to do with IPC <3> you can open files and fork, does that mean that file opening has to do with fork? <3> that's nonsensical <3> fork and IPC are related in the same way any two random programming concepts are related: they might be usable in the same program but that doesn't make them related <4> xihr what's this WIDE project ? <3> no idea what you're talking about <4> they write that sockets are part of WIDE project <4> http://docs.python.org/api/node88.html <4> here <3> no, that's not what it says, read it again <4> ohhhhh mistake <3> why would you care where the code is licensed from anyway? <4> ok, so where are these sources so I can see them <4> becouse theres nothing on this side <3> why do you need to see the source to use python <4> site* <3> if you want the PYthon source, download the source tarball <4> ok, so where would you look for an info about sockets under python ? <3> are you asking how to use sockets in python? <3> there's a URL to it on that page <3> it's unimportant
Return to
#python or Go to some related
logs:
#beginner #nhl bind_inet_socket() 514 connection refused netperf
#stocks #gentoo #windows GOP + What does it stand for #unixhelp #computers
|
|