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

2013-09-29 Thread Joel Goldstick
of cycling through the tunnel... > wlle thats fien bit i doont wnt to go thru the tunnel. Perhaps you can suggest my sloulution > -- > https://mail.python.org/**mailman/listinfo/python-list<https://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: class implementation

2013-09-30 Thread Joel Goldstick
writing some code using classes or extending a class. Then come back when something doesn't work as expected -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: fetchall to python lists

2013-09-30 Thread Joel Goldstick
s that you already have what you want. each tuple is contained in the out list of all of the tuples. For brevity sake, I am acting as if the data set contained only a single row: >>> result = (('2013', 2014, 7, 242, 96064.35),) >>> result (('2013', 2014, 7,

Re: VERY BASIC HELP

2013-09-30 Thread Joel Goldstick
ing the basics. Do you guys know of any guides for a beginner? I am > definitely willing to take the time to learn in depth :) > check out the documentation links on python.org to start > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgold

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

2013-09-30 Thread Joel Goldstick
nd again to be rude to all who first try to help you out, then realize you are such a total jerk that they even wish you an awful demise without even having met you.. Take a look in the mirror dude. I don't care if you want to tell me to shut up. It seemed amusing to others here. -- Joel Goldstick http://joelgoldstick.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 Joel Goldstick
On Mon, Sep 30, 2013 at 6:08 PM, Νίκος wrote: > Στις 1/10/2013 12:44 πμ, ο/η Joel Goldstick έγραψε: > >> >> >> >> On Mon, Sep 30, 2013 at 5:34 PM, Νίκος > <mailto:nikos.gr...@gmail.com>**> wrote: >> >> Στις 30/9/2013 11:44 μμ, ο/η M

Re: I have a problem when creating a django project

2013-10-01 Thread Joel Goldstick
; > > > > "/home/djangoprojects/myproject". > > > > > > > > > > --traceback Print traceback on exception > > > > > > > > > > --version show program's version number and exit > > > > > > > > > > -h, --helpshow this help message and exit > > > > > > > > > > > > > > > > > > > > Type 'django-admin.py help ' for help on a specific > subcommand. > > > > > > > > And what happened now... > > > > > > > > h:\jcode>django-admin.py help > > > > Type 'django-admin.py help' for usage. > > ok...i solve the problem, clean the Registry and reinstall python > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I haev fixed it

2013-10-01 Thread Joel Goldstick
king into a field that has neither gate nor > fence. > > > -- > Cheers. > > Mark Lawrence > > -- > https://mail.python.org/**mailman/listinfo/python-list<https://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I haev fixed it

2013-10-01 Thread Joel Goldstick
not to allow such view. >>>> >>> >>> I agree. Just keep folders for scripts and templates above the actual >>> public_html. >>> >> >> python scripts need to be placed inside the 'cgi-bin/' folder which >> is located at &

Re: python function parameters, debugging, comments, etc.

2013-10-01 Thread Joel Goldstick
ny developers? > > Thanks, > Chris > -- > https://mail.python.org/mailman/listinfo/python-list > One way is to require docstrings (the triple quoted text immediately following the def line) on your project and set out requirements for how to describe the function/method arguments

Re: Stop posting HTML [was Re: I haev fixed it]

2013-10-01 Thread Joel Goldstick
Tue, 01 Oct 2013 09:27:02 -0400, Joel Goldstick wrote: > > > all your base are belong to us > class="gmail_extra">On Tue, Oct 1, 2013 > > at 9:19 AM, Mark Lawrence < > href="mailto:breamore...@yahoo.co.uk"; > > target="_blank">breamo

Re: Rounding off Values of dicts (in a list) to 2 decimal points

2013-10-02 Thread Joel Goldstick
d put a print statement below that to see what v has become. Your inner loop rewrites v for each loop. It actually re-writes it twice i think -- once when it iterates, and once when it calculates. So you need to fix that. Also I think you need to interate using d.interitems() That's a star

Re: Strange extra f added to bytes object

2013-10-06 Thread Joel Goldstick
em valid. >> >> Can anyone shine some light this? > > "f" is the same as \x66; nothing has been changed. really? I would expect that \x66 = 0110 0110 and f = > > -- > To email me, substitute nowhere->spamcop, invalid->net. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange extra f added to bytes object

2013-10-06 Thread Joel Goldstick
example: > >>>> b'\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64' > b'hello world' ah, now I see ascii 'f' = \x66that's a double take! > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie: installation difficulties [webapp2 / babel]

2013-10-07 Thread Joel Goldstick
'*babel*' > and > find /bin -name '*babel*' > return no values, but > find /Library -name '*babel*' > does (as expected). > > I've tried to find similar situations in documentation, forums, Google but > found nothing helpful. > -- > https:/

Re: Newbie: installation difficulties [webapp2 / babel]

2013-10-07 Thread Joel Goldstick
#using-python-on-a-macintosh >From the looks of it, babel doesn't seem to be in a directory where the mac looks for executables. You may want to cd yourself over to where babel is and try to run it. If that works, you have to figure out how to get babel in your executable path. I can't help you there. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: converting letters to numbers

2013-10-08 Thread Joel Goldstick
') 65 >>> ord('a') 97 >>> In your assignment you refer to Upper case letters. In your code you take the ordinal value of lower case 'a' -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Joel Goldstick
ive you a small bit of javascript that you copy and past to your pages. If you are using a template to create your pages, this is easy, since you just add google code to the template. > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-08 Thread Joel Goldstick
hat www.example.com and example.com can be considered different domains. You can make a cookie work for both but you need to understand cookies to learn how. This is off topic, ... again! > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Can ay one help me on pysvn , i want to capture the log and status of checkout call .....

2013-10-09 Thread Joel Goldstick
> > After this how can i check the exit code and capture the specific log that > would have generated during this transaction of svn co command internally. > -- > https://mail.python.org/mailman/listinfo/python-list have you checked the pysvn mailing list: http://pysvn.tigris.org/ds/viewForums.do -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
e last two paragraphs there that you quoted. You should have read >> them. >> > ok so then tell me where i should ask this. > I already told you where to learn about cookies. Try that first. People will be nicer to your questions if you show you are willing to come prepared. As to where to ask -- perhaps there is an http mailing list. Your code can't work if you don't know how cookies work. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
> > Expire is not the issue here, as i have it is working with no problem. > when i print the cookie expiration time is calculated properly. > Something else is going worng. > Indeed! > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick htt

Re: Consolidate several lines of a CSV file with firewall rules

2013-10-11 Thread Joel Goldstick
d the rows below that until you run into another row with a number in the first position. Why don't you write some code, see how it goes, copy and paste the code back here with full traceback if you get an error or with your results if you have some. Do it for a subset of a couple of rows of input data. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing a drop down menu for a specific field.

2013-10-21 Thread Joel Goldstick
this to be true with your long miandering debug pleas that you bring here. best wishes Iron head -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

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

2013-10-25 Thread Joel Goldstick
-- > https://mail.python.org/mailman/listinfo/python-list Chris is too kind. Go to wikipedia. and then go for a walk.. don't come back here -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Check if this basic Python script is coded right

2013-10-26 Thread Joel Goldstick
.org/mailman/listinfo/python-list You should run it to see what results you get. I am guessing that you don't know the ultimate answer, but you could run it for a much smaller number than 200 and check the results by hand. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get final URL after redirection

2013-10-31 Thread Joel Goldstick
for the google analytics tracking code in > the window.onload handler. Unless you wanted to include a full HTML and > javascript execution environment in your application, you're pretty much > toast here. > -- > https://mail.python.org/mailman/listinfo/python-list You mig

Re: how to extract page-URL using BeautifulSoup

2013-11-01 Thread Joel Goldstick
you use to open > the page in the first place in your case link. > > > > > -- > May a Misguided Platypus lay its Eggs in your Jockey Shorts. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Retrieving possible list for use in a subsequent INSERT

2013-11-01 Thread Joel Goldstick
t;, "movie2", "movie3", "movie3"] > > > is enum or set column types what needed here as proper columns to store > 'download' list? > > Code: > > create table visitors > ( > counterID integer(5) not null, > host varchar(50) not null, > refs varchar(25) not null, > city varchar(20) not null, > userOS varchar(10) not null, > browser varchar(10) not null, > hits integer(5) not null default 1, > visits datetime not null, > downloads set('None Yet'), > > foreign key (counterID) references counters(ID), > unique index (visits) > )ENGINE = MYISAM; > > > Is the SET column type the way to do it? > i tried it but the error i'm receiving is: > > > pymysql.err.InternalError: (1241, 'Operand should contain 1 column(s)') > > Please help pick the necessary column type that will be able to store a a > list of values. > -- > https://mail.python.org/mailman/listinfo/python-list If you have a list of values of the same type, but different values, you need a new table with a foreign key to the table it relates to. This is a relational database question. You can read more here: http://en.wikipedia.org/wiki/Database_normalization#Normal_forms -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add a current string into an already existing list

2013-11-05 Thread Joel Goldstick
ow do I do this? 1. Here's how No, I don't like that way 2. Here's a bad way Oh good, will you write it for me. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help me with this code PLEASE

2013-11-05 Thread Joel Goldstick
gain, I'm not the one screaming in all caps about the same several problems over and over for the last year or more on this list. The results show no more understanding or growth in skills, and an attitude that never shows a glimmer of interest in learning. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Help me with this code PLEASE

2013-11-06 Thread Joel Goldstick
Your repeated behavior of starting new threads is just a boring childish method to demand attention. You have our attention. I believe that most of us if not all of us think you are the most aggravating, incompetent, rude, needy, manipulating, person we have ever seen online ever. Go away, and c

Re: Anki add-on - Help needed

2013-11-06 Thread Joel Goldstick
listinfo/python-list Best to you if someone here can help, but your question isn't really a python question as much as one about how anki or pyqt work. Have you looked for mailing lists for pyqt or anki? you might have better luck there. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-06 Thread Joel Goldstick
d challenge. I personally would rather watch a bad infomercial, but for all of you bloodthirsty shut ins with nothing to do... here's your moment! -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

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

2013-11-07 Thread Joel Goldstick
you might consider going away forever so as not to cause other people problems! > I cant overcome the urge though to try to use some database that can hold > lists to a single. You need to see a therapist to help with overcoming your urges. We are not qualified in that area. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

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

