Re: chunking a long string?

2013-11-09 Thread Steven D'Aprano
On Sun, 10 Nov 2013 09:14:28 +1100, Chris Angelico wrote: > And > as is typical of python-list, it's this extremely minor point that > became the new course of the thread - You say that as if it were a bad thing :-P > my main point was not whether all, > some, or no strings get interned, but t

Re: pywin32 programming error on Win7 with shell.SHGetDesktopFolder, desktop.BindToObject, desktop.GetDisplayNameOf

2013-11-09 Thread iMath
thanks, I found out the reason: this question has no relationship with Win7 or WinXP,but related to the users' system setting . GetDisplayNameOf() only gives the DISPLAY name ,so the filename with or without extension acording to whether the user want to view files in the explorer with extensi

Re: When I send email as HTML, why do erroneous whitespaces get introduced to the HTML source and a few < > chars get converted to < and > ???

2013-11-09 Thread Walter Hurry
On Fri, 08 Nov 2013 14:06:38 -0800, richard.balbat wrote: > I have the following script that reads in an HTML file containing a > table then sends it out via email with a content type of text/html. > > For some reason a few erroneous whitespaces get introduced to the HTML > source and a few < > c

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Mark Janssen
On Sat, Nov 9, 2013 at 2:58 PM, Chris Angelico wrote: > So, on what basis _would_ you choose a language for some purpose? > Without speaking specifically of web development here, how do you > choose a language? Most generally, you choose a language informed by the language designer's intentions o

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 12:05 PM, Mark Lawrence wrote: > I'd forgotten I'd used Monk back around 1999/2000. I couldn't remember much > about it so just looked it up here > http://docs.oracle.com/cd/E18867_01/SRE/Monk_Reference_SRE.pdf, not sure if > it's double or triple yuck. >From the contents

Re: splitting file/content into lines based on regex termination

2013-11-09 Thread Piet van Oostrum
bruce writes: > hi. > > thanks for the reply. > > tried what you suggested. what I see now, is that I print out the > lines, but not the regex data at all. my initial try, gave me the > line, and then the next items , followed by the next line, etc... exp = re.compile(r"(#\d+\s*/\s*\d+#\d+#)")

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Mark Lawrence
On 09/11/2013 23:24, Mark Lawrence wrote: On 09/11/2013 22:58, Chris Angelico wrote: * Some languages are just fundamentally bad. I do not recommend ever writing production code in Whitespace, Ook, or Piet. In my last job I was forced into using Apple(42 not so obvious ways to do it)Script.

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 11:50 AM, MRAB wrote: > On 09/11/2013 22:44, Jonathan wrote: >> In pythonic syntax: >> >> select : >>case ,[],: >> >> >>case else: >> > [snip] > > It's more likely that the cases would be indented the same amount as > the 'select', and you wouldn't n

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 11:41 AM, Roy Smith wrote: > On 09/11/2013 22:58, Chris Angelico wrote: >> > >> > * Some languages are just fundamentally bad. I do not recommend ever >> > writing production code in Whitespace, Ook, or Piet. > > One of the worst coding experiences I ever had was trying to

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread MRAB
On 09/11/2013 22:44, Jonathan wrote: On Saturday, November 9, 2013 8:27:02 AM UTC-5, Joshua Landau wrote: `select` is quite an odd statement, in that in most cases it's just a weaker variant of `if`. By the time you're at the point where a `select` is actually more readable you're also at the p

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Roy Smith
On 09/11/2013 22:58, Chris Angelico wrote: > > > > * Some languages are just fundamentally bad. I do not recommend ever > > writing production code in Whitespace, Ook, or Piet. One of the worst coding experiences I ever had was trying to build an app for a Roku media player. They have a home-gro

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 9:44 AM, Jonathan wrote: > In pythonic syntax: > > select : > case ,[],: > which is equivalent to: elif = : > which is equivalent to: elif Small clarification: It's more akin to assigning to a temporary, and then comparing that temporary against everything. It's

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Mark Lawrence
On 09/11/2013 22:58, Chris Angelico wrote: * Some languages are just fundamentally bad. I do not recommend ever writing production code in Whitespace, Ook, or Piet. In my last job I was forced into using Apple(42 not so obvious ways to do it)Script. Yuck. -- Python is the second best prog

Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 8:21 AM, Mark Janssen wrote: >> I'd be interested to hear your thoughts on where the field of computer >> languages is heading, and how that affects the choice of languages for >> building web sites. > > Well, there aren't that many groupings towards which languages > spe

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Jonathan
On Saturday, November 9, 2013 8:27:02 AM UTC-5, Joshua Landau wrote: > `select` is quite an odd statement, in that in most cases it's just a > weaker variant of `if`. By the time you're at the point where a > `select` is actually more readable you're also at the point where a > different control f

Re: datetime question

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 2:39 AM, Gene Heskett wrote: > Ya know, folks like Nick would have me signing off. Fortunately there are > kill files. But the backscatter he creates I am still forced to read, or > more usually skip. > > Then one of you frustrated standup comics comes along, and gives me

Re: To whoever hacked into my Database

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 2:32 AM, Antoon Pardon wrote: >> And i had until i made some new changes last night, which i think i have >> corrected now as we speak. > > Continuing the arrogance. Just to put that in perspective, by the way: *EVERYONE* writes vulnerable code. Even Python itself has bee

Re: chunking a long string?

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 2:37 AM, Steven D'Aprano wrote: > I think that Chris is wrong about Python "only" interning > strings if you explicitly ask for it. I recall that Python will (may?) > automatically intern strings which look like identifiers (e.g. "spam" but > not "Hello World" or "123abc").

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Mark Janssen
> I'd be interested to hear your thoughts on where the field of computer > languages is heading, and how that affects the choice of languages for > building web sites. Well, there aren't that many groupings towards which languages specialize for (not including embedded or other application-speci

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Tim Chase
On 2013-11-09 21:01, Mark Lawrence wrote: > no comma is needed but a comma will be accepted. I find the optional trailing comma particularly useful (and painful in languages that don't accept it) for doing inline lists to produce cleaner version-control diffs. I write most of my code like this

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Mark Lawrence
On 09/11/2013 20:33, Mark Janssen wrote: * Call me pedantic by why do we need a trailing comma for a list of one item? Keep it intuitive and allow lstShopping=[] or ["Bread"] or ["Bread", "Milk","Hot Chocolate"] I don't like ["Bread",]. It bugs me. This one got answered, it has to do with the

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Ned Batchelder
On Saturday, November 9, 2013 3:33:30 PM UTC-5, zipher wrote: > Personally, I wouldn't recommend Python for web scripts. But I'm > biased and am speaking from where I see the field of computer > languages heading. > > MarkJ > Tacoma, Washington I'd be interested to hear your thoughts on where th

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Mark Janssen
A little late, but a couple of cents worth more data: > I've just got a few thoughts I'd like to share and ask about: > > * Why not allow floater=float(int1/int2) - rather than floater=float > (int1)/float(int2)? This has to do with evaluation order, the stuff inside the parens gets evaluated fir

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Tim Chase
On 2013-11-10 01:27, Chris Angelico wrote: > > Is everyone happy with the way things are? Could anyone recommend > > a good, high level language for CGI work? Not sure if I'm going > > to be happy with Perl (ahhh, get him, he's mentioned Perl and is > > a heretic!) or Python. I would very much valu

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread John von Horn
On Sat, 09 Nov 2013 07:08:25 -0600, John von Horn wrote: Thanks so much for the replies. I'll get my head down and keep on going. Sometimes it's great to be wrong. I have a good feeling about this language. It's also nice that I can tap into this pool of knowledge that is comp.lang.python - I'l

Re: To whoever hacked into my Database

2013-11-09 Thread Antoon Pardon
Op 09-11-13 07:32, Νίκος Αλεξόπουλος schreef: > Στις 9/11/2013 8:20 πμ, ο/η Chris Angelico έγραψε: >> On Sat, Nov 9, 2013 at 4:54 PM, Νίκος Αλεξόπουλος >> wrote: >>> Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He i

Re: datetime question

2013-11-09 Thread Gene Heskett
On Saturday 09 November 2013 10:33:57 Chris Angelico did opine: > On Sat, Nov 9, 2013 at 9:29 AM, Grant Edwards wrote: > > It's that global newline shortage again. Just because a few people > > get killed in a newline mine they all go on strike... > > It's a conspiracy! The government kills a

python operational semantics paper

2013-11-09 Thread Paul Rubin
This looks kind of interesting. http://cs.brown.edu/~sk/Publications/Papers/Published/pmmwplck-python-full-monty/ Abstract We present a small-step operational semantics for the Python programming language. We present both a core language for Python, suitable for tools and proofs, and a translati

Re: To whoever hacked into my Database

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 5:07 μμ, ο/η Steven D'Aprano έγραψε: On Sat, 09 Nov 2013 09:05:51 +0200, Νίκος Αλεξόπουλος wrote: Its probably unwise to post the following snippet of code that validates user input so an attacker wouldn't pass arbitrary values to my script but what the heck. On the contrar

Re: To whoever hacked into my Database

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 5:07 μμ, ο/η Steven D'Aprano έγραψε: On Sat, 09 Nov 2013 09:05:51 +0200, Νίκος Αλεξόπουλος wrote: Its probably unwise to post the following snippet of code that validates user input so an attacker wouldn't pass arbitrary values to my script but what the heck. On the contrar

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread rusi
On Saturday, November 9, 2013 9:26:02 PM UTC+5:30, Roy Smith wrote: > In article rusi wrote: > > On Saturday, November 9, 2013 6:38:25 PM UTC+5:30, John von Horn wrote: > > > Another useful tool in the programmer's toolbox > > > Select DayofWeek > > > case "mon" > > > ... > > > end select > >

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Roy Smith
In article , rusi wrote: > On Saturday, November 9, 2013 6:38:25 PM UTC+5:30, John von Horn wrote: > > Another useful tool in the programmer's toolbox > > > Select DayofWeek > > > case "mon" > > > ... > > > end select > > > You can typically write this in python as a dictionary >

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread rusi
On Saturday, November 9, 2013 6:38:25 PM UTC+5:30, John von Horn wrote: > Another useful tool in the programmer's toolbox > Select DayofWeek > case "mon" > ... > end select You can typically write this in python as a dictionary cases = {"mon": do_mon-action, "tue", do_t

Re: chunking a long string?

2013-11-09 Thread Steven D'Aprano
On Sat, 09 Nov 2013 09:37:54 -0500, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Some languages [intern] automatically for all strings, others (like >> Python) only when you ask for it. > > What does "only when you ask for it" mean? In Python 2: help(intern) In Python 3: i

Re: chunking a long string?

2013-11-09 Thread Roy Smith
In article , Chris Angelico wrote: > Pike implements #2, I presume that was a typo. Duh. Yes. -- https://mail.python.org/mailman/listinfo/python-list

Re: datetime question

2013-11-09 Thread Roy Smith
In article , Chris Angelico wrote: > On Sat, Nov 9, 2013 at 9:29 AM, Grant Edwards wrote: > > It's that global newline shortage again. Just because a few people > > get killed in a newline mine they all go on strike... > > It's a conspiracy! The government kills a few miners (with their > con

Re: Sandboxing Python [was Re: New user's initial thoughts / criticisms of Python]

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 2:25 AM, Steven D'Aprano wrote: > On Sun, 10 Nov 2013 01:27:11 +1100, Chris Angelico wrote: > >> I was trying to sandbox CPython and run untrusted scripts while stopping >> them from accessing the OS or file system. It's basically impossible > > PyPy is supposed to come wit

Re: chunking a long string?

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 2:21 AM, Roy Smith wrote: > But, you missed the point of my question. You said that Python does > this "only when you ask for it". That implies it never interns strings > if you don't ask for it, which is clearly not true: > > $ python > Python 2.7.1 (r271:86832, Jul 31 2

Sandboxing Python [was Re: New user's initial thoughts / criticisms of Python]

2013-11-09 Thread Steven D'Aprano
On Sun, 10 Nov 2013 01:27:11 +1100, Chris Angelico wrote: > I was trying to sandbox CPython and run untrusted scripts while stopping > them from accessing the OS or file system. It's basically impossible PyPy is supposed to come with a proper sandbox. Although even in that case, I think it is re

Re: chunking a long string?

2013-11-09 Thread Roy Smith
In article , Chris Angelico wrote: > On Sun, Nov 10, 2013 at 1:37 AM, Roy Smith wrote: > > In article , > > Chris Angelico wrote: > > > >> Some languages [intern] automatically for all strings, others > >> (like Python) only when you ask for it. > > > > What does "only when you ask for it" me

Re: To whoever hacked into my Database

2013-11-09 Thread Steven D'Aprano
On Sat, 09 Nov 2013 09:05:51 +0200, Νίκος Αλεξόπουλος wrote: > Its probably unwise to post the following snippet of code that validates > user input so an attacker wouldn't pass arbitrary values to my script > but what the heck. On the contrary, it is wise to publicise your security code. It

Re: datetime question

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 9:29 AM, Grant Edwards wrote: > It's that global newline shortage again. Just because a few people > get killed in a newline mine they all go on strike... It's a conspiracy! The government kills a few miners (with their contrail mind-control stuffo) to push the price of ne

Re: chunking a long string?

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 1:37 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Some languages [intern] automatically for all strings, others >> (like Python) only when you ask for it. > > What does "only when you ask for it" mean? You can explicitly intern a Python string with th

Re: chunking a long string?

2013-11-09 Thread Roy Smith
In article , Chris Angelico wrote: > Some languages [intern] automatically for all strings, others > (like Python) only when you ask for it. What does "only when you ask for it" mean? -- https://mail.python.org/mailman/listinfo/python-list

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Chris Angelico
On Sun, Nov 10, 2013 at 12:08 AM, John von Horn wrote: > Hi Everyone, > > I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am > enjoying working along to some youtube tutorials. I've done a little > programming in the past. Hi! For myself, I've come from a background writing

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Jussi Piitulainen
John von Horn writes: > Hi Everyone, > > I'm Mr. Noobie here, I've just started easing into Python (2.7.4) > and am enjoying working along to some youtube tutorials. I've done a > little programming in the past. > > I've just got a few thoughts I'd like to share and ask about: > > * Why not all

Re: my favorite line of py code so far

2013-11-09 Thread Peter Otten
Stefan Behnel wrote: > Peter Otten, 09.11.2013 12:49: >> There is no obvious meaning attached to _ -- so don't use it. > > Not quite true. Depending on the context, the obvious meanings of "_" in > Python are either > > 1) "ignore me", e.g. in > > _, b = some_tuple > > or > > 2) "this is

Re: datetime question

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 2:45 μμ, ο/η Mark Lawrence έγραψε: On 08/11/2013 23:02, Νίκος Αλεξόπουλος wrote: Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Mark Lawrence
On 09/11/2013 13:08, John von Horn wrote: Hi Everyone, I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am enjoying working along to some youtube tutorials. I've done a little programming in the past. If it's possible I'd strongly recommend Python 3.3, there's lots of goo

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Joshua Landau
On 9 November 2013 13:08, John von Horn wrote: > I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am > enjoying working along to some youtube tutorials. I've done a little > programming in the past. > > I've just got a few thoughts I'd like to share and ask about: > > * Why no

Re: Conditional breakpoints in ceval.c

2013-11-09 Thread Ned Batchelder
On Friday, November 8, 2013 9:03:51 PM UTC-5, Demian Brecht wrote: > Hi all, > > I have an .py file with a simple assignment in it: > foo = 'bar' > > Now, I want to set a conditional breakpoint in gdb, breaking on that > assignment (I'm guessing the top of the stack would be breaking on the > LOA

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Ned Batchelder
On Saturday, November 9, 2013 8:08:25 AM UTC-5, John von Horn wrote: > Hi Everyone, > > I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am > enjoying working along to some youtube tutorials. I've done a little > programming in the past. > > I've just got a few thoughts I'd

New user's initial thoughts / criticisms of Python

2013-11-09 Thread John von Horn
Hi Everyone, I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am enjoying working along to some youtube tutorials. I've done a little programming in the past. I've just got a few thoughts I'd like to share and ask about: * Why not allow floater=float(int1/int2) - rather th

Re: The narcissism of small code differences

2013-11-09 Thread Mark Lawrence
On 09/11/2013 12:42, Steven D'Aprano wrote: Uses an example written in Ruby, but don't let that put you off: http://raganwald.com/2008/05/narcissism-of-small-code-differences.html Wonderful read, thanks very much for the link. -- Python is the second best programming language in the world. B

Re: datetime question

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 11:45 PM, Mark Lawrence wrote: > Why is Web Security for Dummies missing? Because a Dummy can host a web (all you have to do is invite a spider into your house and let it do the work), but he won't be able to make it secure. Or, more succinctly: Because it isn't. ChrisA -

Re: datetime question

2013-11-09 Thread Mark Lawrence
On 08/11/2013 23:02, Νίκος Αλεξόπουλος wrote: Στις 9/11/2013 12:49 πμ, ο/η Denis McMahon έγραψε: On Sat, 09 Nov 2013 00:01:37 +0200, Νίκος Αλεξόπουλος wrote: I saw the link and i'm wondering if it can be written in 1-liner. Yes, but you have to rewrite all your code in perl to do this. P

Re: my favorite line of py code so far

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 11:41 PM, Stefan Behnel wrote: > 2) "this is a non-public thing", as in > > class Xyz: > _private = 1 Your three meanings all have the etymology of "ignore me", but I would distinguish this one from the others. An underscore used on its own has meaning; an under

The narcissism of small code differences

2013-11-09 Thread Steven D'Aprano
Uses an example written in Ruby, but don't let that put you off: http://raganwald.com/2008/05/narcissism-of-small-code-differences.html -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: my favorite line of py code so far

2013-11-09 Thread Stefan Behnel
Peter Otten, 09.11.2013 12:49: > There is no obvious meaning attached to _ -- so don't use it. Not quite true. Depending on the context, the obvious meanings of "_" in Python are either 1) "ignore me", e.g. in _, b = some_tuple or 2) "this is a non-public thing", as in class Xyz:

Re: my favorite line of py code so far

2013-11-09 Thread Peter Otten
Peter Cacioppi wrote: > Peter Otten said: > > > ">>> _ = lambda c: lambda x: c(*x) list(map(_(P), zip([1,2,3], [6, 5, 4]))) > [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)] > > ? While the obvious approach would be > [P(*args) for args in zip([1,2,3], [6, 5, 4])] > [Point(x=1, y

Re: chunking a long string?

2013-11-09 Thread Mark Lawrence
On 09/11/2013 08:14, wxjmfa...@gmail.com wrote: I'll ask again, please don't send us double spaced google crap. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/pytho

Re: WHAT DOES ISLAM SAY ABOUT TERRORISM ?????????????????

2013-11-09 Thread Paul Pittlerson
If you want to convert pythoneers to Islam, you are gonna have to show them how importing Allah will make their scripts run faster, or something like that. Otherwise, I'm pretty sure you are out of luck. -- https://mail.python.org/mailman/listinfo/python-list

Re: my favorite line of py code so far

2013-11-09 Thread Paul Rubin
Peter Cacioppi writes: [P(*args) for args in zip([1,2,3], [6, 5, 4])] [P(x,y) for x,y in zip(...)] > Are you saying it's always preferable to avoid map? Not always. Depends on context, partly subjective. > I sometimes use map, sometimes comprehensions. I suspect other people > do the sam

Re: my favorite line of py code so far

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 8:23 PM, Peter Cacioppi wrote: > I sometimes use map, sometimes comprehensions. I suspect other people do the > same, that's why the language supports map and comprehensions. I think map is fine if you can use a named function, but if you can't come up with a descriptive n

Re: my favorite line of py code so far

2013-11-09 Thread Peter Cacioppi
Peter Otten said: ">>> _ = lambda c: lambda x: c(*x) >>> list(map(_(P), zip([1,2,3], [6, 5, 4]))) [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)] ? While the obvious approach would be >>> [P(*args) for args in zip([1,2,3], [6, 5, 4])] [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)]

Re: To whoever hacked into my Database

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 10:39 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 7:31 PM, Νίκος Αλεξόπουλος wrote: if page and os.path.isfile( cgi_path + page ) in os.listdir( cgi_path ): Try pass bogus values again into my database! Well done! *slow clap* In the interests of security, you have ju

Re: To whoever hacked into my Database

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 10:39 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 7:31 PM, Νίκος Αλεξόπουλος wrote: if page and os.path.isfile( cgi_path + page ) in os.listdir( cgi_path ): Try pass bogus values again into my database! Well done! *slow clap* In the interests of security, you have ju

Re: Adding 'download' column to existing 'visitors' table (as requested)

2013-11-09 Thread Robert Kern
On 2013-11-09 04:27, Piet van Oostrum wrote: Sibylle Koczian writes: Am 07.11.2013 14:14, schrieb Piet van Oostrum: Nick the Gr33k writes: I have decided to take your advice. I wasn't able to fit those 'lists' of mine into MySQL's varchar() datatype after converting them to long strings an

Re: To whoever hacked into my Database

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 7:31 PM, Νίκος Αλεξόπουλος wrote: > if page and os.path.isfile( cgi_path + page ) in os.listdir( cgi_path ): > > Try pass bogus values again into my database! Well done! *slow clap* In the interests of security, you have just locked everything out, including legitimate usag

Re: To whoever hacked into my Database

2013-11-09 Thread Νίκος Αλεξόπουλος
Στις 9/11/2013 9:54 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: Στις 9/11/2013 9:05 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: Στις 9/11/2013 8:37 πμ, ο/η Chris Angelico έγραψε: On Sat, Nov 9, 2013 at 5:32 PM, Νίκος Αλεξόπουλος wrote: I'am not saying out of arrogance but i was really under the impression i had

Re: chunking a long string?

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 7:14 PM, wrote: > If you wish to count the the frequency of chars in a text > and store the results in a dict, {char: number_of_that_char, ...}, > do not forget to save the key in utf-XXX, it saves memory. Oh, if you're that concerned about memory usage of individual chara

Re: chunking a long string?

2013-11-09 Thread wxjmfauth
Le samedi 9 novembre 2013 01:46:32 UTC+1, Steven D'Aprano a écrit : > On Fri, 08 Nov 2013 12:43:43 -0800, wxjmfauth wrote: > > > > > "(say, 1 kbyte each)": one "kilo" of characters or bytes? > > > > > > Glad to read some users are still living in an ascii world, at the > > > "Unicode time" w

Re: To whoever hacked into my Database

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 6:44 PM, Νίκος Αλεξόπουλος wrote: > You are right. You could have servers anywhere in the world. > But i will assume the following hostnames are yours: > > mail14.ess.barracuda.com > mail0.ess.barracuda.com > > I'm quite sure this time because i notice that the last days whe