Ciao,
I have this function:
def lockup_info(refer):
info = []
amb = CONN.db..find({"reference": refer}
for a in amb:
print a
How can I pass this value { "$exists": False } and tell python to not consider
it as a string?
var = '{ "$exists": Fals
Il Fri, 22 Jan 2016 21:10:44 +0100, Vlastimil Brom ha scritto:
> 2016-01-22 16:50 GMT+01:00 mg :
>> Il Fri, 22 Jan 2016 15:32:57 +, mg ha scritto:
>>
>>> python 3.4.3
>>>
>>> import re re.search('(ab){2}','abzzabab')
>>> &
Il Fri, 22 Jan 2016 15:32:57 +, mg ha scritto:
> python 3.4.3
>
> import re re.search('(ab){2}','abzzabab')
> <_sre.SRE_Match object; span=(4, 8), match='abab'>
>
>>>> re.findall('(ab){2}','abzzabab')
python 3.4.3
import re
re.search('(ab){2}','abzzabab')
<_sre.SRE_Match object; span=(4, 8), match='abab'>
>>> re.findall('(ab){2}','abzzabab')
['ab']
Why for search() the match is 'abab' and for findall the match is 'ab'?
--
https://mail.python.org/mailman/listinfo/python-list
rusi wrote:
> On Jun 17, 6:05 am, Chris Angelico wrote:
>
>> > Python call becomes. I'd prefer something like:
>>
>> #!/bin/bash
>> for i in 1 2 3 4; do
>> python -c "if True:
> # comfortably indented python code
>
> Thanks. Nice!
You can use bash here document feature, <<-, that strips hea
When make gets to the _ctypes section, I am getting the following in
my output:
building '_ctypes' extension
creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/
Modules/_ctypes
creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/
Modules/_ctypes/libffi
creating bui
VisualStudio2005: Python can be compiled with VisualStudio2005 but a
VisualStudio2005-compiled-Python can not install additional packages.
So, if someone can help me or provides me a solution, I am very
interested ;-)
Martin v. Löwis wrote:
> mg schrieb:
>
>> Unfortunately, distut
Hello,
I try to compile Python and several packages (like Numarray) with Visual
Studio 2005. I downloaded the last version of Python from Subversion,
and project files are provided for Visual Studio 2005. With some few
simple corrections, everything compile and Python run correctly.
Unfortunat
Hello,
First, I installed Python on a traditionnal default linux-x86 platform
(tk.h is located in /usr/include) and I did not meet any problem. I can
write the following instruction without error in my python interpreter:
./configure --prefix=/usr/local/python
make
make install
/usr/local/pyth
Hello,
In a recursive function like the following :
def foo( j ) :
j += 1
while j < n : j = foo( j )
return j
in found that the recursivity is limited (1000 iterations). Then, I have
two questions :
- why this mecanism has been implemented ?
- it is possible to increase or remove (and h
Hi everybody...
We try to white scripts with Pyrhon 2.4 for an acoustic simulation and
we wrote these follow lines :
c = 340
i =j=k= 1
sum_ = 23
table = []
freq = round((c/2*(sum_)**0.5),2)
print freq
table.append([freq,(i,j,k)])
print i,j,k,' freq',freq
for item in table: print item
The prob
Hello
I work on an finite element framework and Python bindings have been
developped.
Actually, we use Boost.Build as build system but we would like to change
it.
We have two kinds of problems. First, the framework is used for generate
pure C++ applications with static libraries ; second, the
John Machin wrote:
>Duncan Booth wrote:
>
>
>>John Machin wrote:
>>
>>
>>
>>
So, my question is: does the Python API containe fonctions like
'get_argc()' and 'get_argv()' ?
>>>If you can't see them in the documentation, they aren't there. If they
>>>aren't the
Wolfram Kraus wrote:
>mg wrote:
>
>
>>Hello,
>>
>>I am writting bindings for a FEM application. In one of my function
>>'initModulename', called when the module is imported, I would like to
>>get the argc and argv arguments used in the main f
Hello,
I am writting bindings for a FEM application. In one of my function
'initModulename', called when the module is imported, I would like to
get the argc and argv arguments used in the main function of Python.
So, my question is: does the Python API containe fonctions like
'get_argc()' and
Tim Roberts wrote:
>Observer <[EMAIL PROTECTED]> wrote:
>
>
>>Hi, im a newbie both to python and this list.
>>I hope someone can help me whith this:
>>
>>I have a directory structure like this:
>>.
>>|-- src
>>| `-- pkg
>>| |-- __init__.py
>>| |-- main.py
>>| `-- spkg1
>>|
First, I compiled Python in DEBUG on Win32 with MSCV.net and the
solution distributed in the Python packages.
Second, I try to compiled NUMARRAY with my python debug :
python_d setup.py build
And the compilation crash with the following message : the file
python25.lib does not exist (it
Hi,
Because of I have patched Python, I would like to create a Windows
installer containing my patched-Python. So, I try to use the option
'bdist_wininst' on the setup.py file distributed by python it is
supported ?
If yes, I have a problem : the run tell me that pyconfig.h does not
exist
Hi,
I try to install two Python environments on my platform: one in release,
the other in debug.
I generate the RELEASE Python environment with the following instructions :
> ./configure --prefix=/usr/local/python --enable-shared
> make
My problem is here : all the source files are comp
Hello,
While trying to compile Python 2.5 from the nighlty CVS image, it raises
the following errors on HP-UX. This disables me the use of HP-UX for
some projects:
Compilation flags:
export CC=aCC
export CFLAGS="-Ae +DD64"
export LDFLAGS="+DD64"
make clean
./configure --prefix=/usr/local/python_c
Hi all,
I have reinstalled my Win32 computer last week and I did an update of
the project PyWin32 to complete my Python installation.
(I have to use sources from CVS for my project !)
So, when I run 'python setup.py' in my PyWin32 directory, I have two
problem : the version indacated in windows.
21 matches
Mail list logo