2013-11-07 Thread Joel Goldstick
e ever encountered on line. On a side note to whoever hacks into Nick the idiots website -- why not just take it down. Then he won't have any need to spend his 20 euros, and there will be no code to fix. Problem solved! -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-07 Thread Joel Goldstick
idn't manage to mess again with either of my counters or >> clients databases. >> >> Too bad! I though 'she' was better than that! > > > She's just biding her time so as to cause you maximum pain!!! > > > -- > 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/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Finance: Mean-Variance Efficient Frontier - Portfolio Optimization - Markowitz

2013-11-07 Thread Joel Goldstick
/mail.python.org/mailman/listinfo/python-list google gives this: http://www.quantandfinancial.com/ -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Immediate requirement - Sr. Business Analyst for Pricewaterhouse Coopers (PwC) in Tampa, FL.

2013-11-07 Thread Joel Goldstick
om (Gtalk) || > petter.parker123 (Skype) || www.svksystems.com (Company mail ID) > > > Microsoft Certified Partner | Oracle Certified Partner | E-Verified Company > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-07 Thread Joel Goldstick
. > -- > https://mail.python.org/mailman/listinfo/python-list but... a very polite hacker -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-08 Thread Joel Goldstick
he world. > But the best has yet to be invented. Christian Tismer > > Mark Lawrence > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-08 Thread Joel Goldstick
Tim Delaney > > > > I gave the root password to Chris because i was under the false(as proven) > impression that he was gonna actually help my code. > > If i knew, that this wasn't his intention i would not give it away. http://www.youtube.com/watch?v=WeYsTmIzjkw &

Re: To whoever hacked into my Database

2013-11-08 Thread Joel Goldstick
; I have not laughed so much in years. You really should be on the stage, >>>> there is one leaving in 10 minutes. >>>> >>>> >>> >>> I have all of the above characteristics in a small degree. >>> >>> If the mighty hacker is so good and i'm so bad in programming and >>> securing my script why cant she break bad again? >>> >>> And why are you posting under your real name but as "unknown" instead? >> >> >> Because I do not want a twit like you sending me direct emails. >> > > > Like i was in the mood of sending mail to a twat like youself. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: datetime question

2013-11-08 Thread Joel Goldstick
Don't get me wrong but i had the lastvisit calculated on 1 statement and i > want to retain it this way. > > Is it possible? > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: datetime question

2013-11-11 Thread Joel Goldstick
or? Daylight savings time is more complicated that you have suggested > if DST happens? If you insist upon displaying the local time of your server, you should not be hardcoding in a 2 hour difference. Let the python library figure out the delta by giving the country code > -- > http

Re: datetime question

2013-11-11 Thread Joel Goldstick
So this is a physics joke. The engineers and physicists at the conference went to dinner. They ordered wine with dinner. The wait person asked: "Would you like the small liter, or the large liter?" -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailma

Re: Creating a function for a directory

2013-11-11 Thread Joel Goldstick
) % file > out_file.write(indata) > out_file.close() > in_file.close() > > firstdev("test") > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a function for a directory

2013-11-11 Thread Joel Goldstick
Sorry for incorect answer. Those guys nailed it On Nov 11, 2013 5:43 PM, "bob gailer" wrote: > On 11/11/2013 5:26 PM, Matt wrote: > >> So I want to take the file, "desktop/test.txt" and write it to >> "desktop/newfolder/test.txt". I tried the below script, and it gave me: >> "IOError: [Errno 2] N

Re: datetime question

2013-11-11 Thread Joel Goldstick
On Mon, Nov 11, 2013 at 5:49 PM, wrote: > On Friday, November 8, 2013 3:06:33 PM UTC-7, Joel Goldstick wrote: >> rurpy? can you help? > > No, sorry. For your future reference, if there is a > question I can help with (have the technical knowledge, > haven't seen a

Re: To whoever hacked into my Database

2013-11-11 Thread Joel Goldstick
e question (why are >> you asking if you already know better), > > That's pretty illogical thinking. How can he know better *before* > he asks and sees the answers. Only after he gets the answers can > one decide if they are better or not. > >> and secondly because the >> collective knowledge and skill is far greater than any individual's. > > Really? You can't think of cases where one individual saw beyond > the collective view? Your premise is defective. There are many > cases where the collective view is faulty do to group-think, > influence by leaders, emotional involvement, etc. > http://en.wikipedia.org/wiki/Collective_behavior > >> So why reject advice out of hand? If it's inapplicable for some >> reason, _explain why_. Don't just go back and forth saying "But I want >> it done like this" when all of us and conventional wisdom all say not >> to do it. > > He didn't reject it out of hand, he gave some reasons why he > rejected it. But as is SOP here, you chose not to see or pay > any attention to those reasons. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-02 Thread Joel Goldstick
ots? Sure. You want to write your code in Gaelic? No > problem (though personally, I prefer garlic to Gaelic). You want to > use "colour" instead of "color"? Also not a problem, and should be > easy enough for someone to understand who normally spells it the other > way. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: More or less code in python?

2015-03-15 Thread Joel Goldstick
t;Sum = ",out,"<BR>"); > > -- > https://mail.python.org/mailman/listinfo/python-list I'm guessing less, if your question is whether this code would be fewer lines in python. However, it would be nice if you formatted it so that it is readable, and gave a description

Re: Supply condition in function call

2015-03-25 Thread Joel Goldstick
; > -- > A hundred men did the rational thing. The sum of those rational choices was > called panic. Neal Stephenson -- System of the world > http://www.graune.org/GnuPG_pubkey.asc > Key fingerprint = 1E44 9CBD DEE4 9E07 5E0A 5828 5476 7E92 2DB4 3C99 > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Supply condition in function call

2015-03-25 Thread Joel Goldstick
On Wed, Mar 25, 2015 at 1:51 PM, Manuel Graune wrote: > Joel Goldstick writes: > >> On Wed, Mar 25, 2015 at 1:29 PM, Manuel Graune >> wrote: >>> >>> def test1(a, b, condition="True"): >>> for i,j in zip(a,b): >>>

Re: Supply condition in function call

2015-03-25 Thread Joel Goldstick
On Wed, Mar 25, 2015 at 2:22 PM, Ian Kelly wrote: > On Wed, Mar 25, 2015 at 12:17 PM, Joel Goldstick > wrote: >> Oh, now I see. Do you know about this: >> https://docs.python.org/2/library/ast.html#ast.literal_eval > > As the name suggests, that only evals literals. It

Re: test1

2015-03-26 Thread Joel Goldstick
It's a > joy to watch. > > > You talk as if I wanted you to want me. Pure delusion. I posted at nobody, > as I am free to do, and idiots come out of the woodwork as if I had committed > some infraction. > > And you even want to stab me. Sterling. Who raised you. wol

Re: Fwd: test1

2015-03-26 Thread Joel Goldstick
is reasonable, in an > eye-for-an-eye kind of way (though a bit childish). Hacking their site is > not. > > Besides, it would be a lot more work for you to do anything untoward with it > than it would be for him to just change it. > > > -- > https://mail.python.org/mailm

Re: test1

2015-03-26 Thread Joel Goldstick
On Thu, Mar 26, 2015 at 11:25 AM, Tiglath Suriol wrote: > On Thursday, March 26, 2015 at 9:53:48 AM UTC-4, Joel Goldstick wrote: >> Your first message was not python related. Your subsequent messages >> were rude. You've never been here before it seems. This is an >>

Re: Fwd: test1

2015-03-26 Thread Joel Goldstick
ome code and there was no email at hand, I use this > because it's a group I am familiar with, alt.test sounds like a better option. > > Thanks > > >> -- >> Bartc > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: seek operation in python

2015-04-29 Thread Joel Goldstick
tps://mail.python.org/mailman/listinfo/python-list What is in the file you are printing? -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Custom alphabetical sort

2015-05-02 Thread Joel Goldstick
x27;, 'î', 'Î', 'ì', >>> 'Ì', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'ñ', 'N', 'Ñ', 'o', 'O', >>> 'ö', 'Ö', 'ó', 'Ó', 'ô', 'Ô', 'ò', 'Ò', 'ø', 'Ø', 'p', 'P', 'q', 'Q', 'r', >>> 'R', 's', 'S', 't', 'T', 'u', 'U', 'ü', 'Ü', 'ú', 'Ú', 'û', 'Û', 'ù', 'Ù', >>> 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z') >>> >>> How can I do this? The default sorted() does not give the desired result. >>> >>> Thanks, >>> >>> Pander >> >> >> Meanwhile Python 3 supports locale aware sorting, see >> https://docs.python.org/3/howto/sorting.html >> > > You're aware that the message you're responding to is 16 months old? > > And answered pretty thoroughly, starting with the fact that the OP's desired > order didn't match any particular locale. > > > > -- > DaveA > -- > https://mail.python.org/mailman/listinfo/python-list Dave, he is the OP. Talking to himself? -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: l = range(int(1E9))

2015-05-02 Thread Joel Goldstick
>> I give up. > > > So do I, I think, if no-one is willing to admit that the original way of > implementing range() was a glaring mistake. > > > -- > Bartc > It doesn't matter for small ranges. Anyway it was fixed. > > > -- > https://mail.p

Re: Fastest way to remove the first x characters from a very long string

2015-05-16 Thread Joel Goldstick
ch line in a string faster? > slicing might be faster than searching for : Do you need to do this all at once? If not, use a generator > Thanks, > Bruce > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Rule of order for dot operators?

2015-05-16 Thread Joel Goldstick
tinfo/python-list >From left to right. So in your first example it replaces - with space, then capitalizes each word. In your second example, it does the caps first, then gets rid of the dashes -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract email address from Java script in html source using python

2015-05-23 Thread Joel Goldstick
On Sat, May 23, 2015 at 10:15 AM, savitha devi wrote: > What I exactly want is the java script is in the html code. I am trying for > a regular expression to find the email address embedded with in the java > script. > > On Sat, May 23, 2015 at 2:31 PM, Chris Angelico wrote: >> >> On Sat, May 23,

Re: What is considered an "advanced" topic in Python?

2015-05-29 Thread Joel Goldstick
or "advanced". I realize we're all growing in our abilities > with the language, so this is going to be very subjective, but I am still > curious what my fellow Python developers think about this topic. > > Thanks, > Mike > -- > https://mail.python.org/mailman/l

Re: Python write to spreadsheet?

2015-05-30 Thread Joel Goldstick
om Python or vice versa. xlwings (not sure?) > > TJG > -- > https://mail.python.org/mailman/listinfo/python-list This looks promising: http://www.dev-explorer.com/articles/excel-spreadsheets-and-python -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Parser needed.

2015-06-01 Thread Joel Goldstick
> > > Bye, > Skybuck. > -- > https://mail.python.org/mailman/listinfo/python-list This is kind of a q and a mailing list. I'm baffled by all of your posts, that seem to be a conversation with yourself. Do you have a question you need help with? -- Joel Goldstick http://j

Re: How to access the low digits of a list

2015-06-02 Thread Joel Goldstick
7;1' > lines[3][1] is '5' > lines[3][2] is '6' > > > I don't know whether there is a way to know the length of lines[3]. Then, I > can use a -1 step to get the last two digits. Or, you may have much better > ways to do that. Python is really to

Re: Can Python function return multiple data?

2015-06-02 Thread Joel Goldstick
gt; Thanks, > -- > https://mail.python.org/mailman/listinfo/python-list Yes! def my_function(n): return n, n*2 a_number, its_double = my_function(3) a_number will be 3, its_double will be 6 -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between list() and list?

2015-06-02 Thread Joel Goldstick
ion a new name -- 'xx' when you invoke the function: xx() or list() it returns a list > > Thanks, > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Want to readout the control file of aria2.

2015-06-09 Thread Joel Goldstick
thon-list I found this: http://aria.pasteur.fr/developers/aria-python-api Does that help? -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Want to readout the control file of aria2.

2015-06-09 Thread Joel Goldstick
On Tue, Jun 9, 2015 at 7:19 PM, Hongyi Zhao wrote: > On Tue, 09 Jun 2015 18:52:00 -0400, Joel Goldstick wrote: > >> I found this: http://aria.pasteur.fr/developers/aria-python-api >> >> Does that help? > > The aria mentioned by your above links is completely differen

Re: How to find number of whole weeks between dates?

2015-06-10 Thread Joel Goldstick
number_of_complete _weeks -= 1 weekday returns 0 for monday, so 5 for Saturday -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Parser needed.

2015-06-11 Thread Joel Goldstick
quite easy... > > But at the start /always it seemed so difficult... > > So any little bits of help/advice/information can help ! :) > > > Bye, > Skybuck. > -- > https://mail.python.org/mailman/listinfo/python-list but you aren't asking questions. You a

