Re: [Tutor] Tutor Digest, Vol 100, Issue 58

2012-06-26 Thread Emile van Sebille
On 6/26/2012 1:10 AM Alan Gauld said... On 26/06/12 02:22, Steven D'Aprano wrote: I think you've messed up your quoting. It was Mike Nickey, not Emile, who suggested using w[0] == 'x'. Yes, but Emile's comment was in context of Mike's assertion about w[0]. Ho

Re: [Tutor] .get dicionary question (mutability??)

2012-06-29 Thread Emile van Sebille
I've found that mutable types tend to change in place and return None while immutable types tend to return the altered result, which is as you describe below. Emile Somehow it makes more sense to me when writing + as __add__ a[k] = a.get(k, 0).__add__(1) b[k] = b.get(k, []]).__add__(

Re: [Tutor] sitecustomize

2012-07-02 Thread Emile van Sebille
x27;spyder sitecustomize' you'll get lots of hits and references. I'd start there -- it certainly doesn't seem to be a learning python issue. Emile while, I'm not importing and have no idea what is importing it, this happens even if my code is as simple as followin

Re: [Tutor] how contact the administrator of PythonTutor?

2012-07-03 Thread Emile van Sebille
On 7/3/2012 12:43 PM Tamar Osher said... How do I contact the administrator of PythonTutor? One should respond shortly. Most admin related tasks can be self administered at http://mail.python.org/mailman/listlinfo/tutor/ Emile ___ Tutor maillist

Re: [Tutor] VPYTHON

2012-07-04 Thread Emile van Sebille
esides when installing I had problem in which the installer would not recognise the location of python, even though it is located at C:\Python32. What should I be doing? Sign up for their mailing list at https://lists.sourceforge.net/lists/listinfo/visualpython-users and ask them.

Re: [Tutor] Passing numeral result of a defined function to a named value

2012-07-04 Thread Emile van Sebille
_Level = XP_Per_Level_Calc(XP_Per_Level_Base, XP_Per_Level_Limit) gets it going, dut all in all it looks to me like this is simply a max function and could be written more simply as: max(XP_Per_Level_Base,XP_Per_Level_Limit) Emile XP_Per_Level_Base = 20-int_mod XP_Per

Re: [Tutor] for loop question

2012-07-04 Thread Emile van Sebille
so much, Jim You're not returning anything from fixCase -- change the final print to return and try it again. Emile #Main function. def main(): mySentence = (input("Enter text.")) mySentenceList = mySentence.split('.') #Call fixCase function. S

Re: [Tutor] While loops

2012-07-07 Thread Emile van Sebille
osting. What I see here has the indentation stripped out of your script so that before I can even test your code I'll have to guess at how you have it indented, and I'm more likely than you to get it right and may inadvertently fix your bug and never know it even before getting a chanc

Re: [Tutor] get columns from txt file

2012-07-12 Thread Emile van Sebille
hiscol) # store this cols results output = zip(cols) # zip transposes the cols to rows HTH, Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] writing function changeColor

2012-07-18 Thread Emile van Sebille
to end up with something that could look like: def change_color_to(new_color): color_of_thing = new_color def modify_color_of_thing(by_n_pct): color_of_thing = old_color_of_thing * by_n_pct where the docs of the thing you're changing provide the names and handling of modifying the color.

Re: [Tutor] writing function changeColor

2012-07-18 Thread Emile van Sebille
On 7/18/2012 12:07 PM Aditi Pai said... Hey Emile! Thanks for the advice. I think maybe I should have combined the two parts of my email. The function is just called changeColor. I don't actually want to change the color as much as alter the color. I'm not sure there's a diff

Re: [Tutor] check against multiple variables

2012-07-19 Thread Emile van Sebille
ainst each singular hash value, as there will be many; I need a way to check it against all hash values at once (if possible.) so keeping the hash values in a dict would allow you to test as follows: if new_hash_value in dict_of_hash_values: # and bob's your uncle. Emile Sorry for th

[Tutor] re 33.116

