but i can invoke it in eclipse, what's wrong?
the script refered to another python script in eclipse project.
f:\project\src\a.py
f:\project\src\lib\b.py
there is such lines in a.py
from lib import b
i can invoke a.py very well in eclipse
but failed when using python f:\project\src\a.py, what's
i have heard that function invocation in python is expensive, but make
lots of functions are a good design habit in many other languages, so
is there any principle when writing python function?
for example, how many lines should form a function?
--
http://mail.python.org/mailman/listinfo/python-li
anybody here have build it correctly?
how to make a msi file just as the official site did?
is there any detailed tutorial online?
--
http://mail.python.org/mailman/listinfo/python-list
the warning is just as follows
E:\Tools>pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.6.4.tar.gz (1.9Mb): 1.9Mb downloaded
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*.*' found under directory '
do
this package is already in the site-packages directory, but i cannot
import it , it's really confusing ...
--
http://mail.python.org/mailman/listinfo/python-list
all things works well without --relocatable option, the error info
when using --relocatable option is as follows :
F:\PythonEnv\djangoEnv>virtualenv f:\PythonEnv\djangoEnv2 --relocatable
PYTHONHOME is set. You *must* activate the virtualenv before using it
The environment doesn't have a file f:\P
it needs read registry, but the python i used is extracted from .zip,
so there is no record in the registry,
what should i do in order to install easy_install for my python environment?
--
http://mail.python.org/mailman/listinfo/python-list
what is the advantage of Django over RoR:)
--
http://mail.python.org/mailman/listinfo/python-list
I have created a python environment using virtualenv, but when i want
to import such environment to PyDev, error just appears,
it tells there should be a Libs dir, but there is no Libs DIr in the
virtual envronment created using virtualenv, what should i do if
i want to use this virtual environment
from common.URLTool import URLTool
tool = URLTool()
Traceback (most recent call last):
File "E:\workspace\url\test.py", line 7, in ?
from common.URLTool import URLTool
ImportError: No module named common.URLTool
URLTools is a class write by myself, it works well ,but cannot be
imported in t
if a list L is composed with tuple consists of two elements, that is
L = [(a1, b1), (a2, b2) ... (an, bn)]
is there any simple way to divide this list into two separate lists , such that
L1 = [a1, a2... an]
L2=[b1,b2 ... bn]
i do not want to use loop, any methods to make this done?
--
http://mai
The subnet behind my router is 192.168.1.0/24, my pc ip is 192.168.1.9,
the server written with python is hosted on 192.168.1.3 on port 1033,
i can connect to this server from my pc
But cannot connect to this server when outside of this subnet? why?
I have made port translate on router, that is 1
env create by virtualenv will refer to the main env, how did it find
the main env, is there any configuration files, if yes, where is it?
2011/8/6 smith jack :
> At first i have a python environment, after using virtualenv test
> command, a new environment named test is created, in that dir
At first i have a python environment, after using virtualenv test
command, a new environment named test is created, in that directory
have some of the executable commands
such as python.exe, so can i program without the main installation of python?
--
http://mail.python.org/mailman/listinfo/python
There are so many choice to do the same thing, so is there any special
advantage Django brings to user?
--
http://mail.python.org/mailman/listinfo/python-list
the source code is as follows
x={}
x['a'] = 11
x['c'] = 19
x['b'] = 13
print x
tmp = sorted(x.items(), key = lambda x:x[0])# increase order by
default, if i want to have a descending order, what should i do?
# after sorted is called, a list will be generated, and the hash list
x is not chang
if it's for a single character, this should be very easy, such as
c{m,n} the occurrence of c is between m and n,
if i want to define the occurrence of (.*?) how should make it
done? ((.*?)){1,3} seems not work, any method to define repeat
string using python regex?
--
http://mail.python.org/
I am using pydev plugin in eclipse, all things works just as well
but now i have confronted with a confusing problem, that is i can
import a module write by myself successfully, but when i try to run
this program,
error just shows up, what's wrong?
the directory structure is as follows:
src
org
I start many threads in order to make the work done, when the
concurrent number is set to 300, all thing just works fine, but when
the number is set to 350 or higher, error just comes out? what's wrong
? the error info is just as follows: failed to start .
I am confused, does this have something
from threading import Thread
def calc(start, end):
total = 0;
for i in range(start, end + 1):
total += i;
print '--result:', total
return total
t = Thread(target=calc, args=(1,100))
t.start()
I have run this program for many times,and the result is alw
20 matches
Mail list logo