Re: Good python news sites

2015-07-09 Thread Joel Goldstick
/listinfo/python-list I like the weekly email newsletter you can get from pycoders.com -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Need assistance

2015-07-18 Thread Joel Goldstick
and was faster. But it didn't say HP on the front! > I have an hp35. But to be 'really' cool you have to have an hp35 that just says hp. Those were the very first ones -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter?

2015-07-28 Thread Joel Goldstick
whitespace, then split on whitespace. Python lets you declare anything > you like, same as mathematics does :) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I'm a newbie and I'm stumped...

2015-08-01 Thread Joel Goldstick
File "", line 1, in > > NameError: name 'serendipity' is not defined > > The error you are getting is the error you would get if you were using python 2.x. So, are you sure you are running 3.4? Can you go to a shell and run it from command line? also, us

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Joel Goldstick
ond list is in the double list seems to prove they are the same -- one is just rotated to a different starting point. I don't understand the term 'canonical' in this example, but what is it that the solution given doesn't provide for you? -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: how to determine for using c extension or not ?

2015-08-03 Thread Joel Goldstick
> My check is correct ? right ? > or you have more good idea ? > -- > https://mail.python.org/mailman/listinfo/python-list I don't know the answer to your question, but repeating it will not help you get an answer more quickly. This is a voluntary mailing list. If som

