Rob Williscroft wrote:
AIUI the idea is that you write your 2.x python code (and tests) so
that when they are processed by 2to3.py you get valid python 3.x
code that will pass all its tests.
You then maintain your 2.x code base adding another test where the
code (and tests) is run through
On Mon, 20 Oct 2008 13:54:56 +0800, oyster wrote:
but the pyparsing.py in pyparsing-1.5.1.tar.gz is marked as 2008-10-02 I
think it is good too touch all the files' time up-to-date.
Why? This throws away information, such as when was package/module xy
changed.
Ciao,
Marc
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
feel better and sleep better at night.
So true !
+1 QOTW
--
Sebastian Wiesner a écrit :
At Thu, 16 Oct 2008 18:21:38 +0200 wrote Bruno Desthuilliers
[EMAIL PROTECTED]:
It doesn't look like there's
any way to browse the subversion any more, though.
Doh :(
Is there any way to get this version then ???
svn co
MRAB a écrit :
On Oct 19, 5:47 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Pat a écrit :
(snip)
ip = ip[ :-1 ]
ip =+ '9'
or:
ip = ip[:-1]+9
(snip)
re.sub(r'^(((\d+)\.){3})\d+$', \g19, 192.168.1.1)
'192.168.1.9'
re.sub(r'^(((\d+)\.){3})\d+$', \g19, 192.168.1.100)
'192.168.1.9'
I have a class which I want to save it's data automatically on disc,
when it's destroyed. I have following code:
from cPickle import dump
class __Register(object):
def __init__(self):
self.dict = {}
def __del__(self):
fh = open('aaa', 'w')
dump(self.dict, fh)
Hello!
Intro:
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 used:
sys.stdout = open('/tmp/log','a')
On Mon, 20 Oct 2008 01:12:06 -0700, Митя wrote:
I have a class which I want to save it's data automatically on disc,
when it's destroyed. I have following code:
from cPickle import dump
class __Register(object):
def __init__(self):
self.dict = {}
def __del__(self):
Steven D'Aprano a écrit :
On Sun, 19 Oct 2008 19:03:29 +0200, Bruno Desthuilliers wrote:
Steven D'Aprano a écrit :
(snip)
You can use tabs, or spaces. If you use spaces, you can choose 4
spaces, or 8, or any number,
By all means, make it 4 spaces - that's the standard.
It's *a* standard.
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 i in range(0,10,1)
which is equivalent to:
for (i = 0; i 10; i++)
However, how this C statement will be translated in Python?
for (j = i = 0; i (1 H); i++)
On Oct 20, 10:12 am, Митя [EMAIL PROTECTED] wrote:
But when g_register is being destroyed, dump seems to be already dead,
so I get:
Exception exceptions.TypeError: 'NoneType' object is not callable in
bound method __Register.__del__ of MyWiki.Register.__Register object
at 0x835a74c ignored
On Mon, Oct 20, 2008 at 2:56 AM, Michele [EMAIL PROTECTED] wrote:
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 i in range(0,10,1)
Actually, you want:
for i in range(10):
Since starting at 0 and using a step
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote:
Steven D'Aprano [EMAIL PROTECTED] wrote:
In Linux, config files should go into:
~/.appname/ or /etc/appname/
In Windows (which versions?) then should go into the Documents And
Settings
Martin,
-On [20081007 09:27], Martin v. Löwis ([EMAIL PROTECTED]) wrote:
Within a few weeks, we will release Python 2.5.3. This will be the last
bug fix release of Python 2.5, afterwards, future releases of 2.5 will
only include security fixes, and no binaries (for Windows or OSX) will
be
Митя [EMAIL PROTECTED] writes:
I have a class which I want to save it's data automatically on disc,
when it's destroyed. I have following code:
from cPickle import dump
class __Register(object):
def __init__(self):
self.dict = {}
def __del__(self):
fh =
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 i in range(0,10,1)
Please use xrange for this purpose, especially with larger
iterations. range actually allocates a sequence.
I want to dynamically update a list of elements shown as a checkbox
list. A file is used to store the elements, and elements can be added
and deleted from the list. The trouble is that the window is not
properly updated after deleting/adding items.
I use the Detach()/Destroy() to remove the
On 20 Okt, 07:32, est [EMAIL PROTECTED] wrote:
Personally I call it a serious bug in python
Normally I'd entertain the possibility of bugs in Python, but your
reasoning is a bit thin (in http://bugs.python.org/issue3648): Why
cann't Python just define ascii to range(256)
I do accept that it
Hello,
I have a trouble and I don't know how to solve it. I am working with
molecules and each molecule has a number of atoms. I obtain each atom
spliting the molecule.
Ok. It is fine and I have no problem with it.
The problem is when I have to work with these atoms. These atoms usually
are only
Ross Ridge a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
I can't remember having seen any other standard so far.
I've seen various indentation styles used in examples on this newsgroup.
I meant: in a real-life project.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 19, 4:01 am, sokol [EMAIL PROTECTED] wrote:
I started googling for scheduler and found one in standard library
but ih has the same code as mine (it calls the functions in the
right order and my doesn't, but it still waits too long).
The other schedulers from web are dealing
David C. Ullrich a écrit :
In article [EMAIL PROTECTED],
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
(snip)
Well... How to say.. Is there any chance these people will read anything
*at all* ?
No. That's exactly the point!
Yeps. But I don't think we derive the same conclusions from that
On Oct 20, 10:16 pm, Alfons Nonell-Canals [EMAIL PROTECTED]
wrote:
Hello,
I have a trouble and I don't know how to solve it. I am working with
molecules and each molecule has a number of atoms. I obtain each atom
spliting the molecule.
Ok. It is fine and I have no problem with it.
The
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?
I tried to use atexit and wrote following:
class _Register(object):
def dump(self):
class Registerable(object):
g_register =
Stef Mientki wrote:
Duncan, in windows it's begin to become less common to store settings in
DocsSettings,
because these directories are destroyed by roaming profiles (a big
reason why I can't run Picassa ;-(
It's more common to follow the portable apps approach, store them in the
application
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 project.
So? There's no
Alfons Nonell-Canals wrote:
I have a trouble and I don't know how to solve it. I am working with
molecules and each molecule has a number of atoms. I obtain each atom
spliting the molecule.
Ok. It is fine and I have no problem with it.
The problem is when I have to work with these atoms.
atom = 'C1'
if '1' in atom:
print 'kk'
But, how can I do to identify in '1' all possibilities from 1-9, I
tried:
if '[1-9]', \d,...
You're reaching in the right direction (regexps), so just use
Python's re module:
import re
digit = re.compile(r'\d') # or [0-9]
for test in
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Ross Ridge a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
I can't remember having seen any other standard so far.
I've seen various indentation styles used in examples on this newsgroup.
I meant: in a real-life project.
When I
On 20 Okt, 14:24, Duncan Booth [EMAIL PROTECTED] wrote:
Those were the only two suggestions given for Python projects with tabs as
a coding style. I don't know if the first of these has more than 1
developer, the second lists 7 people as contributors.
So it looks like real-life projects do
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
feel better and
On Sun, 19 Oct 2008 20:50:46 +0200, Stef Mientki wrote:
Duncan, in windows it's begin to become less common to store settings in
DocsSettings,
because these directories are destroyed by roaming profiles (a big
reason why I can't run Picassa ;-(
It's more common to follow the portable apps
On Oct 20, 7:07 am, Peter Otten [EMAIL PROTECTED] wrote:
Alfons Nonell-Canals wrote:
I have a trouble and I don't know how to solve it. I am working with
molecules and each molecule has a number of atoms. I obtain each atom
spliting the molecule.
Ok. It is fine and I have no problem with
Bruno Desthuilliers wrote:
Pat a écrit :
While I can use a for loop looking for a match on a list, I was
wondering if there was a one-liner way.
In particular, one of my RE's looks like this '^somestring$' so I
can't just do this: re.search( '^somestring$', str( mylist ) )
I'm not smart
Bruno Desthuilliers wrote:
Pat a écrit :
I have a regexp in Perl that converts the last digit of an ip address
to '9'. This is a very particular case so I don't want to go off on
a tangent of IP octets.
( my $s = $str ) =~ s/((\d+\.){3})\d+/${1}9/ ;
While I can do this in Python which
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 can use tabs, or spaces. If you use spaces, you can choose 4
spaces, or 8, or any number,
By all
Can you put UTF-8 characters in a dbhash in python 2.5 ?
It fails when I try:
#!/bin/env python
# -*- coding: utf-8 -*-
import dbhash
db = dbhash.open('dbfile.db', 'w')
db[u'smiley'] = u'☺'
db.close()
Do I need to change the bsd db library, or there is no way to
On Oct 20, 6:47 pm, Paul Boddie [EMAIL PROTECTED] wrote:
On 20 Okt, 07:32, est [EMAIL PROTECTED] wrote:
Personally I call it a serious bug in python
Normally I'd entertain the possibility of bugs in Python, but your
reasoning is a bit thin (inhttp://bugs.python.org/issue3648):Why
cann't
By default the
document = xml.dom.minidom.parse(inputFileName.xml)
This will convert all the amp; to
But I want to convert the back to amp;
Is there a module or method in Python?
I know there is such method in PHP, but I am
new in Python.
Thanks!
--
On Mon, 20 Oct 2008 10:20:06 +, Duncan Booth wrote:
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Sun, 19 Oct 2008 15:40:32 +, Duncan Booth wrote:
Steven D'Aprano [EMAIL PROTECTED] wrote:
In Linux, config files should go into:
~/.appname/ or /etc/appname/
In Windows (which
RC wrote:
By default the
document = xml.dom.minidom.parse(inputFileName.xml)
This will convert all the amp; to
But I want to convert the back to amp;
Is there a module or method in Python?
I know there is such method in PHP, but I am
new in Python.
from xml.sax import saxutils
On Oct 20, 1:50 pm, Lie [EMAIL PROTECTED] wrote:
On Oct 19, 4:01 am, sokol [EMAIL PROTECTED] wrote:
I started googling for scheduler and found one in standard library
but ih has the same code as mine (it calls the functions in the
right order and my doesn't, but it still waits too
Ross Ridge a écrit :
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
Yves Dorfsman wrote:
Can you put UTF-8 characters in a dbhash in python 2.5 ?
It fails when I try:
#!/bin/env python
# -*- coding: utf-8 -*-
import dbhash
db = dbhash.open('dbfile.db', 'w')
db[u'smiley'] = u'☺'
db.close()
Do I need to change the
Duncan Booth a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Ross Ridge a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
I can't remember having seen any other standard so far.
I've seen various indentation styles used in examples on this newsgroup.
I meant: in a real-life
Hi
I am trying to use pymssql, and have an issue where by the execute
(not the fetch) is appearing to load all records into memory.
if I execute
con = pymssql.connect(...)
cur = con.cursor()
cur.execute(sql)
rec = cur.fetchone()
if I put in a query which returns a lot of records into sql then
On Oct 20, 5:43 am, Andy [EMAIL PROTECTED] wrote:
I want to dynamically update a list of elements shown as a checkbox
list. A file is used to store the elements, and elements can be added
and deleted from the list. The trouble is that the window is not
properly updated after deleting/adding
I have written chunks of Python code that look this:
new_array = []
for a in array:
if not len( a ):
continue
new_array.append( a )
and...
string =
for r in results:
if not r.startswith( '#' ):
string =+ r
It seems that a list
Pat wrote:
I have written chunks of Python code that look this:
new_array = []
for a in array:
if not len( a ):
continue
new_array.append( a )
new_array = [a for a in array if len(a)]
and...
string =
for r in results:
I am trying to use pymssql, and have an issue where by the execute
(not the fetch) is appearing to load all records into memory.
if I execute
con = pymssql.connect(...)
cur = con.cursor()
cur.execute(sql)
rec = cur.fetchone()
if I put in a query which returns a lot of records into sql
[2] And they are right to do so. Programs that dump config files and
directories, hidden or not, in the top level of the user's home directory
are incredibly rude. It may have been a Unix standard for as long as
there has been a Unix, but it's still the programming equivalent of
coming
Eric Wertman wrote:
I am trying to use pymssql, and have an issue where by the execute
(not the fetch) is appearing to load all records into memory.
if I execute
con = pymssql.connect(...)
cur = con.cursor()
cur.execute(sql)
rec = cur.fetchone()
if I put in a query which returns a lot of
Thanks for your answers!
my g_register is a global register, wich contains all my objects and
lives all the program lifetime. So 'with' is not appliable. Am I
right?
But using atexit sounds to be a good solution
On Oct 20, 1:58 pm, Michele Simionato [EMAIL PROTECTED]
wrote:
On Oct 20,
On 20 Okt, 15:30, est [EMAIL PROTECTED] wrote:
Thanks for the long comment Paul, but it didn't help massive errors in
Python encoding.
IMHO it's even better to output wrong encodings rather than halt the
WHOLE damn program by an exception
I disagree. Maybe I'll now get round to uploading an
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
I can't remember having seen any other standard so far.
I've seen various indentation styles used in examples on this newsgroup.
No one bothers to complain when I indent using tabs, or someone else
uses 2 space indentation.
Митя wrote:
I have a class which I want to save it's data automatically on disc,
when it's destroyed. I have following code:
from cPickle import dump
class __Register(object):
def __init__(self):
self.dict = {}
def __del__(self):
fh = open('aaa', 'w')
just to be sure,
did you try .Update()?
Almar
2008/10/20 Mike Driscoll [EMAIL PROTECTED]:
On Oct 20, 5:43 am, Andy [EMAIL PROTECTED] wrote:
I want to dynamically update a list of elements shown as a checkbox
list. A file is used to store the elements, and elements can be added
and deleted
On Oct 19, 4:01 am, sokol [EMAIL PROTECTED] wrote:
I started googling for scheduler and found one in standard library
but ih has the same code as mine (it calls the functions in the
right order and my doesn't, but it still waits too long).
The other schedulers from web are dealing
On Sun, 19 Oct 2008 07:16:44 -0700, Gandalf wrote:
every time I switch editor all the script indentation get mixed up, and
python start giving me indentation weird errors. indentation also hard
to follow because it invisible unlike brackets { }
is there any solution to this problems?
On Mon, 20 Oct 2008 10:20:03 -0400, Pat wrote:
Finally, if someone could point me to a good tutorial or explain list
compressions I would be forever in your debt.
Think of a for-loop:
for x in (1, 2, 3):
x
Creates x=1, then x=2, then x=3. It doesn't do anything with the x's, but
just
I can't remember having seen any other standard so far.
there is this meme flowing around:
Thus spake the Lord: Thou shalt indent with four spaces. No more, no
less.
Four shall be the number of spaces thou shalt indent, and the number
of thy
indenting shall be four. Eight shalt thou not indent,
Pat a écrit :
Bruno Desthuilliers wrote:
Pat a écrit :
I have a regexp in Perl that converts the last digit of an ip address
to '9'. This is a very particular case so I don't want to go off on
a tangent of IP octets.
( my $s = $str ) =~ s/((\d+\.){3})\d+/${1}9/ ;
While I can do this in
Pat a écrit :
Bruno Desthuilliers wrote:
Pat a écrit :
While I can use a for loop looking for a match on a list, I was
wondering if there was a one-liner way.
In particular, one of my RE's looks like this '^somestring$' so I
can't just do this: re.search( '^somestring$', str( mylist ) )
code
#! /bin/sh
python -c import sys;exec(sys.stdin)
/code
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 solution for it?
On Mon, 20 Oct 2008 06:30:09 -0700, est wrote:
Like I said, str() should NOT throw an exception BY DESIGN, it's a basic
language standard.
int() is also a basic language standard, but it is perfectly acceptable
for int() to raise an exception if you ask it to convert something into
an
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 using
os.path.join.
os.path.join('Pictures', '01.jpg') returns
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, that just increase the size of the program
and also less portable to me. What
On Mon, 20 Oct 2008 13:16:48 +0200, Alfons Nonell-Canals wrote:
Hello,
I have a trouble and I don't know how to solve it. I am working with
molecules and each molecule has a number of atoms. I obtain each atom
spliting the molecule.
Ok. It is fine and I have no problem with it.
The
On Oct 20, 11:46 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 20 Oct 2008 06:30:09 -0700, est wrote:
Like I said, str() should NOT throw an exception BY DESIGN, it's a basic
language standard.
int() is also a basic language standard, but it is perfectly acceptable
Pat a écrit :
I have written chunks of Python code that look this:
new_array = []
for a in array:
if not len( a ):
continue
new_array.append( a )
# à la lisp
new_array = filter(None, array)
# à la haskell
new_array = [a for a in array if a]
NB : all
Steven D'Aprano wrote:
On Mon, 20 Oct 2008 10:20:03 -0400, Pat wrote:
Finally, if someone could point me to a good tutorial or explain list
compressions I would be forever in your debt.
Think of a for-loop:
for x in (1, 2, 3):
x
Creates x=1, then x=2, then x=3. It doesn't do anything
On Sun, 19 Oct 2008 22:32:20 -0700, est wrote:
On Oct 20, 10:48 am, Liang Chen [EMAIL PROTECTED] wrote:
Hope you all had a nice weekend.
I have a question that I hope someone can help me out. I want to run a
Python program that uses Tkinter for the user interface (GUI). The
program allows
On Mon, Oct 20, 2008 at 12:44 PM, est [EMAIL PROTECTED] wrote:
On Oct 20, 11:46 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 20 Oct 2008 06:30:09 -0700, est wrote:
Like I said, str() should NOT throw an exception BY DESIGN, it's a
basic
language standard.
Diez B. Roggisch wrote:
Pat wrote:
I have written chunks of Python code that look this:
new_array = []
for a in array:
if not len( a ):
continue
new_array.append( a )
new_array = [a for a in array if len(a)]
and...
string =
for r in
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 i in range(0,10,1)
Please use xrange for this purpose, especially
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 stdio.h
bool DEBUG;
void dprint(char *msg)
{
if (DEBUG){
Derek Martin wrote:
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 stdio.h
bool DEBUG;
void dprint(char
bryan rasmussen wrote:
As per the subject, anyone know of a version of fcgi.py out there
somewhere that works on windows yet.
They might have ported a version for Python 2.6. Versions = 2.5 didn't
have a socket.fromfd() on Windows, so FCGI and SCGI wouldn't work.
j
--
Lie Ryan [EMAIL PROTECTED] wrote:
That's the job of regular expression: 'import re'
numbered_atom = re.compile('[A-Z][a-z]?[0-9]+')
if numbered_atom.match('C10'):
# this is a numbered atom
if numbered_atom.match('C'):
# this WON'T match
read more about regular expression on the
Liang Chen wrote:
Hope you all had a nice weekend.
I have a question that I hope someone can help me out. I want to run a Python
program that uses Tkinter for the user interface (GUI). The program allows me
to type Chinese characters, but neverthelss is unable to show them up on
screen. The
On Oct 20, 12:19 pm, Derek Martin [EMAIL PROTECTED] wrote:
snip
I'm specifically trying to avoid having to create a debug object and
pass it around... All modules should have visibility into the state of
whether DEBUG is turned on or off, and be able to use dprint(). Can
Python do this?
I
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
import Image
pic =
I am attempting to use python-ldap to connect to our company ldap server. I
have downloaded and installed python-ldap 2.3.2 on my Ubuntu system and have
been working through the LDAP Programming with Python documentation. I am
confused because the documentation states that After an LDAP object
.
--
http://mail.python.org/mailman/listinfo/python-list
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 one
Peter Wang a écrit :
code
#! /bin/sh
python -c import sys;exec(sys.stdin)
/code
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
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
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
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 apps
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 :
(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 ?-)
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)screwed
up syntax
...do something with temp
return
I know that the syntax within the filter statement is wrong.
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.
temp =
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
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 =
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 stdio.h
bool DEBUG;
void dprint(char *msg)
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 =
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 change.
Is
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
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:
1 - 100 of 211 matches
Mail list logo