Search Discussions

172 discussions - 1,231 posts

  • Greetings, I am new to Python. I am sorry for beating what is probably a dead horse but I checked the net and couldn't find the answer to my question. I like a lot of what I've seen in Python, ...
    Blake McBrideBlake McBride
    Apr 16, 2015 at 4:07 am
    Apr 25, 2015 at 5:42 pm
  • I want todo faster baseconversion for very big bases like base 1 000 000, so instead of adding up digits i search it. I need the fastest algorithm to find the relation to a decimal number. Digmult is ...
    Jonas ThornvallJonas Thornvall
    Apr 7, 2015 at 9:44 am
    Apr 25, 2015 at 2:49 pm
  • If I execute: l = range(int(1E9) The python process gobbles up all the memory and is killed. The problem is that after this my swap is completely used, because other processes have swapped to it ...
    Cecil WesterhofCecil Westerhof
    Apr 30, 2015 at 4:06 pm
    May 3, 2015 at 6:36 pm
  • def m_and_m(dividend): rlist = [] dm = divmod end = (dividend // 2) + 1 for divisor in range(1, end): q, r = dm(dividend, divisor) if r is 0: rlist.append((divisor, q)) return rlist ...
    Apr 10, 2015 at 11:37 pm
    Apr 16, 2015 at 2:27 pm
  • I am coding with Python again. I like it that the code is concise and clear. But also that the performance is not bad. I wrote Lucky Numbers in Clojure and Python. When calling with 1E7 Clojure takes ...
    Cecil WesterhofCecil Westerhof
    Apr 30, 2015 at 7:07 am
    May 2, 2015 at 5:22 pm
  • Hi, I noticed interesting behaviour. Since I don't have python3 installation here, I tested that on Python 2.7. Well known feature is that try..except block can catch multiple exceptions listed in a ...
    Pavel SPavel S
    Apr 10, 2015 at 8:48 am
    Apr 12, 2015 at 10:00 am
  • I want to use a GUI for Python. When searching I found (beside some others) Tkinter and wxPython. From what I found it looks like Tkinter is slightly better. What would be the pros/cons of these two? ...
    Cecil WesterhofCecil Westerhof
    Apr 26, 2015 at 1:02 pm
    Apr 29, 2015 at 9:03 am
  • file=open("input","r") line=file.seek(7) print line The above code is supposed to print a line but it prints "none". I don't know where the mistake is. Help.!
    siva sankari Rsiva sankari R
    Apr 29, 2015 at 6:08 pm
    May 1, 2015 at 2:42 am
  • I have a text as follows: "#D{#C[Health] #P[Information] - means any information, including #ST[genetic information], whether #C[oral | (recorded in (any form | medium))], that (1)#C[Is created or ...
    Apr 12, 2015 at 10:49 pm
    Apr 13, 2015 at 3:13 am
  • If I remember correctly you can not hide variables of a class or make them read-only? I want to rewrite my moving average to python. The init is: def __init__(self, length): if type(length) != int ...
    Cecil WesterhofCecil Westerhof
    Apr 28, 2015 at 7:33 am
    Apr 30, 2015 at 2:50 pm
  • Looking for comments, recommendations, advice that I've just wasted half a day on something utterly useless, whatever it be! I've just posted a new (single-module) package to PyPI that simplifies the ...
    Chris AngelicoChris Angelico
    Apr 20, 2015 at 6:20 am
    Apr 22, 2015 at 4:43 am
  • I implemented happy_number function: _happy_set = { '1' } _unhappy_set = set() def happy_number(n): """ Check if a number is a happy number https://en.wikipedia.org/wiki/Happy_number """ def ...
    Cecil WesterhofCecil Westerhof
    Apr 30, 2015 at 3:59 pm
    May 2, 2015 at 9:23 pm
  • Hi all, I need some help. I'm working on a simple event-based simulator for my dissertation research. The simulator has state information that I want to analyze as a post-simulation step, so I ...
    Cem KaranCem Karan
    Apr 22, 2015 at 10:07 am
    Apr 24, 2015 at 12:42 pm
  • Folks, I am writing a quite extensive piece of scientific software. Its workflow is quite easy to explain. The tool realizes series of operations on watersheds (such as mapping data on it, ...
    Apr 13, 2015 at 2:58 pm
    Apr 14, 2015 at 2:30 pm
  • https://www.youtube.com/watch?vHEWLj3gIJ8 Anyone here worked on trying a better strategy?
    Apr 26, 2015 at 9:35 pm
    Apr 29, 2015 at 1:33 am
  • I would like to distribute a python package with different code for Python 2.* than for Python 3.*. (Mostly this is because of different unicode string handling). There is nothing in to setuptools or ...
    Dave HeinDave Hein
    Apr 5, 2015 at 8:38 pm
    Apr 7, 2015 at 12:57 am
  • I wrote a function lucky_numbers: def lucky_numbers(n): if n < 3: return [1] sieve = range(1, n + 1, 2) sieve_index = 1 while True: skip_count = sieve[sieve_index] sieve_len = len(sieve) if sieve_len ...
    Cecil WesterhofCecil Westerhof
    Apr 29, 2015 at 6:24 pm
    Apr 30, 2015 at 7:28 pm
  • If two functions crossreference eachother back and forth what happen with the local variables. Will there be a new instance of function holding the variables or do they get messed up?
    Jonas ThornvallJonas Thornvall
    Apr 11, 2015 at 3:00 pm
    Apr 12, 2015 at 5:04 am
  • I was doing some maintenance now on a script of mine? I noticed that I compose strings in this little 54 line file multipole times using the + operator. I was prototyping at the time I wrote it and ...
    Travis GriggsTravis Griggs
    Apr 9, 2015 at 6:29 pm
    Apr 10, 2015 at 5:17 am
  • I am new to programming, though not new to computers. I'm looking to teach myself Python 3 and am working my way through a tutorial. At the point I'm at in the tutorial I am tasked with parsing out ...
    Apr 1, 2015 at 3:27 am
    Apr 3, 2015 at 4:44 am
  • Hello everyone! After a few years in development, I am proud to say Clize is landing its feet again and is now in beta for an upcoming release. You can try it out using pip install --user clize=3.0b1 ...
    Yann KaiserYann Kaiser
    Apr 27, 2015 at 9:02 am
    May 14, 2015 at 5:43 am
  • I want to ask Python experts about function decorator which has arguments. I feel that function decorator having arguments is complicated, because three 'def' are nested: def multiply(n): def ...
    Makoto KuwataMakoto Kuwata
    Apr 27, 2015 at 2:37 am
    Apr 29, 2015 at 9:22 am
  • I'm trying to plot the curve of an exponential distribution without much success. I'm missing something very basic I feel, but just can't figure it out after numerous tries, so I'm turning out to ...
    Mario FigueiredoMario Figueiredo
    Apr 25, 2015 at 10:33 pm
    Apr 26, 2015 at 7:57 pm
  • We are happy to announce that we will be hosting a Django Girls Workshop during the EuroPython 2015. It will take place on 20th of July, the first day of the conference. We believe in the work that ...
    M.-A. LemburgM.-A. Lemburg
    Apr 17, 2015 at 5:25 pm
    Apr 19, 2015 at 3:53 am
  • Dear Group, I am trying to understand the use of Boolean operator in Python. I am trying to write small piece of script, as follows, def input_test(): str1=raw_input("PRINT QUERY:") if "AND" or "OR" ...
    Subhabrata BanerjiSubhabrata Banerji
    Apr 24, 2015 at 2:50 pm
    May 8, 2015 at 9:14 am
  • I have a function to fetch a message from a file: def get_indexed_message(message_filename, index): """ Get index message from a file, where 0 gets the first message """ return ...
    Cecil WesterhofCecil Westerhof
    Apr 30, 2015 at 7:43 am
    Apr 30, 2015 at 2:53 pm
  • On behalf of the Python development community and the Python 3.5 release team, I'm thrilled to announce the availability of Python 3.5.0a4. Python 3.5.0a4 is the fourth and alpha release of Python ...
    Larry HastingsLarry Hastings
    Apr 20, 2015 at 8:16 am
    Apr 22, 2015 at 11:16 pm
  • I am having few files in default encoding. I wanted to change their encodings, preferably in "UTF-8", or may be from one encoding to any other encoding. I was trying it as follows, but it was giving ...
    Subhabrata BanerjiSubhabrata Banerji
    Apr 17, 2015 at 1:19 pm
    Apr 17, 2015 at 3:06 pm
  • I have a small little tool I'd like to make. It essentially takes piped input, modifies the text in some way, and immediately prints the output. The problem I'm having is that any output I pipe to ...
    Daniel EllisDaniel Ellis
    Apr 5, 2015 at 7:20 pm
    Apr 10, 2015 at 2:18 pm
  • Good Morning: I understand this error message when I run this code. However, I am curious to know what the most pythonic way is to convert the list to a string? I use Python 2.7. "Traceback (most ...
    Saran ASaran A
    Apr 2, 2015 at 12:02 pm
    Apr 3, 2015 at 12:14 am
  • Hi, I'm in need of a system for logging the step-wise results and diagnostic metadata about a python function implementation of an algorithm that I'm developing. The specific algorithm is not of ...
    Rob ClewleyRob Clewley
    Apr 21, 2015 at 7:02 pm
    May 6, 2015 at 11:31 pm
  • I have program that generates about 100 relatively complex graphics and writes then to a pdf book. It takes a while! Is there any possibility of using multiprocessing to build the graphics and then ...
    Paulo da SilvaPaulo da Silva
    Apr 21, 2015 at 2:14 am
    Apr 23, 2015 at 9:39 pm
  • Dear Group, I am trying to read a list of files as list_of_files = glob.glob('C:\Python27\*.*') Now I am trying to read each one of them, convert into list of words, and append to a list as. list1=[] ...
    Subhabrata BanerjiSubhabrata Banerji
    Apr 23, 2015 at 10:11 am
    Apr 23, 2015 at 2:05 pm
  • I am guessing that a few here might find this program interesting. http://video.pbs.org/video/2365464997/ -- In an altercation with the police, complying with their orders greatly increases your ...
    Apr 16, 2015 at 9:15 pm
    Apr 17, 2015 at 6:16 pm
  • I have an XML file that looks like this (this is just the pertinent part, the file is huge): <?xml version="1.0"? <Root <Doc Type="CCI" <Node Name="SystemConfig" Section="yes" <Node ...
    Larry MartellLarry Martell
    Apr 9, 2015 at 5:59 pm
    Apr 10, 2015 at 12:06 pm
  • I just wrote this bit (coming from Pascal) and am wondering how seasoned Python programmers would have done the same? Anything terribly non-python? As always, thanks for all input. K """ Creates a ...
    Kai PetersKai Peters
    Apr 7, 2015 at 10:43 pm
    Apr 9, 2015 at 10:26 am
  • I have a question about RegistryValueChangeEvent that I have not been able to find an answer to on the internet so far. I would appreciate any help since I have already spent a lot of time finding ...
    Apr 6, 2015 at 10:02 pm
    Apr 7, 2015 at 4:00 pm
  • Hi everyone. while trying to implement pyshark, i am getting this error: import pyshark capture = pyshark.LiveCapture(interface='wlan0') capture.sniff(timeoutP) capture i have tried also to run it ...
    Michael S.Michael S.
    Apr 6, 2015 at 8:40 am
    Apr 7, 2015 at 2:18 am
  • I have experience with Python, but it has been some time ago. The best way to relearn a language (for me) is just make a lot of code with it. But it would be nice if it was useful at the same time. I ...
    Cecil WesterhofCecil Westerhof
    Apr 29, 2015 at 2:53 pm
    May 9, 2015 at 8:28 am
  • Because I try to keep my lines (well) below 80 characters, I use the following: print('Calculating fibonacci and fibonacci_memoize once for ' + str(large_fibonacci) + ' to determine speed increase') ...
    Cecil WesterhofCecil Westerhof
    Apr 29, 2015 at 8:29 am
    Apr 29, 2015 at 1:15 pm
  • Not unless you tell us more about your setup. What operating system? Linux, OS X, Unix, Windows? 32-bit or 64-bit OS? Do you have root/Administrator access to the machine? If you are running Windows, ...
    Steven D'ApranoSteven D'Aprano
    Apr 26, 2015 at 3:05 pm
    Apr 29, 2015 at 12:02 pm
  • I started again with Python. In Clojure you have memoize. I thought it nice to have this in Python also. So I wrote it. With a Fibonacci function to show the usefulness. You can find it here ...
    Cecil WesterhofCecil Westerhof
    Apr 27, 2015 at 1:35 pm
    Apr 29, 2015 at 11:52 am
  • Dear Group, I am trying to open a bunch of files from a directory and trying to put the results in list of lists that is to say, that is to say, I have a list of file names of a directory, I want to ...
    Subhabrata BanerjiSubhabrata Banerji
    Apr 22, 2015 at 4:18 pm
    Apr 28, 2015 at 6:42 am
  • I'm saving some data via pickle, and loading it in is proving tricky. Traceback (most recent call last): [...some lines removed...] File "/home/kylotan/OMDBSetup.py", line 44, in get_omdb_map ...
    Ben SizerBen Sizer
    Apr 29, 2015 at 4:01 pm
    May 13, 2015 at 10:27 am
  • Hello Experts I have below lines with some variations. 1- set policy id 1000 from "Untrust" to "Trust" "Any" "" "HTTP" nat dst ip port 8000 permit log 2- set policy id 5000 from ...
    Kashif RanaKashif Rana
    Apr 29, 2015 at 8:42 pm
    Apr 29, 2015 at 11:29 pm
  • I have the folowing print statements: print( 'Calculating fibonacci_old, fibonacci_memoize and ' 'fibonacci_memoize once for {0} '.format(large_fibonacci)) print( 'Calculating fibonacci_old, ...
    Cecil WesterhofCecil Westerhof
    Apr 29, 2015 at 12:42 pm
    Apr 29, 2015 at 9:51 pm
  • Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this: awesome_lib/awesome.py ...
    Apr 25, 2015 at 5:48 pm
    Apr 26, 2015 at 1:40 pm
  • Dear Group, I am trying to open multiple files at one time. I am trying to do it as, for item in [ "one", "two", "three" ]: f = open (item + "world.txt", "w") f.close() This is fine. But I was ...
    Subhabrata BanerjiSubhabrata Banerji
    Apr 20, 2015 at 11:59 am
    Apr 22, 2015 at 4:13 pm
  • I've been following along with the discussions related to type hints[1] on python-ideas and python-dev. I'm interested enough to start looking into this for my own nefarious purposes. At work, we ...
    Skip MontanaroSkip Montanaro
    Apr 21, 2015 at 6:08 pm
    Apr 21, 2015 at 10:52 pm
  • Maybe this is pretty simple but seems I am stuck... def message_function(): return "HelloWorld!" def thread_maker(): """ call message_function() using a new thread and return it's "HelloWorld!" """ ...
    D. XenakisD. Xenakis
    Apr 18, 2015 at 5:07 pm
    Apr 19, 2015 at 9:59 pm
Group Navigation
period‹ prev | Apr 2015 | next ›
Group Overview
grouppython-list @

242 users for April 2015

Chris Angelico: 115 posts Steven D'Aprano: 98 posts Cecil Westerhof: 58 posts Dave Angel: 56 posts Ian Kelly: 44 posts Mark Lawrence: 42 posts Rustom Mody: 42 posts Paul Rubin: 39 posts Ben Finney: 31 posts Marko Rauhamaa: 30 posts Jonas Thornvall: 24 posts Peter Otten: 24 posts Sepi Gh: 24 posts Cameron Simpson: 22 posts Subhabrata Banerji: 17 posts Terry Reedy: 16 posts MRAB: 13 posts Saran A: 13 posts BartC: 11 posts Grant Edwards: 11 posts
show more