Re: how to determine for using c extension or not ?

2015-08-03 Thread Joel Goldstick
t;> >> Correct. >> >> Also, you can do this: >> >> >> py> import bisect >> py> bisect.__file__ >> '/usr/local/lib/python2.7/bisect.pyc' >> py> bisect.bisect.__module__ # Where does the bisect file come from? >> '_bisect' >> py> import _bisect >> py> _bisect.__file__ >> '/usr/local/lib/python2.7/lib-dynload/_bisect.so' >> >> So you can see that _bisect is a .so file (on Linux; on Windows it will be >> a .dll file), which means written in C. >> >> > > -- > https://mail.python.org/mailman/listinfo/python-list Welcome to the mailing list, and as I see above, you got a good answer. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Joel Goldstick
post. > What were the other two strikes? > > -- > https://mail.python.org/mailman/listinfo/python-list I count 2, but the second is the repeat of the first. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-06 Thread Joel Goldstick
ing > to the third. And I'm just as in the dark about what he wants to know. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list My money is on a bot. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Flan definition collision

2015-08-11 Thread Joel Goldstick
there any way > which doesn't involve modifying the flag names in these modules? Please show relevant code. import a import b will not cause a collision as a variable called v would be identified as a.v or b.v depending on where it is defined -- Joel Goldstick http://

