Search Results

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

Page 190/580 | < Previous Page | 186 187 188 189 190 191 192 193 194 195 196 197  | Next Page >

  • Google Python Class Day 1 Part 3

    Google Python Class Day 1 Part 3 Google Python Class Day 1 Part 3: Dicts and Files. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 7 0 ratings Time: 28:59 More in Science & Technology

    Read the article

  • Problem with Python3 picking Python2 package

    - by zetah
    I installed python3-numpy package, but trying to import it in Python3 interpreter I get this: $ python3 Python 3.2.3 (default, May 3 2012, 15:54:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/zetah/.local/lib/python2.7/site-packages/numpy/__init__.py", line 128, in <module> from version import git_revision as __git_revision__ ImportError: No module named version >>> Looking in Synaptic I see python3-numpy is installed in /usr/lib/python3/dist-packages/numpy/ Why is it picking wrong package and what can I do to remedy this? Update: OK, in my ~/.profile I have this line: PYTHONPATH=$PYTHONPATH:$HOME/.local/lib/python2.7/site-packages but if I remove this line then my Python 2.7 local packages (which I build from source) wont work Update 2: Everything seems to work perfect without $PYTHONPATH. I guess it was in my .profile file for nothing Please close this question

    Read the article

  • How can I set a spin button?

    - by espectalll123
    I've done some spin buttons with Glade for my Python/GTK3 app, but I don't know how to set things like default, lower or higher value. How can I do it? Using the following things for development: Python 2.7.3 GTK 3 Glade 3.12.1 1) I need to change things from script, as I need to set default value and maximum value as a variable; 2) I saw the PyGTK documentation before, it's not working for GTK3; 3) please don't direct me to the GTK3 docummentation... I can't understand it :P

    Read the article

  • Google Python Class Day 2 Part 2

    Google Python Class Day 2 Part 2 Google Python Class Day 2 Part 2: Utilities: OS and Commands. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 11 1 ratings Time: 20:20 More in Science & Technology

    Read the article

  • Glade: How can I set the value of a spin button?

    - by espectalll123
    I've done some spin buttons with Glade for my Python/GTK3 app, but I don't know how to set things like default, lower or higher value. How can I do it? Using the following things for development: Python 2.7.3 GTK 3 Glade 3.12.1 1) I need to change things from script, as I need to set default value and maximum value as a variable; 2) I saw the PyGTK documentation before, it's not working for GTK3; 3) please don't direct me to the GTK3 docummentation... I can't understand it :P

    Read the article

  • Google Python Class Day 1 Part 1

    Google Python Class Day 1 Part 1 Google Python Class Day 1 Part 1: Introduction and Strings. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 137 1 ratings Time: 51:37 More in Science & Technology

    Read the article

  • "Cannot import name genshi" error when installing the Swab library

    - by ATMathew
    I'm trying to install the Swab library for Python 2.6 in Ubuntu 10.10. However, I get the following error messages when I try to import it. In the terminal I ran: sudo easy_install swab sudo easy_install Genshi In the Python interpreter I ran: >>> import swab Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/swab-0.1.2-py2.6.egg/swab/__init__.py", line 23, in <module> from pestotools.genshi import genshi, render_docstring ImportError: cannot import name genshi I don't know whats going on. can anyone help.

    Read the article

  • How do I encrypt the source code on the webserver?

    - by Ashin k n
    I have a web application developed using Python, HTML, CSS & JavaScript. The customer installs it in any of their own Machine and uses it through their LAN. In short the customer sets up the webserver in any of their own machine. Since its a web application, all the source code is open for the customer in the document root directory of webserver. I want to encrypt the whole source code in the document root directory in such a way that it should not effect the working of the web application. Is there is any way to encrypt the Python, HTML, CSS & JavaScript for this purpose.

    Read the article

  • Designing for an algorithm that reports progress

    - by Stefano Borini
    I have an iterative algorithm and I want to print the progress. However, I may also want it not to print any information, or to print it in a different way, or do other logic. In an object oriented language, I would perform the following solutions: Solution 1: virtual method have the algorithm class MyAlgoClass which implements the algo. The class also implements a virtual reportIteration(iterInfo) method which is empty and can be reimplemented. Subclass the MyAlgoClass and override reportIteration so that it does what it needs to do. This solution allows you to carry additional information (for example, the file unit) in the reimplemented class. I don't like this method because it clumps together two functionalities that may be unrelated, but in GUI apps it may be ok. Solution 2: observer pattern the algorithm class has a register(Observer) method, keeps a list of the registered observers and takes care of calling notify() on each of them. Observer::notify() needs a way to get the information from the Subject, so it either has two parameters, one with the Subject and the other with the data the Subject may pass, or just the Subject and the Observer is now in charge of querying it to fetch the relevant information. Solution 3: callbacks I tend to see the callback method as a lightweight observer. Instead of passing an object, you pass a callback, which may be a plain function, but also an instance method in those languages that allow it (for example, in python you can because passing an instance method will remain bound to the instance). C++ however does not allow it, because if you pass a pointer to an instance method, this will not be defined. Please correct me on this regard, my C++ is quite old. The problem with callbacks is that generally you have to pass them together with the data you want the callback to be invoked with. Callbacks don't store state, so you have to pass both the callback and the state to the Subject in order to find it at callback execution, together with any additional data the Subject may provide about the event is reporting. Question My question is relative to the fact that I need to implement the opening problem in a language that is not object oriented, namely Fortran 95, and I am fighting with my usual reasoning which is based on python assumptions and style. I think that in Fortran the concept is similar to C, with the additional trouble that in C you can store a function pointer, while in Fortran 95 you can only pass it around. Do you have any comments, suggestions, tips, and quirks on this regard (in C, C++, Fortran and python, but also in any other language, so to have a comparison of language features that can be exploited on this regard) on how to design for an algorithm that must report progress to some external entity, using state from both the algorithm and the external entity ?

    Read the article

  • TTS on App Engine

    - by yati sagade
    I have written a small front-end to the Festival TTS system using Python/Django. I wish to deploy it on the Google App Engine cloud. A few questions: My application uses the Festival app 'text2wave'. Will is work on the cloud? I have used Python primitives like subprocess.call() to invoke the aforementioned program. Will that work? If your answer to any or both of (1) and (2) is no, is there a free api on the web that I can use (from the appengine)? I read somewhere about placing calls from Phono to a Voxeo backend, but I'm not sure what that means. I am aware of the Google Translate extension that allows translation using an HTTP GET (REST) request, but here the text is limited to 100 chars. Bad. Plus, they may take it down any point of time.

    Read the article

  • Google Python Class Day 1 Part 2

    Google Python Class Day 1 Part 2 Google Python Class Day 1 Part 2: Lists, Sorting, and Tuples. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 13 0 ratings Time: 35:12 More in Science & Technology

    Read the article

  • Can't center dialog window above main window when using Glade (Quickly)

    - by Niklas
    I have a dialog opening when I press a button in my application and I want it to center above the application's main window, but I can't find a way to do this. I'm using Quickly (Python) and Glade. In Glade I've tried the following settings: Window Type = Popup Modal = Yes Window Position = Center on Parent But I simply can't get the behaviour I'm after. When using the "Window Type" option "Top level" the dialog opens in the center of the screen. When I use "Window Type" = "Popup" it opens in the very top left corner, with the window controls unaccessible. I know this must be a very basic setting but I've just started developing with GTK and Python so I obviously managed to miss this. Thanks for any advice! :)

    Read the article

  • Google Python Class Day 2 Part 3

    Google Python Class Day 2 Part 3 Google Python Class Day 2 Part 3: Utilities: urls and HTTP, Exceptions. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 29 1 ratings Time: 25:51 More in Science & Technology

    Read the article

  • What programming language should I learn for fun?

    - by Bo Milanovich
    Disclaimer: I'm not a programmer, but I do like coding from time to time. This is strictly for fun, nothing else. I'm an economist :) I learned Delphi in the past (7 years ago, forgot 99% of it), BASIC (10 years ago). I now know a bit of PHP. So I want to learn a programming language just so I can kill some time, but it'd be awesome if it would be useful as well. I've narrowed down choices to the following: Python (heard it was easy yet useful, Google's appengine runs on python) Java (awesome because cross-platform and very popular, also I'm an Android fan so I might even develop some apps) Continue learning PHP? (awesome language, I'm a web developer somewhat so it may be useful) Something else? Thanks!

    Read the article

  • Unable to locate package lightread

    - by TENG PENG
    I have changed my source to local server. I'm using Ubuntu 12.10. When I type apt-cache search in terminal, it shows nothing. When I install lightread it shows Unable to locate package lightread. When I install lightread manually by python. It shows python '/home/peng/Downloads/quickly_trunk/setup.py' Traceback (most recent call last): File "/home/peng/Downloads/quickly_trunk/setup.py", line 93, in <module> data_files=[('share/icons/hicolor/128x128/apps', ['data/media/lightread.png'])] File "/usr/lib/python2.7/dist-packages/DistUtilsExtra/auto.py", line 71, in setup src_mark(src, 'setup.py') File "/usr/lib/python2.7/dist-packages/DistUtilsExtra/auto.py", line 527, in src_mark src.remove(path) KeyError: 'setup.py' How to solve the problem?

    Read the article

  • Google Python Class Day 2 Part 4

    Google Python Class Day 2 Part 4 Google Python Class Day 1 Part 1: Closing Thoughts. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 129 1 ratings Time: 11:16 More in Science & Technology

    Read the article

  • Using dot To Access Object Attribute and Proper abstraction

    - by cobie
    I have been programming in python and java for quite a number of years and one thing i find myself doing is using the setters and getters from java in python but a number of blogs seem to think using the dot notation for access is the pythonic way. What I would like to know is if using dot to access methods does not violate abstraction principle. If for example I implement an attribute as a single object and use dot notation to access, if I wanted to change the code later so that the attribute is represented by a list of objects, that would require quite some heavy lifting which violates abstraction principle.

    Read the article

  • What is the simplest human readable configuration file format?

    - by Juha
    Current configuration file is as follows: mainwindow.title = 'test' mainwindow.position.x = 100 mainwindow.position.y = 200 mainwindow.button.label = 'apply' mainwindow.button.size.x = 100 mainwindow.button.size.y = 30 logger.datarate = 100 logger.enable = True logger.filename = './test.log' This is read with python to a nested dictionary: { 'mainwindow':{ 'button':{ 'label': {'value':'apply'}, ... }, 'logger':{ datarate: {'value': 100}, enable: {'value': True}, filename: {'value': './test.log'} }, ... } Is there a better way of doing this? The idea is to get XML type of behavior and avoid XML as long as possible. The end user is assumed almost totally computer illiterate and basically uses notepad and copy-paste. Thus the python standard "header + variables" type is considered too difficult. The dummy user edits the config file, able programmers handle the dictionaries. Nested dictionary is chosen for easy splitting (logger does not need or even cannot have/edit mainwindow parameters).

    Read the article

  • RPC protocols comparison

    - by Ricardo
    I have to select a protocol/technology to use for communicating a client-server architecture, with support both for Python and C. The main requirements are: Symmetrical communication in between ends: clients establish a connection and servers can send data back to clients through the same connection. Avoid excessive overhead by using HTTP or a big stack (if possible, TCP direct communication). TLS/SSL support for secure communications. Ease of implementation. For that, I evaluated the following protocols/communications technologies. Is the information on this table accurate and correct? (*1) TLS support for RPyC is based in a no-longer supported Python library.

    Read the article

  • How to study for an Informatics Olympiad [on hold]

    - by Cloud
    One of my goals for next year is to participate in the Australian Informatics Olympiad. As far as I'm aware, it is not too different from Informatics Olympiads in other countries. What would be the best way to study for this? What content should I pay particular attention to while learning in Python? I am currently using the book 'Learn Python the hard way', but are there any other books worthy of a mention? This is the link to their site: http://orac.amt.edu.au/aio/ It contains sample questions, so you can get an idea for the structure or nature of the competition. I know this isn't really a specific programming question, but it would be great if someone could share their experience or give some suggestions for me.

    Read the article

  • What do you think about gems and eggs? Alternatives?

    - by Juanlu001
    I've read recently some criticism (see 1, 2, 3) about the packaging distribution system of two popular programming languages: Ruby gems and Python eggs. The most important argument stated against them is that they replace the system package manager (in case there is one, as in every Linux distribution), which makes eggs and gems difficult to track, code difficult to patch, and so on. Are actually eggs and gems right? In case not, are there any alternatives to distributing Python or Ruby modules? Should developers focus on taking advantage of package manager (apt-get, pacman, ...) capabilities?

    Read the article

  • chroot for unsecure programs execution

    - by attwad
    Hi, I have never set-up a chroot-jailed environment before and I am afraid I need some help to do it well. To explain shortly what this is all about: I have a webserver to which users send python scripts to process various files that are stored on the server (the system is for Research purpose). Everyday a cron job starts the execution of the uploaded scripts via a command of this kind: /usr/bin/python script_file.py All of this is really insecure and I would like to create a jail in which I would copy the necessary files (uploaded scripts, files to process, python binary and dependencies). I already looked at various utilities to create jails but none of them seemed up-to-date or were lacking solid documentation (ie. the links proposed in How can I run an untrusted python script) Could anyone guide me to a viable solution to my problem? like a working example of a script that creates a jail, put some files in it and executes a python script? Thank you very much.

    Read the article

  • Do I have to learn html and javascript to create web applications?

    - by vainolo
    I am an experienced Java programmer, and I want to create a complex web application requiring dynamic pages, drawings, etc (take SO as an example). Do I have to learn javascript/html in order to create such an application? It is not that I don't want to learn another language (I've done this before), but technology on the javascript environment seems to change so fast that when you finish learning one framework it is already obsolete. I have checked a number of java framework for web development (spring, play), but not deeply. So can these frameworks (or other possible java frameworks that I'm not aware of) be used without learning html/javascript? I also have some python experience. So if I can do the app in python it is also an option.

    Read the article

  • Embedding Pygame to C++ [closed]

    - by Pendertuga
    If embedding Pygame to C++ to have a game be an executable, is there any extra process I would have to use in order to use Pygame functions when embedding into C++? As opposed to just writing embedding code in C++ for normal Python code? To clear cut the question I want to know if it's the same process without having to call different functions. EDIT: My question is if I have to call different functions in C++ when embedding Python code that uses Pygame modules. I am NOT using pygame2exe nor py2exe. I never even mentioned those. My question is solely about code embedding.

    Read the article

< Previous Page | 186 187 188 189 190 191 192 193 194 195 196 197  | Next Page >