2012-07-19 Thread Emile van Sebille
.gz.3.gz.1.gz.1.gz.2.gz.1.gz.1.gz.3.gz list_boxes.day.1.gz.1.gz.1.gz.3.gz.1.gz.1.gz.2.gz.1.gz.1.gz.3.gz.1.gz in both the day and night variant. I erased them all as / was at 100% used. It's now at 89% with ~400Mb free. Emile ___ Tutor mai

Re: [Tutor] re 33.116

2012-07-19 Thread Emile van Sebille
On 7/19/2012 4:10 PM Emile van Sebille said... I found ~200k files in /var/log all but 227 look like: Sorry -- my bad. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman

Re: [Tutor] Calling a function does not return what I want it to return

2012-07-19 Thread Emile van Sebille
_diag(num_sides) (for pythons < v3) or print (num_diag(num_sides)) (for python v3 >) Then see where that takes you. Emile Any suggestions as to what is going on? When I run it, it prompts me for the number of sides, and that's it. Thanks. __

Re: [Tutor] Counting the consistent rankings

2012-07-23 Thread Emile van Sebille
On 7/23/2012 2:11 PM Ali Torkamani said... Hi All, I want to count how many (what percentage) of partial orders are identical in two lists. You may find SequenceMatcher from module difflib helpful. See http://docs.python.org/library/difflib.html for info. Emile (For example let L1

Re: [Tutor] Topic #2 of Tutor Digest

2012-07-28 Thread Emile van Sebille
.catb.org/~esr/faqs/smart-questions.html#forum in particular, but the entire article should be committed to memory. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help please!

2012-07-30 Thread Emile van Sebille
me to the type of conclusions you reach below. Emile I understand that line_count counts the number of lines in the Python prog, and that we are creating a function, and that 'f' stands for file etc, but I can't get my head around what the function does. Many thanks in advan

Re: [Tutor] Unzip a zipfile, then unzip the zipfiles within the original zip

2012-08-08 Thread Emile van Sebille
On 8/8/2012 8:34 AM Ramchandra Apte said... Sorry. This is my first time using a mailing list! Any idea how to send a message without replying? ___ Address an email to Tutor@python.org Tutor maillist - Tutor@python.org Emile To unsubscribe

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Emile van Sebille
On 8/20/2012 10:42 PM Ray Jones said... Nothing happens. >plugh!< :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] 2.7.3 'CalledProcessError' error....why?

2012-08-24 Thread Emile van Sebille
py", line 85, in do_ip ping_ip(ip) File "./testing.py", line 44, in ping_ip except CalledProcessError: Try it as: except subprocess.CalledProcessError, e print e.output HTH, Emile NameError: global name 'CalledProcessError' is not def

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Emile van Sebille
result. The first line points to the executable python that installed pytz. On my local system this looks like: head -1 `which easy_install` #! /usr/bin/python copy and paste in the result, then import pytz from there and paste in the results if it doesn't work.

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Emile van Sebille
On 8/28/2012 1:48 PM Ray Jones said... On 08/28/2012 01:35 PM, Emile van Sebille wrote: You installed this with easy_install, so the version of python therein referenced is the same one that now should have access to it. Try : which easy_install then cat the result. The first line points

Re: [Tutor] python wifi

2012-09-06 Thread Emile van Sebille
the "[sudo ]easy_install python_wifi" variants. IIRC, the py2.5 in the egg name indicated compatibility for python .25 and you've said you've got 2.7 installed so let'd first try to let it pick the compatible version and see what we get. Emile ___

Re: [Tutor] simon says

2012-09-10 Thread Emile van Sebille
http://en.wikipedia.org/wiki/Simon_%28game%29 Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python in Vertica

2012-09-10 Thread Emile van Sebille
... it does not work. ... and include the traceback so that we see both your input and the error that's output. Emile I have no idea how to have data value simply be 4 ! cursor.execute("SELECT COUNT(*) from cv_gls_wkly_misc") result = cursor.fetchone() number_of_rows =

Re: [Tutor] How to send email from a gmail a/c using smtp when port 587(smtp) is blocked