Re: Can I download XML data from the web and save, in as CSV or TXT delimitation?

2015-08-19 Thread Joel Goldstick
simpler) 2. There are several xml parsers. I haven't experienced them, so google is your friend 3. python has csv reader and writer modules -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Joel Goldstick
tax before. Is it documented. > Is there a name for that ? > > thx > -- > https://mail.python.org/mailman/listinfo/python-list its called list unpacking or packing (?) the right side is considered a tuple because of the commas >>> a = 1,2,3 >>> a (1, 2, 3) >>&

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Joel Goldstick
On Tue, Aug 25, 2015 at 10:32 AM, Cody Piersall wrote: > > > On Tue, Aug 25, 2015 at 9:16 AM, ast wrote: > > [a,b,c,d] = 1,2,3,4 > a >> >> 1 > > b >> >> 2 > > c >> >> 3 > > d >> >> 4 >> >> I have never seen this syntax before. Is it documented. >> Is there a na

Re: php to python code converter

2015-08-27 Thread Joel Goldstick
\x85\x12\x12\x12\x12GF\x12\x12')) > p.stdin.close() > exit(p.wait()) > > I believe this will do what you require. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list Chris, I think you are missing a left paren -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: php to python code converter

2015-08-27 Thread Joel Goldstick
A quick google search led me here: http://www.diveintopython.net/soap_web_services/index.html That may help you out. -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Porting Python Application to a new linux machine

2015-09-03 Thread Joel Goldstick
, > > -- > https://mail.python.org/mailman/listinfo/python-list Look into virtualenv or virtualenvwrapper. It will let you load a local python engine along with local copies of the modules you need to run your application. Pip is the weapon of choice to load the librarie

Re: Permission denied error in download nltk_data...

2015-09-04 Thread Joel Goldstick
question? Is your program logged in as a different user? -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: windows 10

2015-09-19 Thread Joel Goldstick
Windows 10 > Did you try googling "windows 10 command line"? I did and found lots of > links. > -- > https://mail.python.org/mailman/listinfo/python-list > > -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting PyCharm to import sklearn

2015-09-21 Thread Joel Goldstick
; > Does anyone know how to solve this problem? > -- > https://mail.python.org/mailman/listinfo/python-list > It looks like they changed the name. Maybe this link will help you: http://scikit-learn.org/stable/install.html -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-24 Thread Joel Goldstick
o,' kilometers converts to ',miles,' miles') > > main() > When you define a function, the names between the parentheses are called parameters. When you call the function, they are called arguments. They need to match. When you return a value from a function, you

Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
32\lib\shutil.py", line 247, in rmtree > rmtree(fullname, ignore_errors, onerror) > File "C:\Python27-32\lib\shutil.py", line 252, in rmtree > onerror(os.remove, fullname, sys.exc_info()) > File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line

Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
On Sat, Sep 26, 2015 at 2:52 PM, Joel Goldstick wrote: > sudo pip ... etc > > On Sat, Sep 26, 2015 at 2:13 PM, wrote: > >> After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip >> using pip fails. Am I doing this incorrectly? Any suggestions? >>

Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
On Sat, Sep 26, 2015 at 6:24 PM, wrote: > Joel, no need for elevated (Administrator) execution. I did need to > follow Zachary's suggestion and it worked well. > Good result. I'm not up on windows for many years -- Joel Goldstick http://joelgoldstick.com -- https://mail

Re: Django Tutorial (Database setup) Question

2015-09-27 Thread Joel Goldstick
o solve this issue? > > Thanks a lot ! > > You need to be in the directory that contains manage.py > Gengyang > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Error code 0x80070570

2015-09-30 Thread Joel Goldstick
egards, > > > > > > > > Rusiri D. Jayalath > > -- > https://mail.python.org/mailman/listinfo/python-list > > Microsoft seems to think its a disk problem, or a cd problem: http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_install/gets-the-error-code-0x8

<    1   2   3   4   5   6   7   8   >