Working with HTML5 documents

2014-11-19 Thread Denis McMahon
, manipulate and produce html5 documents using this dom manipulation approach. Where should I be looking? -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Error when trying to open an image

2014-11-19 Thread Denis McMahon
OP-POSTING! IT@S GETTING ANNOYING NOW!* -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Working with HTML5 documents

2014-11-20 Thread Denis McMahon
On Wed, 19 Nov 2014 13:43:17 -0800, Novocastrian_Nomad wrote: > On Wednesday, November 19, 2014 2:08:27 PM UTC-7, Denis McMahon wrote: >> So what I'm looking for is a method to create an html5 document using >> "dom manipulation", ie: >> >> doc = new

Re: Tag objects in Beautiful Soup

2014-11-20 Thread Denis McMahon
On Thu, 20 Nov 2014 06:31:08 -0800, Simon Evans wrote: > Can anyone tell me where I am going wrong or where the text is wrong ? > So far the given code has run okay, I have put to the console everything > the text tells you to. Thank you for reading. > Simon Evans Having looked at the ebook, ther

Re: FW: Unexpexted behaviot of python operators on list

2014-11-25 Thread Denis McMahon
mprises previous y plus [4,5] -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help needed

2014-11-30 Thread Denis McMahon
ings and strung them together according to the letters they represented in the original string. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Nested dictionaries from a list ?

2014-12-07 Thread Denis McMahon
user's machines and profiles, and all of a machine's users and profiles. def query_machine_profiles(user): def query_user_profiles(machine): So I could add things like: print 'The user profiles on computerB are:', query_user_profiles ('computerB') and get the result: The user profiles on computerB are: {'Tom': 'Profile102', 'Dick': 'Profile390', 'Harry': 'Profile202'} By the way, my longest function definition used 7 lines of code, these are all fairly simple functions, and no list comprehensions. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Nested dictionaries from a list ?

2014-12-07 Thread Denis McMahon
ys() maintaining a separate list of users and having the users as the keys in mess suggests redundancy, and the potential for errors if the two data items get out of synch. Better imo to just have the data in one place. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python re.search simple question

2014-12-08 Thread Denis McMahon
27;,'x') # doesn't match (x not in "prev0,now1 ") re.search('\[prev 0 , now 1\]','p') # doesn't match re.search('\[prev 0 , now 1\]','[prev 0 , now 1]') # matches -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: question on string object handling in Python 2.7.8

2014-12-25 Thread Denis McMahon
to the string object. The next range(1, 1) times through the loop, python re-assigns the existing pointer to the existing string object. Maybe a 2 character string is faster to locate in the object table than a 1 character string, so that in the 2 character case, the lookup is faster. -- D

Re: suggestions for VIN parsing

2014-12-26 Thread Denis McMahon
print "Unit 650cc, 1963" if num >= 5825 and num <= 13374: print "Unit 650cc, 1964" etc etc etc Note, I think the 1981 model year ran KCA - DCA prefixes, not as shown on the website you quoted. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: smtplib not working as expected

2014-12-27 Thread Denis McMahon
is available only with SSL or TLS > connection enabled.' ^^ have a guess what these messages in the traceback mean. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: suggestions for VIN parsing

2014-12-29 Thread Denis McMahon
On Sun, 28 Dec 2014 16:27:20 -0700, Vincent Davis wrote: > On Fri, Dec 26, 2014 at 12:15 PM, Denis McMahon > > wrote: > >> Note, I think the 1981 model year ran KCA - DCA prefixes, not as shown >> on the website you quoted. > ​Denis, > Regarding the KCA - DCA pre

Re: Why For Loop Skips the Last element?

