根据上一个问题,我将Selenium更新为2.0.1版但现在我有另一个错误,即使配置文件存在于/tmp/webdriver-py-profilecopy:
File "/home/sultan/Repository/Django/monitor/app/request.py", line 236, in perform
browser = Firefox(profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 46, in __init__
self.binary, timeout),
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 46, in __init__
self.binary.launch_browser(self.profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser
self._wait_until_connectable()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 87, in _wait_until_connectable
raise WebDriverException("Can't load the profile. Profile Dir : %s" % self.profile.path)
selenium.common.exceptions.WebDriverException: Can't load the profile. Profile Dir : /tmp/webdriver-py-profilecopy
怎么了?我该如何解决这个问题?
Django models.ManyToManyField和models.ManyToManyRel?有什么区别?我对这些东西很困惑.
要获取JavaScript中的时间戳,我们使用
var ts = new Date().getTime()
Run Code Online (Sandbox Code Playgroud)
datetime到目前为止,将它转换为Python的正确方法是什么,我使用以下代码
>>> jsts = 1335205804950
>>> dt = datetime.datetime.fromtimestamp(jsts/1000)
>>> dt
datetime.datetime(2012, 4, 24, 0, 30, 4)
Run Code Online (Sandbox Code Playgroud)
我将时间戳除以1000,因为我得到了错误
ValueError Traceback (most recent call last)
1 d = datetime.datetime.fromtimestamp(a)
ValueError: year is out of range
Run Code Online (Sandbox Code Playgroud)
苏丹.
Django 有足够的脚手架吗?
它可能是在新发布的1.3版本中,但我还没有找到它.
如何在admin/build/modules中获取Drupal中的模块列表?
是否有任何参数或选项为Python的subprocess.Popen方法设置超时?
像这样的东西:
subprocess.Popen(['..'], ..., timeout=20) ?
我最近安装了Django-1.5b1.我的系统配置:
当我调用django-admin.py命令时,我收到以下错误
(devel)ninja Django-1.5b1: django-admin.py
Usage: django-admin.py subcommand [options] [args]
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show …Run Code Online (Sandbox Code Playgroud) 我尝试使用字符串作为正则表达式模式但我跟随错误
PHP Warning: preg_match(): Unknown modifier '>' in /Applications/MAMP/htdocs/cruncher/Plugins/wordpress/WPDetect.php on line 22
PHP Warning: preg_match(): Unknown modifier '/' in /Applications/MAMP/htdocs/cruncher/Plugins/wordpress/WPDetect.php on line 22
Run Code Online (Sandbox Code Playgroud)
代码
$str = "<meta name=\"generator\" content=\"WordPress.com\" />"
preg_match("/".$str."/", $content->content)
Run Code Online (Sandbox Code Playgroud)
我也试过使用preg_quote功能,但我遇到了类似的问题.
使它运作的正确方法是什么?
苏丹
Drupal中是否有任何函数,get_module_info('MODULE_NAME')或者我应该解析info文件?
有几个国家(土耳其,蒙古,吉尔吉斯斯坦等),一般男性的名字可能没有中间名,而不是使用像"oglu,uulu"等词.
例如"Michael oglu Bret",意思是"布雷特的迈克尔之子".
我曾经把这种话分开并假设它们作为中间名,所以在过去的一周里,我对我这样做的方式的正确性表示怀疑.
是否有任何标准化或一套如何处理这种名称的规则?
python ×6
django ×3
drupal ×2
php ×2
algorithm ×1
countries ×1
culture ×1
django-1.5 ×1
drupal-6 ×1
firefox ×1
javascript ×1
macos ×1
module ×1
parsing ×1
pipe ×1
popen ×1
preg-match ×1
regex ×1
scaffolding ×1
selenium ×1
subprocess ×1
timeout ×1
timestamp ×1
webdriver ×1