2012-09-11 Thread Emile van Sebille
mail subject' server.sendmail(fromaddr, toaddrs, msg.as_string()) ] The code above works perfectly fine on my local machine, but fails on the production server at the university where i work( all ports other than port 80 are blocked) :( Good -- the university is taking st

Re: [Tutor] How to send email from a gmail a/c using smtp when port 587(smtp) is blocked

2012-09-11 Thread Emile van Sebille
On 9/11/2012 2:44 PM ashish makani said... Emile, Please don't presume people's intentions (that we are sending spam) & judge people without knowing anything about them. I made no such presumption -- I appluad the university for taking appropriate actions to reduce the

Re: [Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Emile van Sebille
On 9/14/2012 1:43 AM Ray Jones said... The code: source = source.remove('') return source To round things out, here's one way to do what I expect you're expecting: >>> r=range(10) >>> a = r.pop(r.index(4)) >>>

Re: [Tutor] How to run this block of code dozens of times

2012-09-17 Thread Emile van Sebille
v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def test(): return True ... >>> _ Traceback (most recent call last): File "", line 1, in NameError: name '_&#x

Re: [Tutor] Tutor Digest, Vol 103, Issue 82

2012-09-17 Thread Emile van Sebille
', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

Re: [Tutor] Populating a list with object to be called by a class

2012-09-20 Thread Emile van Sebille
od"), ...] I couldn't figure out how to populate the list from a user input. Say if the user wanted 50 Red and 50 Yellow ants. So it's hardcoded at 500 which is not an elegant solution. So, say the desired COUNT is 50, you could do: ants = zip( [ Ant("Red_%s&quo

Re: [Tutor] How can I convert a variable name to a string?

2012-09-21 Thread Emile van Sebille
27; then yuo can use something like: locals()["testVariable"] Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 103, Issue 124

2012-09-25 Thread Emile van Sebille
ut, save yourself some headache and use the ActiveState distribution. See http://www.activestate.com/activepython/downloads Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/

Re: [Tutor] Python for Absolute Beginners

2012-09-28 Thread Emile van Sebille
to see if the author has provided contact info. HTH. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT: Netiquette

2012-10-01 Thread Emile van Sebille
On 9/30/2012 6:16 PM, Dwight Hutto wrote: But he started it. Now be the man and end it. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] need an explanation

2012-10-11 Thread Emile van Sebille
riting to a file but why does it use the same argument twice? the first is passed into the instance's _full_filename method and the result of that becomes the first argument passed into file.write, and the second is passed in the file.write as the second argument. HTH Emile the for l

Re: [Tutor] Using the set.difference method with an unknown number of input iterables

2012-10-18 Thread Emile van Sebille
I try, but they just tell > me that there is something that I'm missing here. > > Thanks > > #Code below > a = set([1,2,3,4]) > b = set([2,3,4,5]) > c = set([3,4,5,6]) > d = set([4,5,6,7]) > > not_a = [b,c,d] > a.difference(not_a) Try this as a.difference(*no

Re: [Tutor] name conventions

2012-10-22 Thread Emile van Sebille
official word is pep 8 -- http://www.python.org/dev/peps/pep-0008/ Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] newb help reading lines from csv

2012-10-22 Thread Emile van Sebille
the second for loop not execute at all? The first one prints the rows of the file just fine. The first pass also exhausts the input feed -- you'll need to rewind or reposition the next line pointer to the start of the file and I suspect the easiest way is to

Re: [Tutor] Question

2012-10-28 Thread Emile van Sebille
to me that the v3.x compatible wxpython is being rebranded as Project Phoenix -- see http://wiki.wxpython.org/ProjectPhoenix Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/lis

Re: [Tutor] Python Pipes

2012-10-29 Thread Emile van Sebille
On 10/29/2012 3:33 AM, Ganesh Manal wrote: Please give me sample python program that works with python31 Start with the tutorial at http://docs.python.org/3/tutorial/index.html It'll step you through lots of sample python scripts. Emile ___

Re: [Tutor] pointer puzzlement

2015-05-07 Thread Emile van Sebille
gt;>> id(20) 7515584L >>> id(10+10) 7515584L >>> id(19+1) 7515584L Compare to: def testid(K=100): K += 10 return 'the ID is', id(K), K Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Emile van Sebille
On 5/21/2015 9:28 AM, Albert-Jan Roskam via Tutor wrote: I just created an alias for this: alias hidepycs="ls *.py[co] > .hidden" Close -- try alias ls='ls --hide=*.py[co]' and when you want to see them use ls -a. Emile ___

Re: [Tutor] FW: query

2015-06-23 Thread Emile van Sebille
You're more likely to get an appropriate response if you review http://catb.org/~esr/faqs/smart-questions.html and then ask. Emile On 6/23/2015 10:13 AM, Gupta, Manaswini Kat wrote: From: Gupta, Manaswini Kat Sent: Tuesday, June 23, 2015 10:42 PM To: 'tutor-ow...@python.org&#x

Re: [Tutor] FW: query

2015-06-24 Thread Emile van Sebille
number=int(input("Enter the number which u want to check for odd and even :")) You're probably seeing the error here, which is outside your try/except block, hence the except not working as you expect. try : Emile ___ Tut

Re: [Tutor] Identifying V3 examples

2015-07-23 Thread Emile van Sebille
ut and paste into the interpreter. eg ---8<---8<---8<---8<---8<---8<--- import sys for ii in sys.path: print ii ---8<---8<---8<---8<---8<---8<--- YMMV, Emile ___ Tutor maillist - Tutor@python.or

Re: [Tutor] Basic question about docstrings

2015-07-29 Thread Emile van Sebille
of showing those docstrings at the Python prompt? Are you asking about help? as in: >>> help(get_value) Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] 'open' is not defined

2015-07-30 Thread Emile van Sebille
27; >>> count = 0 >>> for line in fh: Please paste in the contents from your screen where the error appears. Note that in my example the open line complains about fname not existing so I'm getting and IOError, and if the issue were with open, as per the example with xxope

Re: [Tutor] String Attribute

2015-07-31 Thread Emile van Sebille
.split() > 9 line4 = line3[1] 10 addresses.add(line4) 11 count = count + 1 IndexError: list index out of range Because line3 is not sub-scriptable. Have you examined what line3 holds when the error occurs? Em

Re: [Tutor] String Attribute

2015-08-01 Thread Emile van Sebille
27;re parsing it'll help us identify what the program will need to be prepared to handle. Emile On 7/31/2015 5:26 PM, Ltc Hotspot wrote: Hi Mark, Desired output on execution of the script: stephen.marqu...@uct.ac.za lo...@media.berkeley.edu zq...@umich.edu rjl...@iupui.edu zq...@umi

Re: [Tutor] a puzzle about -3**2 vs (-3)**2

2015-08-01 Thread Emile van Sebille
umans reading the code that need to change it. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] String Attribute

2015-08-01 Thread Emile van Sebille
du gsil...@umich.edu wagne...@iupui.edu zq...@umich.edu antra...@caret.cam.ac.uk gopal.ramasammyc...@gmail.com david.horw...@uct.ac.za david.horw...@uct.ac.za stephen.marqu...@uct.ac.za lo...@media.berkeley.edu lo...@media.berkeley.edu r...@media.berkeley.edu c...@iupui.edu c...@iupui.edu c...@iu

Re: [Tutor] email validation

2015-08-01 Thread Emile van Sebille
I am guessing it has to do with my syntax? any suggestions, please? Python executes as it processes the file, so that open_existing_file must have been previously defined before you can refer to it. Try moving that def block in front of main and you'll likely be OK (assuming no other issues) Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] String Attribute

2015-08-01 Thread Emile van Sebille
utput? Because there are 54 lines that start with 'From'. As I noted in looking at your source data, for each email there's a 'From ' and a 'From:' -- you'd get the right answer checking only for startswith('From ') Emile Here is the latest

Re: [Tutor] String Attribute

2015-08-01 Thread Emile van Sebille
On 8/1/2015 4:21 PM, Ltc Hotspot wrote: Hi Emile, Question: What is the source of the line 7 syntax: mbox.split? I read mbox from the file. eg, mbox = open("mbox-short.txt",'r').read() and it looks to me that if you insert the above in front of the for loop belo