2015-01-01 Thread Denis McMahon
nlist.index(i),str(i) > elif 'men' in str(inlist[i]).lower() or 'male' in > str(inlist[i]).lower() or 'chronograph' in str(inlist[i]).lower(): > print 'Male Watch',inlist.index(i),str(i) > i = next(inlist) ..^ I

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-08 Thread Denis McMahon
blem, showing different ways to loop through your variables. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-08 Thread Denis McMahon
On Thu, 08 Jan 2015 22:07:03 +, Denis McMahon wrote: > On Thu, 08 Jan 2015 09:09:18 -0800, semeon.risom wrote: > >> Simple question. I hope. . To follow up, below is a solution to the problem you stated. #!/usr/bin/python import Image, ImageDraw, math def makeimg(length,

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-10 Thread Denis McMahon
ts list a inside another list, and puts list b inside another list, and then passes the whole of lists a and b in the first call to makeimg. makeimg expects 2 integer parameters on each call, not two lists! As you have already created lists, you don't need to wrap them inside another list

Re: Few coding suggestions

2015-01-11 Thread Denis McMahon
le. It would however be much easier to help you with your problem if you stated the problem you're trying to solve, eg "I wish to create a snapshot of process memory and cpu use every 5 minutes and send it to another server." -- Denis McMahon, denismfmcma...@gmail.com -- http

Re: Generate jpg files using line length (pixels) and orientation (degrees)

2015-01-11 Thread Denis McMahon
# You could also skip the list generation entirely. After the main function definition: f = open(filename, 'r') rdr = csv.reader(f) for row in rdr: makeimg(int(row[0]), int(row[1])) Also please note that you only need to quote the bits of the post that you are replying to to

Re: what would be the regular expression for null byte present in a string

2015-01-13 Thread Denis McMahon
part of the result. So 4 different methods, each of which seems to do, in the case of the specific example you gave, exactly what you want. However although I tried a few patterns, I don't seem to be able to create an re that will do the job. eg: >>> patt = re.compile(

Re: how can I create a class and decode/encode as json?

2015-01-13 Thread Denis McMahon
;sequence"] = i ... bit["data"] = "blah blah blah" ... thing["message"]["operations"].append(bit) ... >>> json.dumps(thing) '{"message": {"operations": [{"data": "blah blah blah", "sequence": 0}, {"data": "blah blah blah", "sequence": 1}, {"data": "blah blah blah", "sequence": 2}], "dateCreated": "1417713299"}}' -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Attribute error

2015-01-18 Thread Denis McMahon
ute references or attribute assignments at all, TypeError is raised.) Given your description of the problem, the best guess I can make is that you are trying to reference a non existent attribute, possibly because you have mistyped the name of the attribute you are trying to access. --

Re: Random ALL CAPS posts on this group

2015-01-20 Thread Denis McMahon
I have a regex that simply ignores any posting with no lower case in the subject. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Concerning Dictionaries and += in Python 2.x

2015-01-20 Thread Denis McMahon
On Mon, 19 Jan 2015 16:12:57 -0800, Luke Tomaneng wrote: > I have been having a bit of trouble with the things mentioned in the > title. I've uploaded a slightly different approach to your code at: http://www.sined.co.uk/tmp/shop.py.txt -- Denis McMahon, denismfmcma...@gmail.co

Re: python traceroute

2015-01-20 Thread Denis McMahon
to the way routers are configured to handle icmp than the tracert application itself. Unless you're doing this purely as an exercise in socket programming with python, it might be better to find a new problem to solve. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/

Re: Concerning Dictionaries and += in Python 2.x

2015-01-21 Thread Denis McMahon
ying to stay true to OPs original code and not introduce [too many] additional complications to his learning exercise. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python simple Code

2015-01-24 Thread Denis McMahon
n(list) is x items you will never be able to use x! as an index to the list. c) To refer to a single member of a list, use list[n] where n is the zero indexed element you wish to refer to. d) Note point b. l[len(l)!] (or l[Factorials(len(l))]) will always fail. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python simple Code

2015-01-27 Thread Denis McMahon
c] Not quite so long: words = ['salem','Ali','sultan'] for a in words: for b in [x for x in words if x != a]: for c in [x for x in words if x != a and x != b]: print [a, b, c] Observe that neither of these scale as elegantly as the permutations example already given. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Indentation issues with python

