pydev

How to run django tests in Eclipse to make debugging possible, but on test database

时间秒杀一切 提交于 2019-12-30 11:15:37
问题 I've got problem concerning me a long time. I either run tests from eclipse (Python unittest) using Pydev or Nose test runner. That way it's possible to debug tests and watch them in PyUnit view. But that way test database is not created, manage.py is not used. Or I run them via manage.py test - test db is being created, but above features not available that way. Is that possible to debug tests in eclipse which are being run on test db? Regards, okrutny 回答1: You can create a new PyDev django

Python IDE

浪尽此生 提交于 2019-12-29 23:45:34
Python IDE 本文为大家推荐几款款不错的 Python IDE (集成开发环境),比较推荐 PyCharm,当然你可以根据自己的喜好来选择适合自己的 Python IDE。 PyCharm PyCharm 是由 JetBrains 打造的一款 Python IDE。 PyCharm 具备一般 Python IDE 的功能,比如:调试、语法高亮、项目管理、代码跳转、智能提示、自动完成、单元测试、版本控制等。 另外,PyCharm 还提供了一些很好的功能用于 Django 开发,同时支持 Google App Engine,更酷的是,PyCharm 支持 IronPython。 PyCharm 官方下载地址: http://www.jetbrains.com/pycharm/download/ 效果图查看: Sublime Text Sublime Text 具有漂亮的用户界面和强大的功能,例如代码缩略图,Python 的插件,代码段等。还可自定义键绑定,菜单和工具栏。 Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。 Sublime Text 是一个跨平台的编辑器,同时支持 Windows、Linux、Mac OS X等操作系统。 使用Sublime Text 2的插件扩展功能

Most efficient way of setting up a project Pydev PYTHONPATH in Eclipse (Helios)?

这一生的挚爱 提交于 2019-12-29 08:31:47
问题 I want to add all folders in my Pydev project to PYTHONPATH so that I can reap the benefits of easily seeing unused imports etc. To do this I seemingly have to add all folders manually including the subfolders, one by one. Is there any way to add them all at once (recursively) or am I doing this completely wrong? Now I right click the project in the Navigator and select Preferences . From there I go to Pydev-PYTHONPATH and finally I can add the folders. 回答1: Ok, just to give a proper answer,

Run External Python Programs with Eclipse PyDev

本秂侑毒 提交于 2019-12-29 06:56:09
问题 I want to use the refactoring enabled by PyDev but think it is a little ridiculous to create a project folder in my Eclipse workspace for every single little python script I create. I'm able to get refactoring by editing the file in Eclipse using File > Open File... . However, I still have to go to the Terminal to run the file. It would be nice to just run it in Eclipse. I've tried setting up a Run > External Tools > External Tools Configurations... using the Location /Library/Frameworks

PyDev and Django: how to restart dev server?

别等时光非礼了梦想. 提交于 2019-12-28 05:58:10
问题 I'm new to Django. I think I'm making a simple mistake. I launched the dev server with Pydev: RClick on project >> Django >> Custom command >> runserver The server came up, and everything was great. But now I'm trying to stop it, and can't figure out how. I stopped the process in the PyDev console, and closed Eclipse, but web pages are still being served from http://127.0.0.1:8000 . I launched and quit the server from the command line normally: python manage.py runserver But the server is

Unable to launch selenium with python in mac

狂风中的少年 提交于 2019-12-25 18:22:44
问题 I'm facing an issue with selenium with python in Mac OS.. Python 2.7 pydev 3.0 My sample code from selenium import webdriver driver = webdriver.Firefox() driver.get("https://www.formsite.com/") driver.maximize_window() driver.close() Installed selenium using PIP pip install selenium Downloading/unpacking selenium Downloading selenium-2.44.0.tar.gz (2.6MB): 2.6MB downloaded Running setup.py (path:/private/var/folders/qw/ctlmndfd5ts9w2p6v1qc382r0000gn/T/pip_build_bhanusaa/selenium/setup.py) egg

eclipse+pydev can't find cuda library for tensorflow

血红的双手。 提交于 2019-12-25 07:57:01
问题 I am trying to debug some computer vision code (say dcgan) built on top of tensorflow. I installed the tf_0.10 in virtualenv (say, py1) and I use eclipse+pydev as the IDE. The problem is that the debugger can't find the cuda library so I get the error like the following, ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory On the other hand, the code works correctly on ubuntu command line and py1 in the virtualenv has no problem finding the cuda library. In

Configuring Python project in eclipse

大城市里の小女人 提交于 2019-12-25 04:59:05
问题 Actually I'm trying to use a python framework in Eclipse (with PyDev plugin) - the framework was designed in PyCharm IDE where we do some configuration as in the screenshot below: I've tried searching for reference links, but no luck so far. So can someone help me on how to configure Target, Keywords, Options parameter in Eclipse? ******** ADDING SOME ADDITIONAL INFO ******** Herewith, I'm adding some basic snippet as instructed - import pytest @pytest.mark.test def test_method(): print "test

can't get django to work in eclipse + windows

女生的网名这么多〃 提交于 2019-12-25 03:44:39
问题 I've installed django on my windows machine, added the pydev and django plugins for eclipse, create a django project, and ran manage.py createapp to create one app. Now when I run manage.py runserver (via eclipse's "custom command" option") It says Validating models... but when I go to http://localhost:8000 I get no response, as though the server is not running. What am I doing wrong? 回答1: Try running with --noreload to avoid getting two processes. It helps with error output redirection in

LiClipse and execute codes in console shortcuts?

十年热恋 提交于 2019-12-25 02:55:42
问题 For Eclipse PyDev, you can select a few lines of codes, then hit Ctrl+Shift+Enter to execute the codes in interactive console, but with LiClipse, that simply removes the selected codes, I can't find anywhere mentioning this, anyone? 回答1: Well, this is a feature of PyDev, so, it'll only work if you open the .py files with the PyDev editor (i.e.: in preferences > general > editors > file associations check that '*.py' is marked to be opened with the 'Python Editor' -- for PyDev -- and not the