Re: [Tutor] scratching my head

2015-08-04 Thread Emile van Sebille
e "give a man a fish" approach to help; a magic black box to do the job for him. Sometimes a fish of three or four lines that replaces a 20 line effort might be better considered as a solution to be teased apart and understood. Emile ___

Re: [Tutor] Schechter Function in python

2015-08-04 Thread Emile van Sebille
: how would you write the following as a python function using valid python mathematical expressions: Your post ends prematurely without the example to be coded, but a google search for "Schecter function in python" yields a variety of hits. Have you checked

Re: [Tutor] Dictionary Issue

2015-08-07 Thread Emile van Sebille
tals of python in a time tested way. See https://docs.python.org/2/tutorial/ for python2 or https://docs.python.org/3/tutorial/ for python3. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.pyt

Re: [Tutor] DEALING WITH API

2015-08-07 Thread Emile van Sebille
which includes all the updates that have taken place on the website in the last 24 hours. I'd normally use wget to retrieve tgz files and not a browser. Emile So, when I use urlopen on the same url, & I try to read it, all I get is gibberish. Any help, please ? If I am unable to solv

Re: [Tutor] Help

2015-08-10 Thread Emile van Sebille
On 8/10/2015 10:07 AM, Alan Gauld wrote: PS. What is SDSU? San Diego State University I'd guess. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] revisiting a puzzle about -3**2 vs (-3)**2

2015-08-12 Thread Emile van Sebille
valuation as a number. Consider this: def sq1(x): sgn = int(x<0) return sgn*abs(x)**2 That's effectively what the parser does. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] SQLite, Python and SQL injection attacks

2015-08-14 Thread Emile van Sebille
ldn’t assemble your query using Python’s string operations because doing so is insecure; it makes your program vulnerable to an SQL injection attack ..." See http://bobby-tables.com/ for more info. Emile ___ Tutor maillist - Tutor@python.org To unsu

Re: [Tutor] variable existence q

2015-08-15 Thread Emile van Sebille
#x27;... As Peter noted, somewhere within override_defaults there's an assignment to it. Changing to def override_defaults(top_directory=top_directory): should initialize it in case the assignment path isn't processed. Emile ___ Tut

Re: [Tutor] variable existence q

2015-08-15 Thread Emile van Sebille
the global. Not any more -- it's a local variable because the assignment, while not executed, exists. If that is changed inside the function, doesn't it change the global? Only if you include the globals statement before the variable is referenced. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] About using list in a function

2015-08-19 Thread Emile van Sebille
internal server where we have only approved compatible sources/packages. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] problem with code

2015-08-20 Thread Emile van Sebille
quot;that seems reasonable")) if time<=2 else print ("get a life") Check your parens -- they're mismatched. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Invalid Syntax Message

2015-09-14 Thread Emile van Sebille
ectly. How do I fix this problem so the programs are able to run on my Mac. Start by providing a complete copy-n-paste of the screen when the error occurs. That normally provides enough detail to diagnose the issue. Emile ___ Tutor maillist - Tuto

Re: [Tutor] Creating a match file

2015-09-21 Thread Emile van Sebille
, get that data and write all 12 fields to a new dictionary. When done, write the results to the output file. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Updating index of a list

2015-10-08 Thread Emile van Sebille
; 1', ' 95'], ['5', ' jorgen', ' 1', ' 99’]] (it continues) from a text file. However, what I am trying to do take the indexes of thelist[0][1] which has a value of 'james' (being index 1 of list 0) and theist[0][3] which has

Re: [Tutor] Can one use python to concatenate n media files?

2015-10-12 Thread Emile van Sebille
On 10/11/2015 9:15 PM, Fast Primes wrote: If so, could someone present an example? target = open(target,'wb') for source in mediafilelist: target.write(open(source,'rb').read()) But you probably want something diff

Re: [Tutor] 0 > "0" --> is there a "from __future__ import to make this raise a TypeError?

2015-10-12 Thread Emile van Sebille
ou're looking for. See http://www.rafekettler.com/magicmethods.html#comparisons for more info. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] File operation query

2015-10-15 Thread Emile van Sebille
script, it is always empty - it does not display the user input provided. May I know why? ## input1 = raw_input("Input1:") file = open("check.txt", "r+") file.write(input1 + "\n") t

Re: [Tutor] File operation query

2015-10-15 Thread Emile van Sebille
) Also, the line below continues from the last insertion -- you'll also need to reposition the file pointer or re-open the file. Emile for line in file: print line print file.close() ## Regards, RD. ___

Re: [Tutor] Working collaboratively

2015-10-19 Thread Emile van Sebille
entified issues: https://bitbucket.org/pypa/pypi/issues Browse through and see if anything looks interesting/doable. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Working collaboratively

2015-10-19 Thread Emile van Sebille
On 10/19/2015 3:04 PM, Alex Kleider wrote: On 2015-10-19 13:08, Emile van Sebille wrote: This looks like the list of identified issues: https://bitbucket.org/pypa/pypi/issues Browse through and see if anything looks interesting/doable. On 2015-10-19 13:34, Mark Lawrence wrote: How

Re: [Tutor] how to invert tuples, one problem more

2015-11-30 Thread Emile van Sebille
On 11/27/2015 12:50 PM, marcus lütolf wrote: dear pythonistas, thanks for your very valuable help. I am struggling with a simple piece of code: x = Marcus print '{0} {1} x'.format('a', '=') You're almost there - print '{0} {1} {2}'.format

Re: [Tutor] No connection could be made because the target machine actively refused it (despite mongod running) and unable to insert data into MongoDB

2016-01-22 Thread Emile van Sebille
is not properly configured to allow mongod traffic into it. Talk to the machines firewall administrator. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Convert structured 1D array to 2D array

2016-02-27 Thread Emile van Sebille
inner tuples to lists -- tuples = [(1,2,3),('a','b','c'),('12/12/2009','2/4/2014','3/4/200')] lists =map(list,tuples) Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] copy files selectively from source to destination

2016-12-05 Thread Emile van Sebille
this selective copying? You could test f as you loop over the files to ensure it ends '.txt'. Emile Thanks in advance for the hints. Best, Kumar. # -*- coding: utf-8 -*- """ Created on Wed Jun 01 17:05:07 2016 @author: anatta """ import os imp

Re: [Tutor] Convert tuple within tuple into single tuple

2017-01-11 Thread Emile van Sebille
quot;credits" or "license" for more information. >>> import itertools >>> a = list(itertools.chain((1,2,3),(4,5))) >>> a [1, 2, 3, 4, 5] Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] does anyone know a good module for automation

2013-04-29 Thread Emile van Sebille
I recently automated a scheduled task to retrieve content from an https site that uses javascript for site interaction using iMacros, ahk and the related firefox extension. Not a python solution, but it got the job done. Emile On 4/26/2013 8:28 AM, Frank Schiro wrote: Pywinauto is not

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-26 Thread Emile van Sebille
dn't write esr and Rick Moen to request changes -- I expect you'd be pointed to http://www.catb.org/esr/faqs/smart-questions.html#disclaimer if you got a reply at all. Emile On 8/26/2013 12:41 PM, bob gailer wrote: Hi fellow tutors and helpers. I have a reaction to http://www.cat

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-26 Thread Emile van Sebille
perhaps pointing to http://www.catb.org/esr/faqs/smart-questions.html#intro is a better answer? Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT: Coffeescript and Python

2013-09-06 Thread Emile van Sebille
On 9/6/2013 3:47 AM, Alan Gauld wrote: This is somewhat off topic so replies offlist may be appropriate. I can fix that. :) Are you familiar with pyjs, which provides python to javascript capabilities? (see http://pyjs.org/) Is there any reason to prefer one over the other? Emile I&#x

Re: [Tutor] Getting daily averages with pandas

2013-10-13 Thread Emile van Sebille
Hi Boris, Read up on the trig functions in the math module. http://docs.python.org/2/library/math.html#trigonometric-functions Emile On 10/11/2013 6:18 PM, Boris Vladimir Comi wrote: Boris Vladimir Comi escrito: I found a way to create daily averages of many variables, for example of a

Re: [Tutor] python, xml, mongodb

2013-10-27 Thread Emile van Sebille
k to fully integrate and test each additional data source. Hope this helps, Emile On 10/24/2013 1:44 PM, Ismar Sehic wrote:> hello, me again - the guy with a (mis)fortune of having to deal with a > lot of company's in and outgoing xml.I guess they just like xml as a > data

Re: [Tutor] Positional Arguments

2013-11-01 Thread Emile van Sebille
#x27;payrate' so the proper way to call the function would be: calcandprint (86, 11.50) which would (presumably) calculate and print the result of having worked 86 hours at a payrate of 11.50/hr But-I-didn't-read-all-your-code-ly y'rs, Emile On 11/1/2013 11:43 AM, Jenny Allar wr

Re: [Tutor] recursion depth

2014-01-08 Thread Emile van Sebille
the adding part, and the palindrome checking part), but apparently I can't help but blow up my machine... Without seeing your code it's hard to be specific, but it's obvious you'll need to rethink your approach. :) Emile ___ Tutor

Re: [Tutor] Python & Django

2014-01-09 Thread Emile van Sebille
party module that the django users are having problems with. YMMV, Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] another better way to do this ?

2014-01-12 Thread Emile van Sebille
ii not in b: a=a.replace(ii,"") return b in a Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] another better way to do this ?

2014-01-12 Thread Emile van Sebille
b: a=a.replace(ii,"") while ii+ii in a: a=a.replace(ii+ii,ii) return b in a Show me another. :) Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how run it on python 3

2014-01-20 Thread Emile van Sebille
expressions, but always include the full traceback as that tells us where to start looking for the issue. Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how run it on python 3

2014-01-20 Thread Emile van Sebille
posts won't be quite so diluted... Emile In which case, I can only suggest: please read and respond to what other people are asking you. Otherwise, it defeats the purpose of asking a question: that is, to communicate. ___ Tutor maillist -

Re: [Tutor] Regular expression - I

2014-02-18 Thread Emile van Sebille
On 2/18/2014 11:42 AM, Mark Lawrence wrote: On 18/02/2014 18:03, Steve Willoughby wrote: Because the regular expression means “match an angle-bracket Please do not top post on this list. Appropriate trimming is also appreciated. Emile

Re: [Tutor] reg: How to import dll in python

2014-03-05 Thread Emile van Sebille
Hi Shweta, You'll likely get a better response posting this question on the main python list -- the Tutor list is primarily for teaching python Emile On 3/5/2014 4:49 AM, Shweta Kaushik wrote: Hi, Please find code used to create dll: *_add_1.cpp_* #include "add_1.h" usin

Re: [Tutor] How to determine which function code is being called from

2014-03-06 Thread Emile van Sebille
While there are ways of getting at the caller using introspection, there are no reliable ways of doing so and you would do well to rethink the need and take an alternate course such as passing a parameter in. Suppose the following: funcC=funcB what would you want to see? Emile On 3/6/2014

Re: [Tutor] PLEASE remove me from your e-mailing list

2014-03-20 Thread Emile van Sebille
We can't take you off the list -- see the line below that says: To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor Emile On 3/20/2014 3:43 PM, Art Caton wrote: artca...@gmail.com no longer requests your "Tutor Request&q

Re: [Tutor] Understanding code line

2014-03-27 Thread Emile van Sebille
On 3/21/2014 3:40 PM, Steven D'Aprano wrote: a = b This assigns the value to b. So if b was 4, now a is also 4. Steven means 'assigns the value to a' here. For anyone looking down the line... ___ Tutor maillist - Tutor@python.org To uns

Re: [Tutor] Keeping change-in-place vs. copy methods straight

2014-04-28 Thread Emile van Sebille
n reverse: reverse(...) L.reverse() -- reverse *IN PLACE* >>> The *IN PLACE* tells me. HTH, Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

<    1   2   3   4   5   6   >