2015-02-05 Thread Denis McMahon
me = "SendPolicy" sasKeyValue = "erENqf/5wdWCNEbCA9NsDIRqd5MRKdkii07+wezl/NU=" .. more indented code should probably follow Getting the indentation correct is absolutely critical in Python. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Varable parsing error with python

2015-02-10 Thread Denis McMahon
one if it doesn't find an i such that i["@name"] == p, as _pkgVersion only gets set if such a match is found. Could this be cause by eg a string case match issue? Perhaps: if i["@name"].lower() == p.lower(): would be a better comparison to use? -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: urgent help

2015-02-19 Thread Denis McMahon
e can find it now. If he can't, I don't understand why he bothered to ask for help, because I'm pretty sure you nailed the issue right there, and unless he's going to read the responses to his post to see the answers that are provided it's a bit stupid to post asking for help in the first place. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: What behavior would you expect?

2015-02-19 Thread Denis McMahon
ntially valid, then you could respond to (1) the same as to (2). > 2. no files match the given pattern Return either None, 0, False or an empty string. In both cases, it is then a matter for the calling code to catch the exception or handle the return value appropriately. -- Denis McMaho

Re: What behavior would you expect?

2015-02-19 Thread Denis McMahon
On Fri, 20 Feb 2015 02:08:49 +1100, Chris Angelico wrote: > On Fri, Feb 20, 2015 at 1:16 AM, Denis McMahon > > wrote: >>> 2. no files match the given pattern >> >> Return either None, 0, False or an empty string. >> >> In both cases, it is then

Re: python implementation of a new integer encoding algorithm.

2015-02-19 Thread Denis McMahon
wasted bits and maximum cpu and memory efficiency, python really isn't the language in which to solve your problem. Perhaps it's time to take a step back and redefine the problem a bit more clearly, because at the moment I'm not sure you're solution will ever solve a

Re: urgent help

2015-02-20 Thread Denis McMahon
t;D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py", line > 119, in getExpertInfoLinks > fid = open("health-experts.htm","rb") This line tried to open a file called health-experts.htm > IOError: [Errno 2] No such file or directory: 'health-e

Re: How to design a search engine in Python?

2015-02-21 Thread Denis McMahon
re is your search engine going to have that makes it better than all the existing ones? -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: progress bar

2015-02-25 Thread Denis McMahon
lem description doesn't make sense to me. ;) -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Explanation of list reference

2014-02-14 Thread Denis McMahon
nt cheese and spam to start out as separate copies of the same list that you can manipulate independently, then you can use: cheese = [ x for x in spam ] eggs = spam[:] ham = list( spam ) >>> spam = [1,2,3,4,5] >>> cheese = [ x for x in spam ] >>> ham = l

Re: Just For Inquiry

2014-02-21 Thread Denis McMahon
On Thu, 20 Feb 2014 20:58:52 +0530, shivang patel wrote: > So, I kindly request to you please, give me a very brief info regarding > *Role of Project Manager*. while not project_is_finished(): take_steps_to_advance_project() -- Denis McMahon, denismfmcma...@gmail.com --

Storing the state of script between steps

2014-02-21 Thread Denis Usanov
Good evening. First of all I would like to apologize for the name of topic. I really didn't know how to name it more correctly. I mostly develop on Python some automation scripts such as deployment (it's not about fabric and may be not ssh at all), testing something, etc. In this terms I have

Re: Extracting parts of string between anchor points

2014-02-27 Thread Denis McMahon
sequence. The code in the file at the url below processes 17 different cases. It may help, or it may confuse. http://www.sined.co.uk/tmp/strparse.py.txt -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Extracting parts of string between anchor points

2014-02-27 Thread Denis McMahon
On Fri, 28 Feb 2014 00:55:01 +, Denis McMahon wrote: > The code in the file at the url below processes 17 different cases. It > may help, or it may confuse. > http://www.sined.co.uk/tmp/strparse.py.txt I added some more cases to it, and then realised that the code could ac

Re: "Latching" variables in function

2014-04-08 Thread Denis McMahon
)    if pushbutton > 0:         button_value = True # or: button_value = 1    return button_value Also I think I'd probably pass the IO address as a parameter to the button function. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: the logical operation confused me

