FAQ

Search Discussions

172 discussions - 1,254 posts

  • Taken from Ben Kurtovic's blog: http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html (lambda _, __, ___, ____, _____, ______, _______, ________: getattr( ...
    Steven D'ApranoSteven D'Aprano
    Dec 20, 2014 at 12:57 pm
    Jan 18, 2015 at 8:50 pm
  • Hello everyone, I'm currently in the process of self-study journey, so I have some questions arisen from time to time. Today I would like to talk about iterables and iterators,(ask for your help ...
    Ivan EvstegneevIvan Evstegneev
    Dec 6, 2014 at 4:44 pm
    Dec 12, 2014 at 7:36 am
  • Excuse is: "bad programming style". I don't need snot telling me how to program after 20 years of programming experience. This is so far the only thing pissing me off in python. Now I have to declare ...
    Skybuck FlyingSkybuck Flying
    Dec 3, 2014 at 2:27 am
    Dec 5, 2014 at 4:17 am
  • I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I ...
    Ryguy7272Ryguy7272
    Dec 20, 2014 at 3:46 pm
    Dec 26, 2014 at 8:59 am
  • Hi all, Last year a survey was conducted on python 2 and 3 usage. Here is the 2014 edition, slightly updated (from 9 to 11 questions). It should not take you more than 1 minute to fill. I would be ...
    Bruno CauetBruno Cauet
    Dec 10, 2014 at 4:59 pm
    Dec 16, 2014 at 11:05 am
  • Did you ever hit the "Socialize" button? Are you eager to see the latest tweets when you are reading a PEP? Do you run away screaming from a page where nothing moves without you hitting a button? Do ...
    Peter OttenPeter Otten
    Dec 4, 2014 at 5:09 pm
    Dec 11, 2014 at 10:11 pm
  • Hello, Does any body know when time.monotonic() rolls over ? On python doc https://docs.python.org/3/library/time.html it is said every 49.7 days on Windows versions older than Vista. For more recent ...
    AstAst
    Dec 4, 2014 at 3:25 pm
    Dec 5, 2014 at 6:48 pm
  • Hi, where am i going wrong ? $ python3 Python 3.2.5 (default, Oct 2 2013, 22:58:11) [GCC 4.8.1] on cygwin Type "help", "copyright", "credits" or "license" for more information. <class 'dict' ...
    ShawoolShawool
    Dec 21, 2014 at 7:28 am
    Dec 26, 2014 at 4:38 am
  • You, 'root', does not have enoug permission to do it.... C:\temp \util\Putty\pscp root at opensuse:/etc/passwd . Using keyboard-interactive authentication. Password: Access denied
    LuukLuuk
    Dec 8, 2014 at 4:37 pm
    Dec 9, 2014 at 4:32 pm
  • I have two general questions regarding Python that I couldn't find any good answers for. This is not the often-asked Tabs vs Spaces question, so kindly read it in whole. *Q1.* This is not to debate ...
    Aahan KrishAahan Krish
    Dec 5, 2014 at 5:40 pm
    Dec 6, 2014 at 8:04 pm
  • I ran into an issue setting variables from a GUI module that imports a back end module. My approach was wrong obviously but what is the best way to set values in a back end module. #module name ...
    bSneddonbSneddon
    Dec 8, 2014 at 10:10 pm
    Dec 11, 2014 at 10:51 pm
  • I have a Python script that runs with no errors but it doesn't produce the output it should in a text file. I can't figure out why. Is this the correct forum to post this in or can someone suggest a ...
    DocfxitDocfxit
    Dec 10, 2014 at 11:04 pm
    Dec 11, 2014 at 9:27 pm
  • My understanding from talking to different people is that many do use tabs (instead of spaces) for indentation in their code. My question is to them (because I want to use tabs too) is: how do you ...
    Aahan KrishAahan Krish
    Dec 8, 2014 at 2:15 am
    Dec 9, 2014 at 4:32 pm
  • I would like to parse the VIN, frame and engine numbers found on this page (below). I don't really know any regex, I have looked a little at pyparsing. I have some other similar numbers to. I am ...
    Vincent DavisVincent Davis
    Dec 26, 2014 at 12:02 am
    Dec 30, 2014 at 3:10 am
  • Dear Python programmers, Having input the line of code in text: cd Soup to the Windows console, and having put the file 'EcologicalPyramid.html' into the Directory 'Soup', on the C drive, in ...
    Simon EvansSimon Evans
    Dec 14, 2014 at 4:15 pm
    Jan 4, 2015 at 2:14 pm
  • I know about the schedule modules and such but they work in situations like 'run this in a X hours/minutes/seconds interval', I already have my code in a while loop with sleep (it's a bit ugly, I'l ...
    Juan ChristianJuan Christian
    Dec 17, 2014 at 7:10 pm
    Dec 19, 2014 at 5:58 am
  • So... I was browsing some questions on reddit, and one of them involved tkinter and lambdas. Managed to help the person out, but in the process ended up with more questions of my own :/ My basic ...
    MemilanukMemilanuk
    Dec 8, 2014 at 11:43 pm
    Dec 9, 2014 at 12:43 pm
  • I don't know if this is a cherrypy specific question (although it will be implemented in cherrypy for sure), or more of a general http protocol question, but when using cherrypy to serve a web app, ...
    Israel BrewsterIsrael Brewster
    Dec 1, 2014 at 8:28 pm
    Dec 3, 2014 at 7:06 pm
  • rosuav at sikorsky:~$ python -S Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 rosuav at sikorsky:~$ python Segmentation fault This is the system Python on Debian Wheezy, and I ...
    Chris AngelicoChris Angelico
    Dec 29, 2014 at 2:33 pm
    Dec 30, 2014 at 7:02 am
  • Hello, Is it possible in python: if ((x = a(b,c)) == 'TRUE'): print x Thanks.
    JCJC
    Dec 25, 2014 at 3:18 pm
    Dec 26, 2014 at 6:45 am
  • Hi there, The list comprehension is results = [d2(t[k]) for k in xrange(1000)], where d2 is a function returning a list, say [x1,x2,x3,x4] for one example. So "results" is a list consisting of 1000 ...
    KK SasaKK Sasa
    Dec 12, 2014 at 6:22 am
    Dec 13, 2014 at 12:38 pm
  • Hello Here is what I would like to implement class Circle: def __init__(center=(0,0), radius, mass=1)): self.center = center self.radius = radius if "mass is the default one": <----- self.mass = ...
    AstAst
    Dec 10, 2014 at 3:14 pm
    Dec 11, 2014 at 11:03 pm
  • Is there a way to set the default_factory of defaultdict so that accesses to undefined keys get to set to the key? i.e. if d['xxx'] were accessed and there was no key 'xxx' then d['xxx'] would get ...
    Larry MartellLarry Martell
    Dec 1, 2014 at 6:05 pm
    Dec 7, 2014 at 7:30 pm
  • Hi All, I have a quick question regarding the modification of global variables within functions. To illustrate, consider the following toy example: a={"1": set()} b=9 def gt(l): a["1"] = a["1"] | ...
    LJLJ
    Dec 4, 2014 at 8:09 pm
    Dec 5, 2014 at 12:56 pm
  • Howdy all, What should I do, in a world where all text literals are Unicode by default, to make ?__import__? work in both Python 2 and 3? I'm slowly learning about making Python code that will run ...
    Ben FinneyBen Finney
    Dec 15, 2014 at 7:29 am
    Dec 16, 2014 at 8:19 am
  • When importing a module from a subpackage, it's sometimes convenient to refer to it throughout the code with a one-part name rather than two. I'm going to use 'os.path' for the examples, but my ...
    Chris AngelicoChris Angelico
    Dec 3, 2014 at 11:02 am
    Dec 4, 2014 at 10:24 pm
  • In the process of refactoring some code, I serendipitously created what I think is an essential new bit of Python syntax. The ?or else? statement. I ended up with: sites_string = args.sites or else ...
    Roy SmithRoy Smith
    Dec 2, 2014 at 5:18 pm
    Dec 3, 2014 at 12:08 pm
  • Hi , (a) I was trying to reduce the below piece of code using List comprehension ? Any suggestion please let me know for opt in options: opt['result'] = Queue.Queue() tmp_thread = pause.Thread(opt) ...
    Ganesh PalGanesh Pal
    Dec 22, 2014 at 5:42 am
    Dec 22, 2014 at 8:28 pm
  • I was thinking a bit about the following pattern: value = get_some_value() while value in undesired_values: value = get_some_value() I've always hated code that looks like this. Partly due to the ...
    Nelson CrosbyNelson Crosby
    Dec 12, 2014 at 2:21 am
    Dec 13, 2014 at 11:56 am
  • When doing nested loop, the very first iteration of the innermost loop ends ultimately slow. Let's the code speak. The following code is quite contrived. Actually it's derived from my 3d-dct script ...
    Shiyao MaShiyao Ma
    Dec 10, 2014 at 5:20 am
    Dec 10, 2014 at 4:07 pm
  • Hi, I have been looking at various places to answer this dilemma: If a class member function simply tests something and returns a b::oolean call it def is_<whatever_you_are_testing_for (): pass like ...
    Mateusz LoskotMateusz Loskot
    Dec 11, 2014 at 5:34 pm
    Dec 15, 2014 at 9:56 am
  • my software on the local machine needs to send http request to a specific web server , is there any way to protect the http request url from being found by Packet analyzer software like Wireshark and ...
    iMathiMath
    Dec 9, 2014 at 6:58 am
    Dec 12, 2014 at 9:44 pm
  • Hi, I'm fairly new to Python, and while trying to implement a custom sliding window operation for a pandas Series, I came across a great piece of code?: ... z = (islice(a, i, None) for i in range(n)) ...
    SebSeb
    Dec 23, 2014 at 6:55 pm
    Dec 26, 2014 at 9:17 pm
  • For those who haven't heard thought this might be of interest https://github.com/fijal/jitpy -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language ...
    Mark LawrenceMark Lawrence
    Dec 5, 2014 at 7:54 pm
    Dec 9, 2014 at 4:32 pm
  • Hi, we are working on a small scientific program that helps us in developing and testing of new numerical methods for a certain type of biochemical problems. I spare you the math ;-) We code our new ...
    Michael KreimMichael Kreim
    Dec 3, 2014 at 8:29 am
    Dec 8, 2014 at 5:19 am
  • I need to search through a directory of text files for a string. Here is a short program I made in the past to search through a single text file for a line of text. How can I modify the code to ...
    Seymore4HeadSeymore4Head
    Dec 28, 2014 at 5:27 pm
    Dec 29, 2014 at 1:35 pm
  • Hello! I am just about setting up a project with an Raspberry Pi that is connected to some hardware via its GPIO pins. Reading the data already works perfectly but now I want to distribute it to ...
    Pfranken85Pfranken85
    Dec 27, 2014 at 9:56 am
    Jan 2, 2015 at 10:49 am
  • Hi all, I was using sl4a for quite some time on android and it basically worked very well although some features are missing. It looks like sl4a is dead, although I could be wrong. Does anyone ...
    Fetchinson .Fetchinson .
    Dec 25, 2014 at 3:31 pm
    Dec 29, 2014 at 4:32 pm
  • Would prefer to use something free, that could work somewhat cross-platform, but, my primary target is for windows OS, and would primarily just want to be able to easily trigger playback of either ...
    Jacob KrugerJacob Kruger
    Dec 16, 2014 at 4:57 pm
    Dec 21, 2014 at 10:22 pm
  • I think the user interface shouldn't be freezed when using concurrent.futures.ThreadPoolExecutor here,as it executes asynchronously , but it doesn't meet my expectations,anyone can explain why ? any ...
    iMathiMath
    Dec 11, 2014 at 4:52 am
    Dec 18, 2014 at 4:29 pm
  • I travel alot, if not just interested in things of pocketable portability, and was curious if you can tell me if Python can be LEARNED from beginner on an IOS device ( with interest of being able to ...
    Delgado MottoDelgado Motto
    Dec 12, 2014 at 12:39 pm
    Dec 14, 2014 at 5:26 pm
  • I'd like to add the following to a python-program: when a module (take rtlsdr as an example) is not installed on the system I'd like to ask the program something like: module rtlsdr is missing, shall ...
    HugocoolensHugocoolens
    Dec 8, 2014 at 5:44 pm
    Dec 12, 2014 at 12:59 pm
  • I have the following test code: import smtplib fromaddr = 'mksfjnsfji4433j43jc at bk.ru' toaddrs = ['mksfjnsfji4433j43jc at bk.ru'] msg = ("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr, ", ...
    Juan ChristianJuan Christian
    Dec 27, 2014 at 12:39 am
    Dec 27, 2014 at 3:09 pm
  • Hello to all those in this forum, My code seems to have a mind of its own. I have been writing a program to reenact the "Twenny Wun" Vine video, and it seems to be activating functions without me ...
    Luke TomanengLuke Tomaneng
    Dec 22, 2014 at 7:55 pm
    Dec 23, 2014 at 12:12 am
  • smtplib.SMTPRecipientsRefused: <span class="m_body_email_addr" title="38f5bc4dcc9c8d55aa5c2f74696fd687" {'aahlin!@gmail.com</span ': (550, 'restricted characters in address')} As in this question, ...
    RadzhomeRadzhome
    Dec 17, 2014 at 4:16 pm
    Dec 17, 2014 at 10:00 pm
  • Hello Everyone, I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: Step 2 - adding some ...
    Ivan EvstegneevIvan Evstegneev
    Dec 14, 2014 at 4:20 pm
    Dec 15, 2014 at 7:13 pm
  • Hello Experts I am network engineer and not expert in programming. I would like to make one python script to convert juniper netscreen firewall configuration into juniper SRX firewall configuration ...
    Kashif RanaKashif Rana
    Dec 10, 2014 at 6:51 pm
    Dec 15, 2014 at 5:07 am
  • Hello, I have csv file like: id,name,userid,password 1,ABC,def at ghi,1234 2,DEF,ghi at jkl,asdf 3,GHI,jkl at mno,zxcv . . . I need to get that csv file into a dictionary. Here is my code: import csv ...
    JCJC
    Dec 29, 2014 at 3:35 pm
    Dec 29, 2014 at 5:06 pm
  • We were discussing something along these lines a while ago, and I never saw anything truly satisfactory - there's no easy way to handle a missing name by returning a value (comparably to ...
    Chris AngelicoChris Angelico
    Dec 28, 2014 at 2:03 pm
    Dec 28, 2014 at 4:35 pm
  • Hi, There are 2 statements: A: a = ?h? B: b = ?hh? According to me understanding, A should be faster as characters would shortcut this 1-byte string ?h? without malloc; B should be slower than A as ...
    Dave TianDave Tian
    Dec 24, 2014 at 1:28 am
    Dec 25, 2014 at 4:34 pm
Group Navigation
period‹ prev | Dec 2014 | next ›
Group Overview
grouppython-list @
categoriespython
discussions172
posts1,254
users262
websitepython.org

262 users for December 2014

Chris Angelico: 148 posts Steven D'Aprano: 66 posts Ian Kelly: 47 posts Ben Finney: 38 posts Dave Angel: 36 posts Terry Reedy: 30 posts Tim Chase: 29 posts Marko Rauhamaa: 28 posts Mark Lawrence: 24 posts Tim Chase: 23 posts Rustom Mody: 21 posts Michael Torrie: 20 posts Wxjmfauth: 18 posts Ned Batchelder: 18 posts Roy Smith: 17 posts Sohcahtoa82: 16 posts Ethan Furman: 15 posts Peter Otten: 15 posts Juan Christian: 14 posts Steven D'Aprano: 14 posts
show more
Archives