Search Results

Search found 14486 results on 580 pages for 'python idle'.

Page 187/580 | < Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >

  • What are your "must-have" Python Packages for Finance?

    - by srid
    With the recent SEC proposal requiring that most Asset-Backed Securities issuers file a python computer program to document the flow of funds (or waterfall) provisions of the transaction, I thought it timely to ask what you thought the "Must-Have" Python Packages for Finance would be. PS: apart from answering here, please also consider answering this survey.

    Read the article

  • How do I watch a folder for changes and when changes are done using Python?

    - by yakov
    i need to watch a folder for incoming files. i did that with the following help: http://stackoverflow.com/questions/182197/how-do-i-watch-a-file-for-changes-using-python the problem is that the files that are being moved are pretty big (10gb) and i want to be notified when all files are done moving. i tried comparing the size of the folder every 20 seconds but the file shows its correct size even tough windows shows that it is still moving. i am using windows with python

    Read the article

  • Has anyone here tried using the iSeries Python port?

    - by nearly_lunchtime
    I found http://www.iseriespython.com/, which is a version of Python for the iSeries apparently including some system specific data access classes. I am keen to try this out, but will have to get approval at work to do so. My questions are: Does the port work well, or are there limits to what the interpreter can handle compared with standard Python implementations? Does the iSeries database access layer work well, creating usable objects from table definitions?

    Read the article

  • Creating a list in Python- something sneaky going on?

    - by GlenCrawford
    Apologies if this doesn't make any sense, I'm very new to Python! From testing in an interpreter, I can see that list() and [] both produce an empty list: >>> list() [] >>> [] [] From what I've learned so far, the only way to create an object is to call its constructor (__init__), but I don't see this happening when I just type []. So by executing [], is Python then mapping that to a call to list()?

    Read the article

  • Is it possible to make an OS in python?

    - by None
    I was just wondering if it was possible to make an operating system in python. Nothing fancy. Maybe not even a "real" operating system with a kernel and all. Just a python program that is run when someone inserts the disc containing it that will make a fullscreen display on top of the installed os.

    Read the article

  • Python - create blacklist file of IP addresses that have more than 5 failed login attempts in the au

    - by oz_babe
    Basically I have an authlog/syslog file with a list of log in attempts and IP addresses - I need to make a Python program that will create a txt file with all the IP addresses that have more than 5 failed login attempts - a sort of "blacklist". So basically something like: if "uniqueipaddress" and "authentication failure" appear more than 5 times, add uniqueipaddress to txt file. Any help would be greatly appreciated - please try and make it simple as I am very, very inexperienced in programming in Python! Thanks.

    Read the article

  • In which scenario it is useful to use Disassembly on python?

    - by systempuntoout
    The dis module can be effectively used to disassemble Python methods, functions and classes into low-level interpreter instructions. I know that dis information can be used for: 1. Find race condition in programs that use threads 2. Find possible optimizations From your experience, do you know any other scenarios where Disassembly Python feature could be useful?

    Read the article

  • Python and libpcap. find source mac address of packet.

    - by Shamanu4
    Hello! I'm writing python program to build mac-address cache using pcap. But pcap module for python has no good documentation. I have found this page http://pylibpcap.sourceforge.net/ with code example and it works fine. Can anybody modify this example to make it able to show the source mac-address for each packet? Or point me to the documentation where I can read about it ...

    Read the article

  • Using Ruby/Python code in an iPhone OS app?

    - by igul222
    My app needs to use a library which is only available for Python and Ruby. From my understanding, Apple allows Ruby to run on iPhone as long as users can't execute arbitrary code (Rhomobile uses Ruby). How can I bundle Ruby/Python with my app, call a function from my Obj-C code, and get the result (a string) back in C or Obj-C format?

    Read the article

  • How to compile OpenGL with a python C++ extension using distutils on Mac OSX?

    - by Matthew Mitchell
    When I try it I get: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so, 2): Symbol not found: _glBindFramebufferEXT Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so Expected in: dynamic lookup I've tried all sort of things in the setup.py file. What do I actually need to put in it to link to OpenGL properly? My code compiles fine so there's no point putting that on there.

    Read the article

  • How to solve Python memory leak when using urrlib2?

    - by b_m
    Hi, I'm trying to write a simple Python script for my mobile phone to periodically load a web page using urrlib2. In fact I don't really care about the server response, I'd only like to pass some values in the URL to the PHP. The problem is that Python for S60 uses the old 2.5.4 Python core, which seems to have a memory leak in the urrlib2 module. As I read there's seems to be such problems in every type of network communications as well. This bug have been reported here a couple of years ago, while some workarounds were posted as well. I've tried everything I could find on that page, and with the help of Google, but my phone still runs out of memory after ~70 page loads. Strangely the Garbege Collector does not seem to make any difference either, except making my script much slower. It is said that, that the newer (3.1) core solves this issue, but unfortunately I can't wait a year (or more) for the S60 port to come. here's how my script looks after adding every little trick I've found: import urrlib2, httplib, gc while(true): url = "http://something.com/foo.php?parameter=" + value f = urllib2.urlopen(url) f.read(1) f.fp._sock.recv=None # hacky avoidance f.close() del f gc.collect() Any suggestions, how to make it work forever without getting the "cannot allocate memory" error? Thanks for advance, cheers, b_m update: I've managed to connect 92 times before it ran out of memory, but It's still not good enough. update2: Tried the socket method as suggested earlier, this is the second best (wrong) solution so far: class UpdateSocketThread(threading.Thread): def run(self): global data while 1: url = "/foo.php?parameter=%d"%data s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('something.com', 80)) s.send('GET '+url+' HTTP/1.0\r\n\r\n') s.close() sleep(1) I tried the little tricks, from above too. The thread closes after ~50 uploads (the phone has 50MB of memory left, obviously the Python shell has not.) UPDATE: I think I'm getting closer to the solution! I tried sending multiple data without closing and reopening the socket. This may be the key since this method will only leave one open file descriptor. The problem is: import socket s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket.connect(("something.com", 80)) socket.send("test") #returns 4 (sent bytes, which is cool) socket.send("test") #4 socket.send("test") #4 socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns the number of sent bytes, ok socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns 0 on the phone, error on Windows7* socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns 0 on the phone, error on Windows7* socket.send("test") #returns 0, strange... *: error message: 10053, software caused connection abort Why can't I send multiple messages??

    Read the article

  • In what situation should the built-in 'operator' module be used in python?

    - by apphacker
    I'm speaking of this module: http://docs.python.org/library/operator.html From the article: The operator module exports a set of functions implemented in C corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for special class methods; variants without leading and trailing __ are also provided for convenience. I'm not sure I understand the benefit or purpose of this module.

    Read the article

  • Am I right in thinking there is no way to put an if statement and an else statement on line in Python?

    - by Louise
    Am I right in thinking I can't put an if-statement and the corresponding else-statement on one line in Python? NB: variable = value1 if condition else value2 is NOT two statements. It's one statement which can take the value of one of two expressions. I want to do something like if condition a=value else b=value Am I right in thinking this requires a full if-else in Python? Like if condition: a=value else: b=value Thanks, Louise

    Read the article

  • How does Python differentiate between the different data types?

    - by wrongusername
    Sorry if this is quite noobish to you, but I'm just starting out to learn Python after learning C++ & Java, and I am wondering how in the world I could just declare variables like id = 0 and name = 'John' without any int's or string's in front! I figured out that perhaps it's because there are no ''s in a number, but how would Python figure that out in something like def increase(first, second) instead of something like int increase(int first, int second) in C++?!

    Read the article

  • Is there any way to run Python on Android ?

    - by e-satis
    I like the Android platform. Actually, with some friends, we even participate to the ADC with the Spoxt project. But Java is not my favourite language at all. We are working on a S60 version and this platform has a nice Python API. Of course there is nothing official about Python on Android, but since Jython exists, does anybody know a way to let the snake and the robot work together ?

    Read the article

  • Is it guaranteed that False == 0 and True == 1 in Python?

    - by EOL
    Is it guaranteed that False == 0 and True == 1, in Python? For instance, is it in any way guaranteed that the following code will always produce the same results, whatever the version of Python (existing and in the foreseeable future)? 0 == False # True 1 == True # True ['zero', 'one'][False] # is 'zero' Any reference to the official documentation would be much appreciated! Other comments would be appreciated too… :)

    Read the article

< Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >