* Tim Roberts:
Dave Angel wrote:
There's no real reason parts of an exe cannot be exported, same as a
dll. They are in fact the same structure. And in fact many other files
in the Windows environment are also the same structure, from fonts to ocx's
This is a bit off-topic, but your explan
On Mar 18, 1:58 pm, królewna wrote:
> The problem is simple: I have multiple threads within one program. At
> least 2 threads have to have access to in-memory sqlite database. It is
> not possible to pass sqlite objects to those threads because an
> exception is rised:
>
> ProgrammingError: SQLite
Plug? Any evidence to say that? As long as this thread concerned, is there any
answer more closed to the topic "C++ code generation" than mine?
I think Stefan was telling you, in a nice way, to stop spamming every thread
about code generation with a plug for your project.
2010/3/17 CHEN Guan
Hellmut Weber wrote:
> your hack is exactly what I was looking for.
> It permits to configure my logging messages as I want, e.g. using
> different colors for different classes of messages.
>
> I do not yet understand all details WHY it is working but suppose some
> study of the logging module wi
I have ipython installed via apt. I can go to the command line and
type 'ipython' and it will work. If I try to install ipython to a
virtualenv, I get this:
$ pip install -E env/ ipython
Requirement already satisfied: ipython in /usr/share/pyshared
Installing collected packages: ipython
Successful
On Fri, Mar 19, 2010 at 4:05 AM, nbv4 wrote:
> I have ipython installed via apt. I can go to the command line and
> type 'ipython' and it will work. If I try to install ipython to a
> virtualenv, I get this:
>
> $ pip install -E env/ ipython
> Requirement already satisfied: ipython in /usr/share/p
I am using pexpect module in python
I would like to know how I can use exp_continue here.
what is the alternative of exp_continue of perl/tcl in pexpect.
--
http://mail.python.org/mailman/listinfo/python-list
Hello
Can you help me figure out why I am getting this compile error with my
program. The error occurs right at the bottom of my code & I have
commented where it occurs.
The error is:
[QUOTE]Expected an indented block[/QUOTE]
[CODE]"""
*Stock Data Builder*
Algorithm:
- Search website f
Jimbo a écrit :
Hello
Can you help me figure out why I am getting this compile error with my
program. The error occurs right at the bottom of my code & I have
commented where it occurs.
The error is:
[QUOTE]Expected an indented block[/QUOTE]
[CODE]
(snip)
# Main program loop
def main():
Jimbo wrote:
> Can you help me figure out why I am getting this compile error with my
> program. The error occurs right at the bottom of my code & I have
> commented where it occurs.
[...]
> def main():
> programEnd = False;
>
> while (programEnd == False):
> #ERROR HERE?? - Error=
Hellmut Weber wrote:
Am 11.03.2010 12:14, schrieb Peter Otten:
Hellmut Weber wrote:
Logging works very well giving the filename and line number of the
point
where it is called. As long as I use the loggers directly.
BUT when I have to wrap the logger call in some other function, I
always
ge
I want to write a function which imports modules the first time, and reloads
them afterwards, but I am running into problems with global variables and exec.
I will include a full script, but let me elaborate first.
Essentially what you need is
def import_or_reload():
"""assume we want to load
W dniu 18.03.2010 15:49, DreiJane pisze:
Principally sqlite connections (sqlite3 objects in the C-API) can be
used over multiple threads - and connections to :memory: make no
difference. There are additional parameters to open() giving fine-
tuned control. And apsw is promising a true reflection
W dniu 18.03.2010 23:06, Aahz pisze:
You probably need to serialize access to the database through one thread.
sqlite3 objects are not pickable so it's not proper way.
--
best regards
princess
--
http://mail.python.org/mailman/listinfo/python-list
W dniu 19.03.2010 08:20, Expo pisze:
You can put the SQLite database into a Singleton class and use a
semaphore to serialize the access to methods which writes to the
database.
I've tried this out but doesnt work. Still gives an error like:
ProgrammingError: SQLite objects created in a thread
On 19/03/2010 10:56, królewna wrote:
W dniu 18.03.2010 23:06, Aahz pisze:
You probably need to serialize access to the database through one thread.
sqlite3 objects are not pickable so it's not proper way.
Is it possible you've misunderstood the meaning of the word "serialize"
here? What's b
W dniu 19.03.2010 12:10, Tim Golden pisze:
Is it possible you've misunderstood the meaning of the word "serialize"
here?
It's not possible, it just happened :)
What's being suggested isn't serialising (ie marshalling, pickling)
the data; rather, serialising the *access*, ie pushing all db requ
Hi all,
Im trying to get a daemon up and running but have been tripping on every
stone along the way, this last one however i cant manage to get by.
versions:
Python 2.5.2
python-daemon-1.5.5
Debian Linux 2.6.26-2-686
Some of the problems ive run into:
import daemon
with daemon.DaemonContext():
Ben Finney wrote:
> djc writes:
>
>> I have a simple program to read a text (.csv) file
>
> Could you please:
>
> * simplify it further: make a minimal version that demonstrates the
> difference you're seeing, without any extraneous stuff that doesn't
> appear to affect the result.
>
> * m
Peyman Askari wrote:
I want to write a function which imports modules the first time, and reloads
them afterwards, but I am running into problems with global variables and exec.
I will include a full script, but let me elaborate first.
Essentially what you need is
def import_or_reload():
"
Jean-Michel Pichavant wrote:
> Hellmut Weber wrote:
>> Am 11.03.2010 12:14, schrieb Peter Otten:
>>> Hellmut Weber wrote:
>>>
Logging works very well giving the filename and line number of the
point
where it is called. As long as I use the loggers directly.
BUT when I have to w
djc writes:
> Ben Finney wrote:
> > Could you please:
> >
> > * simplify it further: make a minimal version that demonstrates the
> > difference you're seeing, without any extraneous stuff that doesn't
> > appear to affect the result.
> >
> > * make it complete: the code you've shown doesn'
In my case I call a funcion and I would like to get the line
where the function returned.
for instance:
def my_function():
return 3
So I would like to get line 2(in C) somehow.
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
Jean-Michel Pichavant wrote:
Hellmut Weber wrote:
Am 11.03.2010 12:14, schrieb Peter Otten:
Hellmut Weber wrote:
Logging works very well giving the filename and line number of the
point
where it is called. As long as I use the loggers directly.
BUT
I have found the solution. I dont know why in python documentation there
is not a single word about this option. I've found it in pysqlite doc
site. So we have to add a new keyword argument to connection function
and we will be able to create cursors out of it in different thread. So use:
sqli
moerchendiser2k3, 19.03.2010 14:12:
In my case I call a funcion and I would like to get the line
where the function returned.
for instance:
def my_function():
return 3
So I would like to get line 2(in C) somehow.
Ok, so you're looking for the C-level trace function in CPython, I guess.
Can anyone explain what is pkg-config for?ANd how can I find it in
Windows?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I submitted this earlier today, but I was not clear enough, so I am
posting it again.
I am running a simulator written in python. The simulator has a small
TextView (actually a SourceView) widget which lets the user writes
scripts, and when they are satisfied they can execute that s
Ben Finney wrote:
> What happens, then, when you make a smaller program that deals with only
> one file?
>
> What happens when you make a smaller program that only reads the file,
> and doesn't write any? Or a different program that only writes a file,
> and doesn't read any?
>
> It's these sort
Greetings!
Please forgive me if im posting this to the wrong group.
I'm new to Python, learning Python3 from the O'rielly "Learning
Python" book. Reading
about operator overloading, specifically __getitem__. I put together
a small bit of code to
do some experimenting and threw in a timer so i
Reload is effectively deprecated in 2.x and removed in 3.x, so I
recommend not using it.
Deleting an entry from sys.modules should force recreation with an
import. Just make sure all other references are also gone so that the
module object can be deleted.
The following shows how to import by
Kevin Adams wrote:
> Greetings!
>
> Please forgive me if im posting this to the wrong group.
>
> I'm new to Python, learning Python3 from the O'rielly "Learning
> Python" book. Reading
> about operator overloading, specifically __getitem__. I put together
> a small bit of code to
> do some exp
On Fri, Mar 19, 2010 at 6:42 PM, Kevin Adams wrote:
> Greetings!
>
> Please forgive me if im posting this to the wrong group.
>
> I'm new to Python, learning Python3 from the O'rielly "Learning
> Python" book. Reading
> about operator overloading, specifically __getitem__. I put together
> a sm
On 3/19/2010 1:42 PM, Kevin Adams wrote:
Please forgive me if im posting this to the wrong group.
Just the right place. I would suggest a more informative title in the
future though. 'Problem with print and sleep.', for instance.
I'm new to Python, learning Python3 from the O'rielly "Lear
On Mar 19, 2:21 pm, Terry Reedy wrote:
> On 3/19/2010 1:42 PM, Kevin Adams wrote:
>
> > Please forgive me if im posting this to the wrong group.
>
> Just the right place. I would suggest a more informative title in the
> future though. 'Problem with print and sleep.', for instance.
>
>
>
> > I'm n
Hello,
I need some buffers, which are beeing concatenated an then send via
the socket() function.
My problem is that create_string_buffer() creates a buffer which ist
one byte too long (for a \0 char). But when I concatenate some of
these buffers to a long one to be transfered, the extra byte
On 3/19/2010 2:17 PM, Steve Holden wrote:
Kevin Adams wrote:
Greetings!
Please forgive me if im posting this to the wrong group.
I'm new to Python, learning Python3 from the O'rielly "Learning
Python" book. Reading
about operator overloading, specifically __getitem__. I put together
a small
On 3/19/2010 11:46 AM Hans Müller said...
Hello,
I need some buffers, which are beeing concatenated an then send via the
socket() function.
My problem is that create_string_buffer() creates a buffer which ist one
byte too long (for a \0 char). But when I concatenate some of these
buffers to a lo
"Sexy Girls" "Sexy Indian Girls" "Sexy USA Girls" "Sexy RUSSIAN Girls"
"Sexy PAKISTANI Girls" "Sexy CHINESE Girls" "Sexy THAI Girls" "Sexy
JAPANESE Girls" "Sexy KOREAN Girls" "Sexy MODEL Girls" ON
www.sexyandpretty-girls.blogspot.com "Sexy Girls" "Sexy
Indian Girls" "Sexy USA Girls" "S
*grumble* *grumble* *grumble*
oops, sorry ... my mistake
it turns out that i misspelled one of the values and left another one out.
here's the working script now for anyone who may care:
import urllib
import urllib2
url = 'http://imagebin.org/index.php?page=search'
values = {'search_for' : 'bla
En Fri, 19 Mar 2010 12:32:32 -0300, Johny escribió:
Can anyone explain what is pkg-config for?ANd how can I find it in
Windows?
Go to http://www.google.com/
Enter "pkg-config windows" (without quotes) in the input box.
Press the Search button.
You'll get this site at the top, or near it:
htt
got another question for yall wonderful minds; how can i upload a file to a
server that uses a POST form?
here's the link to the form that i'd like to be able to upload a file:
http://imagebin.org/index.php?page=add
tks
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 19 Mar 2010 14:18:17 -0300, djc escribió:
Ben Finney wrote:
What happens, then, when you make a smaller program that deals with only
one file?
What happens when you make a smaller program that only reads the file,
and doesn't write any? Or a different program that only writes a file,
On behalf of the Python community, I'm happy to announce the availability of
Python 2.6.5 final. This is the latest production-ready version in the Python
2.6 series.
Python 2.6.5 fixes dozens of issues in the core, built-in modules, libraries,
and documentation since Python 2.6.4 was released ba
En Fri, 19 Mar 2010 19:02:25 -0300, Brandon C
escribió:
got another question for yall wonderful minds; how can i upload a file
to a
server that uses a POST form?
here's the link to the form that i'd like to be able to upload a file:
http://imagebin.org/index.php?page=add
Unfortunately it
"Gabriel Genellina" writes:
> Ok. Your test program is too large to determine what's going on. Try
> to determine first *which* part is slow:
Right. This is done by the diagnostic technique of writing *new*,
minimal, complete programs that exercise each piece of the functionality
separately.
Yo
Steve Holden wrote:
> Andrej Mitrovic wrote:
>> On Mar 17, 6:41 pm, Andrej Mitrovic
>> wrote:
>>> Hi,
>>>
>>> What happened to the sidebar on the left of the documentation website?
>>> It seems to be gone:
>>>
>>> http://docs.python.org/py3k/index.html
>>>
>>> I found it quite useful since I can q
Le Fri, 19 Mar 2010 17:18:17 +, djc a écrit :
>
> changing
> with open(filename, 'rU') as tabfile: to
> with codecs.open(filename, 'rU', 'utf-8', 'backslashreplace') as
> tabfile:
>
> and
> with open(outfile, 'wt') as out_part: to
> with codecs.open(outfile, 'w', 'utf-8') as out_part:
>
> ca
Hi!
This might be more of a personal-preference question than anything,
but here goes: when is it appropriate for a function to take a list or
tuple as input, and when should it allow a varying number of
arguments? It seems as though the two are always interchangeable. For
a simple example...
def
En Fri, 19 Mar 2010 14:09:09 -0300, Peter Peyman Puk
escribió:
I am running a simulator written in python. The simulator has a small
TextView (actually a SourceView) widget which lets the user writes
scripts, and when they are satisfied they can execute that script to get
results. For ar
En Wed, 17 Mar 2010 09:42:06 -0300, Pascal Chambon
escribió:
traceback functions indeed allow the manipulation of exception
tracebacks,
but the root problem is that anyway, since that traceback is incomplete,
your "traceback.format_exc().splitlines()" will only provide frames for
callee (do
Hi,
I have a common question about locks:
class SetPointer
{
private:
void *ptr;
MY_LOCK lock;
public:
void SetPointer(void *p)
{
Lock(this->lock);
this->ptr = p;
}
void *GetPointer()
{
Loc
Yes, the user is able to set a file which contains a function that
does what the user wants.
But in a case, I expect a special return value of this function.
So, I need to tell him, in which file/line the error occured,
otherwise he dont know
where to look.
Imagine he set 20 files, and all of the
moerchendiser2k3 writes:
> I have a common question about locks:
You'd be best to ask in a forum related to the language you're using.
This (‘comp.lang.python’) is a forum for users of the Python language.
--
\ “If you can do no good, at least do no harm.” —_Slapstick_, |
`\
On Fri, Mar 19, 2010 at 6:58 PM, moerchendiser2k3
wrote:
>
> Thanks a lot!! Bye, moerchendiser2k3
This is the **Python** mailinglist/newsgroup; and your question isn't
about Python.
The C++ one is over there:
http://groups.google.com/group/comp.lang.c++.moderated/topics
Regards,
Chris
--
http
moerchendiser2k3 wrote:
Hi,
I have a common question about locks:
class SetPointer
{
private:
void *ptr;
MY_LOCK lock;
public:
void SetPointer(void *p)
{
Lock(this->lock);
this->ptr = p;
}
void *GetPointer()
Hello
I am trying to grab some numbers from a string containing HTML text.
Can you suggest any good functions that I could use to do this? What
would be the easiest way to extract the following numbers from this
string...
My String has this layout & I have commented what I want to grab:
[CODE] ""
En Fri, 19 Mar 2010 23:31:23 -0300, MRAB
escribió:
moerchendiser2k3 wrote:
class SetPointer
{
private:
void *ptr;
MY_LOCK lock;
public:
void SetPointer(void *p)
{
Lock(this->lock);
this->ptr = p;
}
3. You're lockin
En Sat, 20 Mar 2010 00:04:08 -0300, Jimbo escribió:
I am trying to grab some numbers from a string containing HTML text.
Can you suggest any good functions that I could use to do this? What
would be the easiest way to extract the following numbers from this
string...
My String has this layout
On Fri, 19 Mar 2010 17:20:31 -0700, Spencer Pearson wrote:
> Hi!
>
> This might be more of a personal-preference question than anything, but
> here goes: when is it appropriate for a function to take a list or tuple
> as input, and when should it allow a varying number of arguments?
That depend
Gabriel Genellina wrote:
En Fri, 19 Mar 2010 23:31:23 -0300, MRAB
escribió:
moerchendiser2k3 wrote:
class SetPointer
{
private:
void *ptr;
MY_LOCK lock;
public:
void SetPointer(void *p)
{
Lock(this->lock);
this->ptr = p;
}
3. You're locking, but nev
* MRAB:
Gabriel Genellina wrote:
En Fri, 19 Mar 2010 23:31:23 -0300, MRAB
escribió:
moerchendiser2k3 wrote:
class SetPointer
{
private:
void *ptr;
MY_LOCK lock;
public:
void SetPointer(void *p)
{
Lock(this->lock);
this->ptr = p;
}
3. You're locking
In article ,
wrote:
>
>We've decided to build a re-usable *general purpose* PY2EXE "runtime"
>that can be shared by a number of scripts vs. distributing a monolithic
>EXE for each of our scripts.
It's not clear what the purpose of this is. You can build several
scripts against the same py2exe b
On Fri, Mar 19, 2010 at 10:18 PM, Naeem wrote:
> "EURO GIRLS" "MISS EUROPE" "MISS FRENCH" "FRENCH" "PRETTY GIRLS" "SEXY
> FRENCH GIRLS" on www.sexyandpretty-girls.blogspot.com "SEXY
> RUSSIAN GIRLS" "SEXY GREEK GIRLS" "SEXY DUTCH GIRLS" "SEXY UK GIRLS"
> "SEXY HOLLYWOOD GIRLS" "SEXY BOLLYWO
I have two reported bugs in the bug tracker waiting on tests:
http://bugs.python.org/issue8128
http://bugs.python.org/issue4037
Are there any guidelines for writing tests for the standard library and
language? I've googled, but found nothing useful: lots of guidelines for
writing tests, and of
On Sat, 20 Mar 2010 06:23:14 +, Steven D'Aprano wrote:
> Are there any guidelines for writing tests for the standard library and
> language? I've googled, but found nothing useful: lots of guidelines for
> writing tests, and of course I've read PEP 8, but I'm not sure if there
> are convention
66 matches
Mail list logo