En Mon, 20 Oct 2008 06:15:34 -0200, Gatis <[EMAIL PROTECTED]> escribió:
I wrote script that in case of some event takes picture using usb
webcam [Creative Live! Cam Vista IM (VF0420)] and command line utility
v4lctl (from package xawtv).
Problem1:
To catch error and info messages from script I u
Piotr Sobolewski wrote:
> Hello,
> I have such program:
>
> import time
> import thread
> def f():
> global lock
> while True:
> lock.acquire()
> print thread.get_ident()
> time.sleep(1)
> lock.release()
> lock=thread.allocate_lock()
> thread.start_new_thre
On Mon, Oct 20, 2008 at 10:12 PM, Piotr Sobolewski
<[EMAIL PROTECTED]> wrote:
> Hello,
> I have such program:
>
> import time
> import thread
> def f():
> global lock
> while True:
> lock.acquire()
> print thread.get_ident()
> time.sleep(1)
> lock.release()
>
you can try jungle ( http://www.suda-chen.biz/?page_id=21 ) also
> -- 已转发邮件 --
> From: MRAB <[EMAIL PROTECTED]>
> To: python-list@python.org
> Date: Mon, 20 Oct 2008 15:47:55 -0700 (PDT)
> Subject: Re: Creating single .exe file without py2exe and pyinstaller
> On Oct 20, 4:48 pm, L
gaurav kashyap <[EMAIL PROTECTED]> writes:
> How to run the makefile using some python function.
A makefile is not a program to be run; it contains a declarative
(*not* procedural) data set for the ‘make’ program. You need to invoke
the ‘make’ command, tell it which file to read, and specify whic
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 20, 2008 at 10:32 PM, gaurav kashyap
<[EMAIL PROTECTED]> wrote:
> Hi all,
> I am using Link-41b parser in my program.
> The windows version of it has an .exe file that can be executed using
> os.system command
> On Linux version,I have a makefile.
>
> so my question is:
> How to run the
On Tue, 21 Oct 2008 11:56:30 +0700, Alex Gusarov wrote:
> Here I want to get all Table instances of current module and put them
> into dictionary by names, but I don't know how I can get all variables
> of current module in the end of this module. Please, give me a hint.
>>> import math
>>> dir(m
> If you mean detecting abnormal shutdown after the fact, as opposed to
> catching it while happening, you could create an empty temp file when
> the program starts and delete it upon normal termination.
I have a server application, and I want to take some actions *before*
the shutdown. I assumed
En Fri, 17 Oct 2008 20:03:44 -0300, Aaron "Castironpi" Brady
<[EMAIL PROTECTED]> escribió:
On Oct 16, 9:10 am, Hongtian <[EMAIL PROTECTED]> wrote:
Not exactly.
In my C/C++ application, I have following function or flow:
void func1()
{
call PyFunc(struct Tdemo, struct &Tdemo1);
}
I
Steven D'Aprano wrote:
On Mon, 20 Oct 2008 14:25:17 -0400, Terry Reedy wrote:
If I type *hypothetical* code for a post, *I* have to
type all the spaces, and I often use 2 per indent level. If I type in
IDLE, *it* adds the spaces (4 per indent) automatically.
But of course you would never pos
Hi all,
I am using Link-41b parser in my program.
The windows version of it has an .exe file that can be executed using
os.system command
On Linux version,I have a makefile.
so my question is:
How to run the makefile using some python function.
Thanks
--
http://mail.python.org/mailman/listinfo/py
Tim Golden wrote:
k3xji wrote:
Hi all,
Is there anyway to detect abnormal interpreter shutdown like (closing
from task manager, power shutdown of the PC..etc)?
"Task Manager" suggests you're using Windows, on which basis
you've got a few options open to you, but fundamentally if
someone pulls
En Sat, 18 Oct 2008 16:03:19 -0300, Brendan Miller <[EMAIL PROTECTED]>
escribió:
How would I implement something equivalent to java's package private in
python?
Say if I have
package/__init__.py
package/utility_module.py
and utility_module.py is an implementation detail subject to change.
Hello,
I have such program:
import time
import thread
def f():
global lock
while True:
lock.acquire()
print thread.get_ident()
time.sleep(1)
lock.release()
lock=thread.allocate_lock()
thread.start_new_thread(f,())
thread.start_new_thread(f,())
time.sleep(60)
Hello, I have a following module and in its end I want to initalize
collection of tables:
Module:
from sqlalchemy import *
metadata = MetaData()
calendars_table = Table('calendars', metadata,
Column('id', Integer, primary_key=True),
Column('title', Unicode(50)),
Column('color', Unic
On Mon, Oct 20, 2008 at 10:28:15AM -0700, Gary Herron wrote:
> > The other weird behavior was, once I changed the value of DEBUG,
> > dprint() started to behave oddly. No matter what I passed as an
> > argument (and no matter what I set the value of DEBUG to be), it
> > started printing the exact
In message
<[EMAIL PROTECTED]>, Aaron
Brady wrote:
> If Python was a car, I think it would be a hybrid...
I hope not. They're only good in the city, a waste of time once you get over
50 km/h.
> Plus there's nothing about sarcasm in the Zen.
That's why it's the Zen. :)
--
http://mail.python.org
In message <[EMAIL PROTECTED]>, Steven D'Aprano
wrote:
> Here's Jamie Zawinski:
> http://www.jwz.org/doc/tabs-vs-spaces.html
>
> "On defaultly-configured Unix systems, and on ancient dumb terminals and
> teletypes, the tradition has been for the TAB character to mean ``move to
> the right until t
On Mon, Oct 20, 2008 at 10:43:55PM +, Steven D'Aprano wrote:
> All of this is just splitting hairs,
Indeed... :)
> because you don't really mean Python is making a copy of the name
> 'DEBUG', but of the *data* that DEBUG refers to, namely the object
> True.
Well, as long as we're having se
Sumitava Mukherjee <[EMAIL PROTECTED]> wrote:
>Hi all,
>I am a novice programmer in Python.
>Please could you explain me the results (regarding logical operators).
>
>I get this:
>
print bool('God' and 'Devil')
>True
>
>[This is ok because (any) string is True, so; (True and True) gives
>True
On Mon, 20 Oct 2008 18:41:23 -0700, Sumitava Mukherjee wrote:
> What is python doing when we type in ('God' and 'Devil') or key in (01
> and 10) ?
There are two important things you need to know:
(1) All Python objects have a boolean context.
(2) Python's boolean operators are short-circuit op
En Mon, 20 Oct 2008 10:01:07 -0200, Митя <[EMAIL PROTECTED]> escribió:
Thank you for your answers!
my g_register is a global object, and it lives all the program's
lifetime, so 'with' is not appliable. Am I right?
Why not? You could use a with statement (or try/finally) around your main
ent
On Tue, 21 Oct 2008 11:22:56 +0800, Peter Wang wrote:
> Nathan Seese <[EMAIL PROTECTED]> writes:
>
>>> #! /bin/sh
>>> python -c "import sys;exec(sys.stdin)"
>>
>> I know this isn't your question, but I think you could write that more
>> cleanly with:
>>
>> #!/usr/bin/python
>> import sys
>> exec(
Nathan Seese <[EMAIL PROTECTED]> writes:
>> #! /bin/sh
>> python -c "import sys;exec(sys.stdin)"
>
> I know this isn't your question, but I think you could write that more
> cleanly with:
>
> #!/usr/bin/python
> import sys
> exec(sys.stdin)
thanks.
What's the difference between this and mine?
I
On Oct 20, 2:14 pm, Sid <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am tryin to copy an image into my own data structure(a sort of 2d array
> for further FFT). I've banged my head over the code for a couple of hours
> now. The simplified version of my problem is below.
>
> #-Code-
Hi
I have 2 log files, each with a timestamp on the first 2 fields.
However, when I do a
awk '/ / {print $1,$2}' logs/x.log
on a log file,
it is complicated by the fact that I also get other non timestamp
column,
2008-10-20 15:00:06,113
2008-10-20 15:00:06,113
2008-10-20 14:59:48,828
javax.naming
En Sun, 19 Oct 2008 01:45:16 -0200, Abah Joseph <[EMAIL PROTECTED]>
escribió:
I have written a small application of about 40-45 lines which is about
4KB,
so I want to create a single .exe file from it, using py2exe it created
unnecessary files, that just increase the size of the program and
On Oct 20, 9:41 pm, Sumitava Mukherjee <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am a novice programmer in Python.
> Please could you explain me the results (regarding logical operators).
>
> I get this:
>
> >>> print bool('God' and 'Devil')
>
> True
>
> [This is ok because (any) string is True,
Not
"Roman Yakovenko" <[EMAIL PROTECTED]> wrote:
> * Algorightm, which defines what virtual functions should be redefined
> was improved.
Always a handy feature, much better than using an algowrongm ;)
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 20, 3:46 pm, oyster <[EMAIL PROTECTED]> wrote:
> I don't remember its name very clear, it may be 'jingle' or not
> this program runs on windows and can compile a python program into exe
> file without gcc
I haven't heard of 'jingle' but there are a number of tools for
achieving this:
http:
On Oct 20, 8:41 pm, Sumitava Mukherjee <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am a novice programmer in Python.
> Please could you explain me the results (regarding logical operators).
>
> I get this:
>
> >>> print bool('God' and 'Devil')
>
> True
>
> [This is ok because (any) string is True, so;
Hugh wrote:
TextField callbacks... I want to be able to generate a callback when a
textfield is modified. It doesn't appear to have an "action" member...
I haven't got around to adding any actions to text fields
yet.
In the meantime, you could put a key_down method on the
containing window th
On Mon, 20 Oct 2008 18:55:46 -0400, J. Clifford Dyer wrote:
> On Mon, 2008-10-20 at 13:29 +, Steven D'Aprano wrote:
>> On Mon, 20 Oct 2008 11:01:19 +0200, Bruno Desthuilliers wrote:
>>
>> > Steven D'Aprano a écrit :
>> >> On Sun, 19 Oct 2008 19:03:29 +0200, Bruno Desthuilliers wrote:
>> >>
>
Hi all,
I am a novice programmer in Python.
Please could you explain me the results (regarding logical operators).
I get this:
>>> print bool('God' and 'Devil')
True
[This is ok because (any) string is True, so; (True and True) gives
True]
>>> print('God' and 'Devil')
Devil
[This is what I d
> I don't remember its name very clear, it may be 'jingle' or not this
> program runs on windows and can compile a python program into exe file
> without gcc
> it has no webspace but is announced on the author's blog when I find it
> some times ago.
> I can't find the link now. I there anybody else
> #! /bin/sh
> python -c "import sys;exec(sys.stdin)"
I know this isn't your question, but I think you could write that more
cleanly with:
#!/usr/bin/python
import sys
exec(sys.stdin)
--
http://mail.python.org/mailman/listinfo/python-list
En Sat, 18 Oct 2008 05:52:04 -0300, Stef Mientki <[EMAIL PROTECTED]>
escribió:
I'm running Python 2.5 and want my programs to run at least under
Windows and Linux (preferable also Mac).
So I guess I should always use relative paths.
From most modules I can call a global function,
that shou
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> Peter Wang a �crit :
>>
>> #! /bin/sh
>> python -c "import sys;exec(sys.stdin)"
>>
>>
>> Emacs has a function `shell-command-on-region', which takes region as
>> input for the evaluator (script above), and output its result. I have
>> tried and f
In message
<[EMAIL PROTECTED]>,
Gandalf wrote:
> every time I switch editor all the script indentation get mixed up ...
Mixed up in what way? Are you configuring your editors to do automatic
space/tab conversion in inconsistent ways?
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-10-20, Stef Mientki <[EMAIL PROTECTED]> wrote:
>> I don't think I'm feeding the troll, but - ever took a look at
>> PyQt?
>
> I wanted to go from Delphi to a free / open source
> environment, for both open source and commercial applications.
>
> So the Qt license stopped me from looking an
In message <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Still has some things that I would dearly love in python... like "skinned"
> gui applications.
That's a function of the GUI toolkit, not of the language. Python doesn't
make you use any GUI toolkit, nor does it prevent you from using any
On 2008-10-20, Eric Wertman <[EMAIL PROTECTED]> wrote:
> I'm not advocating some kind of licensing for programmers. I
> just really wish there was some reasonable gauge that could be
> used to evaluate information professionals.
It would be nice if there was, but there isn't. AFAICT,
certificat
In message <[EMAIL PROTECTED]>, Steven D'Aprano
wrote:
> And 75% [1] of average Windows users will either delete the file, move it
> to a more convenient[2] location, or edit the file name to remove the dot.
Doesn't seem very likely to me. Experienced Dimdows users would well know
that stuffing a
The bartender said I have to talk. Actually, she didn't.
Python's a darned good comp. language. Versatile, elegant, refined.
The Pythoneers on the newsgroup are half-way decent, too. Attentive,
judicious.
I feel like there's a "but", but that's probably my own traumatic past
personal life. B
In message <[EMAIL PROTECTED]>, Steven D'Aprano
wrote:
> Do you really think there are Linux or Mac systems with a C: drive?
And what about files on Dimdows systems kept on a drive other than C?
> This whole question is based on the ludicrous assumption that general
> file system paths can be pl
In message <[EMAIL PROTECTED]>, Ross Ridge wrote:
> However, the normal place to store settings on Windows is in the registry.
Which becomes a single point of failure for the whole system.
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>, Stef
Mientki wrote:
> I (again) wonder what's the perfect way to store, OS-independent,
> filepaths ?
URLs beginning file://.
--
http://mail.python.org/mailman/listinfo/python-list
sokol wrote:
What was a surprise to me was that python sched.py makes the same
mistake as I did in my first version.
The sched module is *not* designed for multithreading. It
assumes that the thread waiting for events is the only one
putting events into the queue, so it's impossible for an
eve
Terry Reedy <[EMAIL PROTECTED]> wrote:
>Yes there is. If I type *hypothetical* code for a post, *I* have to
>type all the spaces, and I often use 2 per indent level. If I type in
>IDLE, *it* adds the spaces (4 per indent) automatically.
Hmm... I have doubt then how much it really can be *the*
On Oct 20, 3:08 pm, [EMAIL PROTECTED] (Ville M.
Vainio) wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> > STDOUT is for *normal* program outputs. Debug informations,
> > warnings, and all verbosity should go to STDERR.
>
> Actually, stderr is for errors, by convention. It's rather impoli
On Mon, 2008-10-20 at 13:29 +, Steven D'Aprano wrote:
> On Mon, 20 Oct 2008 11:01:19 +0200, Bruno Desthuilliers wrote:
>
> > Steven D'Aprano a écrit :
> >> On Sun, 19 Oct 2008 19:03:29 +0200, Bruno Desthuilliers wrote:
> >>
> >>> Steven D'Aprano a écrit :
> >>>
> >>> (snip)
> >>>
> You c
Ville M. Vainio wrote:
Stef Mientki <[EMAIL PROTECTED]> writes:
Sorry but for GUI design, Python is pre-historic ;-)
Time to show the "don't feed the troll" sign, I guess.
Even without the smiley, I'm convinced of my statement.
cheers,
I don't think I'm feeding the
> Do you really think there are Linux or Mac systems with a C: drive?
>
> This whole question is based on the ludicrous assumption that general
> file system paths can be platform-independent. That's a bit like trying
> to write code that is programming language-independent.
That's sort of where
Stef Mientki <[EMAIL PROTECTED]> writes:
> >> Sorry but for GUI design, Python is pre-historic ;-)
> >
> > Time to show the "don't feed the troll" sign, I guess.
> Even without the smiley, I'm convinced of my statement.
> cheers,
I don't think I'm feeding the troll, but - ever took a look at PyQ
On Mon, 20 Oct 2008 23:56:22 +0200, Stef Mientki wrote:
> Bruno Desthuilliers wrote:
>> Eric Wertman a écrit :
> I (again) wonder what's the perfect way to store, OS-independent,
> filepaths ?
>>>
>>> I'm in agreement that perfect probably isn't applicable. If I were
>>> doing this myself
On Oct 20, 4:48 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> Tino Wildenhain wrote:
> > Hi,
>
> > Abah Joseph wrote:
> >> I have written a small application of about 40-45 lines which is about
> >> 4KB, so I want to create a single .exe file from it, using py2exe it
> >> created unnecessary files,
On Oct 20, 4:47 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> Marcin201 wrote:
> > Is there an built-in functionality in python to convert Windows paths
> > to Unix paths? I am running into problems when creating data files on
> > Windows and the running them on a Unix platform. I create paths usi
On Mon, 20 Oct 2008 17:09:25 -0400, Derek Martin wrote:
> On Mon, Oct 20, 2008 at 07:29:16PM +0200, Bruno Desthuilliers wrote:
>> This should have been:
>>
>> fprintf(STDERR, "DEBUG: %s", msg);
>
> No, it shouldn't have. If I turn on debugging, I want the debug
> messages to go to stdout,
Werner F. Bruhin wrote:
I am trying to use subprocess - it basically works but.
command = 'ping ' + '-n '+ str(count) + ' -l ' +
str(size) + ' ' + str(node)
print command
p = subprocess.Popen(command, stdin=subprocess.PIPE,
> I would hate to live in a world where you had to have three years of
> graduate professional training to write a for-loop for pay, or where
> scientists and mathematicians were prohibited from writing code (practicing
> software) without a license. Or where someone who just wanted to practice
>
On Mon, 20 Oct 2008 12:24:14 -0700, Robocop wrote:
> oops! Sorry about that, i should have just copied my code directly. I
> actually did specify an int in range:
>> > year = '2008'
>> > month = '09'
>> > limit = '31'
>> > for i in range(1,int(limit)):
>
> The code is currently failing due to t
On Mon, 20 Oct 2008 17:01:13 +, Lie Ryan wrote:
> On Mon, 20 Oct 2008 12:34:11 +0200, Hrvoje Niksic wrote:
>
>> Michele <[EMAIL PROTECTED]> writes:
>>
>>> Hi there,
>>> I'm relative new to Python and I discovered that there's one single
>>> way to cycle over an integer variable with for: for
Stef Mientki wrote:
hello,
I've syntax error which I totally don't understand:
## mainfile :
import test_upframe2
if __name__ == '__main__':
var1 = 33
code = 'print var1 + 3 \n'
test_upframe2.Do_Something_In_Parent_NameSpace ( code )
### file = test_upframe2 :
class Do_Some
On Mon, 20 Oct 2008 14:25:17 -0400, Terry Reedy wrote:
> If I type *hypothetical* code for a post, *I* have to
> type all the spaces, and I often use 2 per indent level. If I type in
> IDLE, *it* adds the spaces (4 per indent) automatically.
But of course you would never post code without testin
Eric Wertman wrote:
Given the way that medical/legal licensing is used to stifle competition,
prevent innovation, and keep people from earning a living delivering simple
services that people need at prices they can afford, 'more like' would have
to be done very carefully.
To draw an analogy...
Bruno Desthuilliers wrote:
Eric Wertman a écrit :
I (again) wonder what's the perfect way to store, OS-independent,
filepaths ?
I'm in agreement that perfect probably isn't applicable. If I were
doing this myself, I might store the information in a tuple:
base = 'some root structure ('/' or
Bruno Desthuilliers wrote:
Stef Mientki a écrit :
Lawrence D'Oliveiro wrote:
In message <[EMAIL PROTECTED]>, Dotan
Cohen wrote:
I often see mention of SMBs that either want to upgrade their Windows
installations, or move to Linux, but cannot because of inhouse VB
apps.
Probably best
On Oct 13, 2:19 pm, Cousin Stanley <[EMAIL PROTECTED]> wrote:
> > I'm hesitating to change news readers
> >
>
> You might try the python-based XPN news client at
>
> http://xpn.altervista.org/index-en.html
>
> I've used it for the past few years
> and like it very much .
Lie Ryan wrote:
(which might be the more typical case). And I think range will be an
iterator in the future, imitating the behavior of xrange. So it doesn't
really matter anyway.
In 3.0, range is a class and range(arg) is a re-iterable instance of
that class.
>>> a = range(10,2,-3)
>>> a
r
Eric Wertman a écrit :
Given the way that medical/legal licensing is used to stifle competition,
prevent innovation, and keep people from earning a living delivering simple
services that people need at prices they can afford, 'more like' would have
to be done very carefully.
To draw an analogy.
On Mon, Oct 20, 2008 at 07:29:16PM +0200, Bruno Desthuilliers wrote:
> This should have been:
>
> fprintf(STDERR, "DEBUG: %s", msg);
No, it shouldn't have. If I turn on debugging, I want the debug
messages to go to stdout, so that they can be captured along with the
output (of which there i
I am trying to use subprocess - it basically works but.
command = 'ping ' + '-n '+ str(count) + ' -l ' +
str(size) + ' ' + str(node)
print command
p = subprocess.Popen(command, stdin=subprocess.PIPE,
date = "%s-%s-%s" % (year, month, i) is exactly what i'd like to do.
The Table object will just be a mysql table, and the filter function
will yield a list filtered for those dates.
For my purposes the limit variable will not be static, depending on
which day of the month it is i will only want it
hello,
I've syntax error which I totally don't understand:
## mainfile :
import test_upframe2
if __name__ == '__main__':
var1 = 33
code = 'print var1 + 3 \n'
test_upframe2.Do_Something_In_Parent_NameSpace ( code )
### file = test_upframe2 :
class Do_Something_In_Parent_NameS
> Given the way that medical/legal licensing is used to stifle competition,
> prevent innovation, and keep people from earning a living delivering simple
> services that people need at prices they can afford, 'more like' would have
> to be done very carefully.
To draw an analogy... imagine, if you
est <[EMAIL PROTECTED]> writes:
> IMHO it's even better to output wrong encodings rather than halt the
> WHOLE damn program by an exception
I can't agree with this. The correct thing to do in the face of
ambiguity is for Python to refuse to guess.
> When debugging encoding problems, the solution
Hello,
I am not certain if I understand the .enable() and .disable() methods
correctly, but it seems like they should make a profiling object stop
collecting profiling information. When I run the below python program,
I am seeing results that I am not expecting. If anyone has insight
into why my e
Robocop wrote:
oops! Sorry about that, i should have just copied my code directly.
I actually did specify an int in range:
year = '2008'
month = '09'
limit = '31'
for i in range(1,int(limit)):
The code is currently failing due to the syntax in the filter,
particularly the section "date = yea
Eric Wertman wrote:
On Mon, Oct 20, 2008 at 3:52 AM, olive <[EMAIL PROTECTED]> wrote:
Certification prooves you're an idiot who needs to spend money to work
for another idiot who doesn't know enough about programming to know if
they hire competent programmers and need an idiot paper to make them
Ville M. Vainio a écrit :
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
STDOUT is for *normal* program outputs. Debug informations,
warnings, and all verbosity should go to STDERR.
Actually, stderr is for errors, by convention. It's rather impolite to
dump trivial debug info to stderr, whic
The PyGUI website specified this place as the place for general
discussion about it, so here goes
First off - thanks for something that is so straightforward to get
running on OSX... I've been migrating some relatively straight-forward
scripts-with-GUIs from Linux to OSX, and, while I used FLT
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> STDOUT is for *normal* program outputs. Debug informations,
> warnings, and all verbosity should go to STDERR.
Actually, stderr is for errors, by convention. It's rather impolite to
dump trivial debug info to stderr, which often "alerts" the user
Hello!
I'm pleased to announce the 1.0 release of Py++.
What is Py++?
=
Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.
Where is Py++?
==
Site: http://language-binding.net/pyplusplus/pyplusplus.html
Download: http://language-binding
Hello!
I'm pleased to announce the 1.0 release of pygccxml.
What is pygccxml?
===
"...The purpose of the GCC-XML extension is to generate an XML description of a
C++ program from GCC's internal representation. "
-- Introduction to GCC-XML
The purpose of pygccxml is to read a generated
On Sat, Oct 18, 2008 at 12:03 PM, Brendan Miller <[EMAIL PROTECTED]> wrote:
> How would I implement something equivalent to java's package private in
> python?
>
> Say if I have
>
> package/__init__.py
> package/utility_module.py
>
> and utility_module.py is an implementation detail subject to chan
Eric Wertman a écrit :
I (again) wonder what's the perfect way to store, OS-independent,
filepaths ?
I'm in agreement that perfect probably isn't applicable. If I were
doing this myself, I might store the information in a tuple:
base = 'some root structure ('/' or 'C')
make it "C:\"
path
Derek Martin a écrit :
I'd like to know if it's possible to code something in Python which
would be equivalent to the following C:
[Assume bool is typedef'd to int, and TRUE and FALSE are #defined to 1
and 0, respectively]
debug.c
#include
bool DEBUG;
void dprint(char *msg)
{
oops! Sorry about that, i should have just copied my code directly.
I actually did specify an int in range:
> > year = '2008'
> > month = '09'
> > limit = '31'
> > for i in range(1,int(limit)):
The code is currently failing due to the syntax in the filter,
particularly the section "date = year'-
k3xji wrote:
Hi all,
Is there anyway to detect abnormal interpreter shutdown like (closing
from task manager, power shutdown of the PC..etc)?
"Task Manager" suggests you're using Windows, on which basis
you've got a few options open to you, but fundamentally if
someone pulls the plug on the PC
On Mon, Oct 20, 2008 at 12:08 PM, Robocop <[EMAIL PROTECTED]> wrote:
> Is it possible to do something like this syntactically:
>
> year = '2008'
> month = '09'
> limit = '31'
> for i in range(1,limit):
This previous line will fail. range() takes numbers, not strings.
Change 'limit' to an int.
>
Is it possible to do something like this syntactically:
year = '2008'
month = '09'
limit = '31'
for i in range(1,limit):
temp = Table.objects.filter(date = year'-'month'-'i)
Stef Mientki a écrit :
(snip)
I'm very satisfied with Python, and must say it's much more beautiful
language than Delphi, seen over the full width of programming.
Although both languages are Object Oriented,
I think you can lowercase those two last words - it's not a religion,
you know ?-)
Hi all,
Is there anyway to detect abnormal interpreter shutdown like (closing
from task manager, power shutdown of the PC..etc)?
Regards,
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki a écrit :
Lawrence D'Oliveiro wrote:
In message <[EMAIL PROTECTED]>, Dotan
Cohen wrote:
I often see mention of SMBs that either want to upgrade their Windows
installations, or move to Linux, but cannot because of inhouse VB
apps.
Probably best to leave those legacy VB app
Eric Wertman a écrit :
On Mon, Oct 20, 2008 at 3:52 AM, olive <[EMAIL PROTECTED]> wrote:
Certification prooves you're an idiot who needs to spend money to work
for another idiot who doesn't know enough about programming to know if
they hire competent programmers and need an idiot paper to make t
Ross Ridge wrote:
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
I can't remember having seen any other "standard" so far.
Ross Ridge a écrit :
I've seen various indentation styles used in examples on this newsgroup.
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
I meant: in a real-life
Peter Wang a écrit :
#! /bin/sh
python -c "import sys;exec(sys.stdin)"
Emacs has a function `shell-command-on-region', which takes region as
input for the evaluator (script above), and output its result. I have
tried and found it works, is there any problems for this, or any other
better solut
I have two python "applications" (more like scripts, they're only
about 80 lines each) that are dumbed down http-servers: They accept a
connection, reads everything in the socket untill "\r\n\r\n" and then
responds with "HTTP/1.1 200 OK\r\n\r\nHello World!" and then closes
the connection.
There is
.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 182 matches
Mail list logo