2014-04-10 Thread Denis McMahon
]* (last truthy condition) will return (last truthy condition) where "[ clause ]*" represents an optional clause that may be repeated any number of times, "any condition" may evaluate falsey or truthy, "first" and "last" relate to the position of the condition type in a left to right evaluation sequence. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: python obfuscate

2014-04-12 Thread Denis McMahon
On Thu, 10 Apr 2014 18:29:21 -0700, Wesley wrote: > Currently our company wanna release one product developed by python to > our customer. But dont's wanna others see the py code. Your business model is fucked. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.

Re: How to get final URL after redirection

2014-04-27 Thread Denis McMahon
repeat to infinity, referencing previous item each time. pythonically: while isUsingGoogleGroups or isTopPosting: stop_doing_that() -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?

2014-05-02 Thread Denis McMahon
their machine somehow. Either you are permitted to do it, in which case you should already know how to do it, or you're not permitted to do it, in which case we're not going to teach you how to do it here. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: [Call for Paper - SCOPUS/ISI THOMSON] ICESTI 2014, September 10-13, 2014, Kuta Bali - Indonesia

2014-05-03 Thread Denis McMahon
ly to Bali in the name of sustainability and preserving the planet, and damn the CO2 created by doing so. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: A Question about Python

2014-05-06 Thread Denis McMahon
ing your conclusions in this matter. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: problems decoding json objects

2014-05-14 Thread Denis McMahon
u'AAnschrift': u'Bauerngasse', u'AOrt': u'Mainz'}, {u'KontaktTel': [u'01234', u'11223344']}, {u'ZahlungsArt': u'0'}, {u'ZugangsDaten': [u'tamer.hig...@nomail.com', u'mypass']}]

Re: Verify JSON Data

2014-05-26 Thread Denis McMahon
string" If you have a debian based linux distro, you can get jsonlint with: sudo apt-get install python-demjson which provides a command line json syntax checker and formatter. Otherwise, google json lint, there are several web based tools that seem to be able to do something similar. -- D

Re: How to read a directory path from a txt file

2014-06-02 Thread Denis McMahon
On Mon, 02 Jun 2014 08:13:23 -0700, Samuel Kamau wrote: > I have permission issues with my web server. Hacks to fix permissions problems are dangerous. There is probably a better way to fix this issue. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listi

Re: Using sudo to write to a file as root from a script

2013-08-08 Thread Denis McMahon
ecify a different log) Is the process that's trying to use the sudo command allowed to do so without a password? man sudoers Note - after editing /etc/sudoers you must set the permissions back to 440 -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Am I not seeing the Error?

2013-08-13 Thread Denis McMahon
should have been a third ";" after the third write2file in the job definition. -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
google servers. If he's trying to prove communication works, he might be better off using a message subject of "test" and a message body of "this is a test message". -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
ur mta config. OFF TOPIC IN comp.lang.python -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
the google mta or downstream due to their spf score. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Denis McMahon
m. [1] The ip address that it is sending ack packets to as part of the smtp session, so unless you're using a proxy somewhere, this will be your system's ip address. Can't fake it. If the other system doesn't know your ip address, it can't send acks, and the tcp se

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Denis McMahon
tworks until you understand how tcp/ip networks function. This NG is not a networking for dummies course. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-09-23 Thread Denis McMahon
input and output units are the same, and the output value is the input value. Then to compare T1 in u1 and T2 in u2, convert them both to a common scale (which might be u1 or u2 or some other scale) using your temp function, and then compare the resulting values. -- Denis McMahon, denismf

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
by yourself, what does the following function "f" which takes the same params as "comp" do: def f( t1, u1, t2, u2 ): if u1 == u2: return t2 else: return temp( t2, u2, u1 ) -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
the units of t1 if they're in different units (2 lines), and then do his comparison (5 lines). -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
On Tue, 24 Sep 2013 14:51:31 +, Denis McMahon wrote: > Question, given the original "temp" function as previously described by > yourself, what does the following function "f" which takes the same > params as "comp" do: > > def f( t1, u1, t2,

Re: Referrer key missing form os.environ dictionary?

2013-09-25 Thread Denis McMahon
s a network protocols issue that has nothing whatsoever to do with python. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Denis McMahon
of( some_value ) or some_function_of ( some_value ) if some_value: host = some_function_of( some_value ) else: host = some_value or even: try: host = some_function_of( some_function_of( some_value ) or some_function_of( some_value ) ) except some_error_type [ or some_error_type

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Denis McMahon
R') and os.environ.get('REMOTE_ADDR') is false > or "Άγνωστη Προέλευση" )[0] The you try and get the host name from the ip address "Άγνωστη Προέλευση", but "Άγνωστη Προέλευση" is not an ip address, so you get an error. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Denis McMahon
a stupid attitude for a coder to have. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Denis McMahon
ask this? Simply change: except socket.gaierror as e: city = host = "UnKnown Origin" To: except socket.gaierror as e: city = "Unknown City" host = "Unknown Host" -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Denis McMahon
is nothing special about writing it in as few lines as code as possible. Writing it out in a way that is easy to understand and follow helps make sure it actually works, and makes it a lot easier to maintain in future. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: card dealer

2013-09-27 Thread Denis McMahon
tes Granted prngs seem to be better on the importing entropy from elsewhere front these days. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: what is wrong in my code?? (python 3.3)

2013-09-27 Thread Denis McMahon
ur browser? eg: test.html: - Hello, world! ранее предусматривалась смертная казнь. - This really doesn't look like a python issue (again). -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Denis McMahon
line of code. >> >> Happy? >> >> > Classic overengineering, fancy wasting two whole spaces and having such > long names. Surely c,h=0,0 is vastly superior? Why not c=h=0 2 characters (28%) shorter! -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help me with Python please (picture)

2013-09-27 Thread Denis McMahon
iable, and then print the variable? Or perhaps not, perhaps you were going to do the output some other way? -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-29 Thread Denis McMahon
variable failed to be > assigned a value that we can use in order to decide to which variable we > will Yes, set the default values first, and overwrite them with the successful values when the values are successfully calculated. This is a very common method used in many programming languages. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-29 Thread Denis McMahon
like your dysfunctional code, and use the solutions you are given. If you want to write minimalist perl code, then stop using python and use perl. In either case, you need to stop arguing with people who are offering you solutions to your problems solely based on the fact that you don't like their coding styles. You are the one who comes here asking for solutions. Either accept the solutions you are offered, or stop asking for them. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-30 Thread Denis McMahon
ect but the problems have been exacerbated by the many suggested > patches given here being 100% incorrect? I'm sending you the bill for hospital admission. I laughed so hard I fell off of my chair and banged my head! -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-10-01 Thread Denis McMahon
/ 100 The calculate the compounded interest as annual ^ years Finally multiply the compounded interest by the principal Mathematically: principal * ( ( 1 + ( period_interest_% / 100 ) ) ^ periods ) Again, this should be possible as a single line function. All you have to do is turn the math into p

Re: JUST GOT HACKED

2013-10-01 Thread Denis McMahon
tp, dns, tcp/ip, mimetypes, utf-8, basic internet security And this is just based on the last 30 days of your posts! -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I haev fixed it

2013-10-02 Thread Denis McMahon
before starting down the path of threatening legal action, I suggest you run a comprehensive credit check on your target. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: JUST GOT HACKED

2013-10-02 Thread Denis McMahon
multi line solution. The mocking was because you were failing to recognise that if it doesn't work, it's not a solution, no matter how nice it looks. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Can arbitrary code run in a server if someone's know just the MySQL password?

2013-10-02 Thread Denis McMahon
hen wrote the contents of that block of memory to disc as a file. (This explanation may contain some assumptions.) -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I haev fixed it

2013-10-02 Thread Denis McMahon
> threads hilarious? You're making the sort of demand for an apology that's usually followed by a comment such as "or I will sue you for defamation". Personally I think demanding an apology is a waste of time and ng bandwidth, but *shrugs* whatever. -- Denis M

Re: Select fails when cookie tried to get a numeric value

2013-10-05 Thread Denis McMahon
it here, I am finished with trying to help you, ever! -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Select fails when cookie tried to get a numeric value

2013-10-06 Thread Denis McMahon
On Sun, 06 Oct 2013 08:20:35 +0300, Νίκος Αλεξόπουλος wrote: > Thank you Denis, i didn't knew about sessions up until i saw you post. > Your code is very advanced for me to read but i will try to "decode it" > I though that if we want to read something from our visitor,

Re: Code golf challenge: XKCD 936 passwords

2013-10-08 Thread Denis McMahon
to v6, and > save another 6 characters :-) Doesn't matter where it is, a link to it exists at "/w" now ;) -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Re for Apache log file format

2013-10-08 Thread Denis McMahon
trings in '"' characters, and uses '-' as an empty field. So I think every element should match: (\S+|"[^"]+"|-) and there should be \s+ between elements. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Denis McMahon
7;ll just tell his browser to not use cookies, aren't you. Nick, if a user doesn't want to be tracked, you can't track them. The user controls all the data their machine sends to you. This means that they can manipulate it. Nothing you can do will prevent this. -- Denis Mc

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Denis McMahon
ICH IS NOT HERE! Ideally you need to check what the server thinks it's setting the cooking to, what the browser thinks it received as the cookie, and what the server gets back afterwards to work out where the error is happening. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: > Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> Have you checked the cookie jar in the browser to see what value the >> cookie has? Is that the value you think it should have? Note that >> checking the co

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
n't working. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: > Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: >> On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> >>>> Have you ch

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: > Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: >> On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> >>>> Have you ch

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: > On Wed, 09 Oct 2013 18:06:05 +0000, Denis McMahon wrote: > >> Find the relevant forums and ask in them. > > In fairness to Nikos, that may not be an easy thing to do. I for one > have *no idea* where to fi

Re: Cookie gets changed when hit comes from a referrer

2013-10-10 Thread Denis McMahon
ut me? If I asked you for a few > pointers about a good place to learn about running a web site, would you > tell me to fuck off too? I wonder what you are doing here, if you are so > unwilling to share your hard-earned knowledge with others as you seem in > this post. This attitude is not

Re: basic maze problem with turtle

2013-10-13 Thread Denis McMahon
ically pure, and hence far superior to any solution more mundane coders might produce. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: basic maze problem with turtle

2013-10-14 Thread Denis McMahon
On Sun, 13 Oct 2013 23:54:34 +, Steven D'Aprano wrote: (and Gary Herron wrote similar) > Was that really necessary? Am I still pissed at being told my solution was crap because it had too many lines? -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/

Re: Trying to force turtle back to beginning of maze after collides with wall

2013-10-14 Thread Denis McMahon
x27;x', 1, None, None ), 1: ( None, None, 3, 0 ), 2: ( None, 3, 'x', None ), 3: ( 1, None, None, 2 ) } Drawing such a maze graphically would require allocating co-ordinates in some drawing space to the vertices of each room, and drawing lines along the e

Re: Searching for a list of strings in a file with Python

2013-10-14 Thread Denis McMahon
How can I change this to input the strings to be searched from another > file? > > So far I haven't been able to. read all the search strings into a list while there's data in shakes read a line from shakes for each string in search string list search the line fr

Re: Cookie aint retrieving when visiting happens from a backlink.

2013-10-25 Thread Denis McMahon
ow to do it here) and look for an http forum where you can ask why cookie x isn't applied to server y. This is not that forum. Oh look, that's almost the same advice I gave you about 10 days ago! So you've spent 10 days ignoring my advice, and then you call Chris lazy. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie aint retrieving when visiting happens from a backlink.

2013-10-25 Thread Denis McMahon
ot in range(128) > What is wrong and the module cannot be installed? 'ascii' codec can't decode byte 0xe7 in position 2255: ordinal not in range(128) Hmm, let me try and phrase this in a way you might understand: You fed poison to baby. Baby got sick and died. -- Denis M

<    1   2   3   4   5   6   >