Hi, all.
I now really like to program with Python, even though I'm a newbie. I
have difficulty in solving the following problem.
$ python
Traceback (most recent call last):
File "x.py", line 6, in ?
import calendar, time
File "time.py", line 5, in ?
now = time.time()
TypeError: 'modul
cheeky wrote:
> Hi, all.
>
> I now really like to program with Python, even though I'm a newbie. I
> have difficulty in solving the following problem.
>
> $ python
> Traceback (most recent call last):
> File "x.py", line 6, in ?
> import calendar, time
> File "time.py", line 5, in ?
> n
faulkner írta:
> my boss has a similar problem with his home internet connection in
> general. he traced it back to his router, which was in the first couple
> generations of routers. how old are the routers you tested this on?
> aside from upgrading them, if they are the problem, i can suggest a
>
bruce wrote:
> hi.
>
> within python, what's the best way to automatically spawn an app as a given
> user/group.
>
> i'm testing an app, and i'm going to need to assign the app to a given
> user/group, as well as assign it certain access rights/modes (rwx) i then
> want to copy the test app to a gi
On 2006-07-31 14:37:26, Bruno Desthuilliers wrote:
>> So, if mod_python provides the same functionality, it's not the main
>> reason why Python developers use application servers while PHP users
>> still program with page codes in /htdocs.
>>
>> Why do PHP users stick to that old way of things? B
dbc.odbc("test1_Data")
cursor = conn.cursor()
# data type in mdb is as follows: application -> Text, Run_Date ->
Date, Run_dateYMD -> #number, status -> Script
cursor.execute("INSERT INTO local_cmgenadm (Application,Run_Date,
Run_DateYMD,status) values (\
Is it possible to have a static variable in Python -
a local variable in a function that retains its value.
For example, suppose I have:
def set_bit (bit_index, bit_value):
static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
bits [bit_index] = bit_value
print "\tBit Array
Nice package ElementTree is but sadly it doesn't have a pretty print,
well, guess I'll have to do it myself, if you have one already can you
please give it to me? thanks :)
Stefan Behnel wrote:
> c00i90wn wrote:
> > Hey, I'm having a problem with the xml.dom.minidom package, I want to
> > generate
Michael Yanowitz schreef:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>bits [bit
Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>bits [bit_index
I am making a web app, made up of many modules
that all need access to some important data, like
the current session data, cookies, navigation history,
post/get variables, etc.
I decided to go with the 'Borg' idea, by assigning the
__dict__ of an object to a class variable so that each
instantiati
jean-michel bain-cornu wrote:
>Take care to use os.sep
This is an important point. You should read up on the os.path module to
make sure you are doing things in a platform independent way, for
example, its better to use:
os.path.join('my', 'favorite', 'dir')
than
"\\".join(['my', 'favor
tac-tics:
> If you declare bits in set_bit() as "global bits = ...", it will create
> it as a global variable without you having to declare it outside of the
> function. Just be careful about name conflicts.
Are you sure?
def fun():
global x = 10
fun()
print x
Bye,
bearophile
--
http://mai
thanks for all your answers
yomgui
yomgui wrote:
>
> Hi,
>
> I have a list of data (type A)
> my list can includes element of type A or a lists,
> these list can includes element of type A or a lists, and so on ...
>
> is there a simple way to obtain a single list of all the elemets
> of type
[EMAIL PROTECTED] wrote:
> Philippe Martin wrote:
> > Yes, I came here for the "algorithm" question, not the code result.
>
> To turn BCD x to binary integer y,
>
> set y to zero
> for each nibble n of x:
> y = (((y shifted left 2) + y) shifted left 1) + n
Yeah yeah yeah
i.e. y = y * 10 +
I try to write simple midlet in java to connect with my server which
monitors processes in my PC. I've written almost everything and now
I've spend 4 days trying to set up a connection between them. Without
ssl everything works fine.
Here is my fragment of server program:
def verify_cb(conn, cert,
On Mon, 2006-07-31 at 15:21, Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
On 2006-07-31 15:00:15, Bruno Desthuilliers wrote:
> In fact, the real question IMHO is: what would MySQL advantage over
> PostgreSQL be ?-)
A few years ago I did some research, and the result was that while
PostgreSQL was claimed to have more features and a better design, the
reports of databas
[EMAIL PROTECTED] wrote:
> tac-tics:
>> If you declare bits in set_bit() as "global bits = ...", it will create
>> it as a global variable without you having to declare it outside of the
>> function. Just be careful about name conflicts.
>
> Are you sure?
>
> def fun():
> global x = 10
> fun(
Roel Schroeven a écrit :
> Michael Yanowitz schreef:
>
>> Is it possible to have a static variable in Python - a local
>> variable in a function that retains its value.
>>
(snip)
>
> You could do it by defining static_bits as a keyword parameter with a
> default value:
>
(snip)
> It might be
On Mon, 2006-07-31 at 17:12 -0300, Gerhard Fiedler wrote:
> On 2006-07-31 15:00:15, Bruno Desthuilliers wrote:
>
> > In fact, the real question IMHO is: what would MySQL advantage over
> > PostgreSQL be ?-)
>
> A few years ago I did some research, and the result was that while
> PostgreSQL was c
On Mon, 2006-07-31 at 15:21 -0400, Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Michael Yanowitz a écrit :
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>bits [bi
On Mon, 2006-07-31 at 13:02 -0700, Cliff Wells wrote:
> @attrs ( bits = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] )
Also, IMO, it's a bit more readable to write:
bits = [ 0 for i in range ( 16 ) ]
which avoids the necessity of counting the zeros to know how many there
are.
Regards,
C
On Mon, 2006-07-31 at 13:37 -0700, Cliff Wells wrote:
> On Mon, 2006-07-31 at 13:02 -0700, Cliff Wells wrote:
>
>
> > @attrs ( bits = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] )
>
> Also, IMO, it's a bit more readable to write:
>
> bits = [ 0 for i in range ( 16 ) ]
Or even:
bits = [
On Mon, 2006-07-31 at 15:21 -0400, Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
On 2006-07-31 17:28:00, Cliff Wells wrote:
>> I assume you don't agree... :)
>
> I certainly don't. [...]
> Also, saying "a few years ago I did some research" in software terms is
> pretty much equivalent to saying "I don't know".
Exactly. So what's your point with this comment?
I stated what
Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>bits [bit_index
So seems the best approach would be a MVC model rather than server
scripting? Currently our site is built with a closed source hypertext
preprocessor much like PHP. So it would be easier for us to script
another site, but if we would gain performance via a MVC model, then
that's what we need.
I
Philippe Martin wrote:
> Paul Rubin wrote:
>
> > Philippe Martin <[EMAIL PROTECTED]> writes:
> >> I actually need numbers much larger than 32 bits.
***NOW*** you tell us, after all the stuffing about re 32 bits.
> >
> > What is the max size hex number you need? What is the application if
> > yo
> But of course:
>
> >>> def fun():
> global x = 10
>
> SyntaxError: invalid syntax
> >>>
global x
x = 10
Close enough ^^;
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2006-07-31 at 17:58 -0300, Gerhard Fiedler wrote:
> On 2006-07-31 17:28:00, Cliff Wells wrote:
>
> >> I assume you don't agree... :)
> >
> > I certainly don't. [...]
>
> > Also, saying "a few years ago I did some research" in software terms is
> > pretty much equivalent to saying "I don
Tobiah:
>From the standpoint of implementation, I don't see much of a difference
unless you are specifically interested in the more limited functionality
of a module (vs. a class instance). If you aren't, then you can simply
instantiate your borg class and then insert it into sys.modules early in
Just spoke with my department and looks like we still want to go with a
server scripting method. Although MVC may be better fit, for the sake
of the learning curve, we want to use a PSP style method.
So as of now we are looking at using FreeBSD, MySQL, and some form of
Python that will allow us t
n_dateYMD -> #number, status -> Script
>
> cursor.execute("INSERT INTO local_cmgenadm (Application,Run_Date,
> Run_DateYMD,status) values (\'MyApp1\',\'%s\', \'20060731\' ,
> \'Good\')")%mytime
1. Why do you think you need all those \ ch
On Mon, 2006-07-31 at 14:40 -0700, northband wrote:
> Just spoke with my department and looks like we still want to go with a
> server scripting method. Although MVC may be better fit, for the sake
> of the learning curve, we want to use a PSP style method.
I'm with the others who suggest using a
Thanks a lot, hove managed to get it working:
opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1))
Ben
On Mon, 2006-07-31 at 12:33 -0400, Chris Lambacher wrote:
> On Mon, Jul 31, 2006 at 02:43:36PM +0100, Ben Edwards wrote:
> > Have been experimenting with HTTP stuff in python 2.4 an
Makes sense, I will follow your advice. Sounds like more time invest
upfront will equal time saved over the long run. I am defitely
interested in proxy caching and load balancing. Which do you
recommend? I have used #Pound while working for a university.
-Adam
Cliff Wells wrote:
> On Mon, 20
John Machin wrote:
> So why don't you get a freely available "bignum" package, throw away
> the bits you don' t want, and just compile it and use it, instead of
> writing your own bug-ridden (see below) routines? Oh yeah, the bignum
> package might use "long" and you think that you don't have acce
Gerhard Fiedler a écrit :
> On 2006-07-31 15:00:15, Bruno Desthuilliers wrote:
>
>
>>In fact, the real question IMHO is: what would MySQL advantage over
>>PostgreSQL be ?-)
>
>
> A few years ago I did some research, and the result was that while
> PostgreSQL was claimed to have more features a
northband schrieb:
> So seems the best approach would be a MVC model rather than server
> scripting? Currently our site is built with a closed source hypertext
> preprocessor much like PHP. So it would be easier for us to script
> another site, but if we would gain performance via a MVC model, th
northband a écrit :
> So seems the best approach would be a MVC model rather than server
> scripting?
This is still "server-scripting" - at least since on the server-side and
is done with something frequently labelled as a "script language" !-)
> Currently our site is built with a closed sourc
Hi, I am looking for an ELF format reader written in python. Does anyone know if it exists?H.
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
>> or mxODBC
>> [very good but not free].
I love mxODBC. It's free for noncommercial use.
http://www.egenix.com/files/python/mxODBC.html
rd
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2006-07-31 at 15:06 -0700, northband wrote:
> Makes sense, I will follow your advice. Sounds like more time invest
> upfront will equal time saved over the long run. I am defitely
> interested in proxy caching and load balancing. Which do you
> recommend? I have used #Pound while workin
Sorry forgot a few answers/comments:
John Machin wrote:
> SHOULD BE >=
>currently add([6, 6], [4, 4] -> [10, 10]
True, thanks
> *** try - 10 instead of % 10
> If the first operand is > 19, you have a bug!
> This might save a few CPU cycles on your smartcard
can it ? each array value will be
northband a écrit :
> Just spoke with my department and looks like we still want to go with a
> server scripting method. Although MVC may be better fit, for the sake
> of the learning curve, we want to use a PSP style method.
I really don't think the learning curve will be a problem. We learned
Philippe Martin wrote:
> John Machin wrote:
>
> > So why don't you get a freely available "bignum" package, throw away
> > the bits you don' t want, and just compile it and use it, instead of
> > writing your own bug-ridden (see below) routines? Oh yeah, the bignum
> > package might use "long" and
I'm writing a set of modules to monitor remote system services, and I'm
having a problem running my test scripts. When I pass the scripts into
python, like so:
--
$ PYTHONPATH="${TARGET_DIR}" python test.py
--
I get an ImportError:
--
Traceback (most recent call last):
File "./test.py", line
Linux can let you do more in Python and this comes from my personal
exprience. Ubuntu Dapper should let you install drivers easily for
wireless...a little bit tweaking might be required but its worth the
effort. Python and Ubuntu rock...go fot it.
[EMAIL PROTECTED] wrote:
> Okay, once-upon-a-time
This is an automated response.
Thank you for contacting the Technical Support team at The MathWorks Ltd. A
technical support representative will be contacting you within 1 business day.
The following information will help us in responding to your request. If you
have already provided the info
> I'd never recommend dual-boot for anything!
> Hardware is cheap, time and trouble is expensive.
Dual-booting if so easy and helpful, I have always found it to be
extremely useful.
You might have a bad experience but I have my laptop and desktop both
running dual boot successfully for 4 and a ha
This is an automated response.
Thank you for contacting the Technical Support team at The MathWorks Ltd. A
technical support representative will be contacting you within 1 business day.
The following information will help us in responding to your request. If you
have already provided the info
Assuming your setting the target directory to the overwatch folder, and you are
starting the interactive session in your home directory, this is what is
happening. The folder containing your package must be in the python path, not
the folder itself. Try "PYTHONPATH=/home/directory python test.py
BartlebyScrivener wrote:
> John Machin wrote:
>
> >> or mxODBC
> >> [very good but not free].
>
> I love mxODBC. It's free for noncommercial use.
>
I was presuming that the OP was mucking about with Access only because
he was so constrained by his job :-)
--
http://mail.python.org/mailman/listi
John Machin wrote:
> Have you actually tried it? Do you mean it barfs on the word "long"
> [meaning that it's not an ANSI-compliant C compiler], or that "long" is
> only 16 bits?
:-) if the documentation tells me there is no 32 bit support, why should I
not believe it ?
> because (1) [like I sa
Jordan R McCoy wrote:
> If this isn't the case, what are you using for TARGET_DIR?
${TARGET_DIR} = /home/blinks/projects/overwatch/target/lib/python
I've started the interactive session from several different
directories, and never had a problem.
My make output (note the second item in sys.path):
Philippe Martin wrote:
> Sorry forgot a few answers/comments:
>
> John Machin wrote:
> > SHOULD BE >=
> >currently add([6, 6], [4, 4] -> [10, 10]
>
> True, thanks
>
> > *** try - 10 instead of % 10
> > If the first operand is > 19, you have a bug!
> > This might save a few CPU cycles on your s
(if anyone still uses cgilib, in the presence of Django, TG, et al.)...
I tried out a simple CGI Python script this week, and was a bit annoyed at
the repetitive ,,, etc. opening and closing tags for each
request handler method. So I wrote a decorator to handle this junk. It's
posted on the Pyth
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> (if anyone still uses cgilib, in the presence of Django, TG, et al.)...
>
> I tried out a simple CGI Python script this week, and was a bit annoyed at
> the repetitive ,,, etc. opening and closing tags for
each
> request h
I must have missed reading something important about naming conventions.
I have found that if I have a python module where I have an identifier named
with a beginning underscore that I cannot use from module import * to make
that name available in another module.
for example,
module A
_myvar = '
I am trying to use PIL and when building it, PIL fails to find my jpeg
library. I am using a python 2.4.3 that I build myself on Suse linux 9.3. I
do have the following jpeg libraries:
rpm -qa | grep jpeg
jpeg-6b-738
libjpeg-32bit-9.3-7
libjpeg-6.2.0-738
yet, when building PIL I get:
python set
On Mon, 2006-07-31 at 14:03 +0100, Ben Edwards wrote:
> Am going through Chapter 9 - HTTP Web Services in dive into Python. It
> uses the following:
>
> data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read()
>
> The page no longer exists, can anyone recommend an alternative page to
David Bear wrote:
> I must have missed reading something important about naming conventions.
>
> I have found that if I have a python module where I have an identifier named
> with a beginning underscore that I cannot use from module import * to make
> that name available in another module.
>
> f
On Mon, 2006-07-31 at 11:15 -0700, Al in Dallas wrote:
> I made the mistake of creating an instance of a widget and assigning it
> to a name I'd already used. Now, if I use root.children or
> root.slaves(), I can see the "lost" widget, but can I do anything else
> with the string of numbers that sh
David Bear wrote:
> I must have missed reading something important about naming conventions.
>
> I have found that if I have a python module where I have an identifier named
> with a beginning underscore that I cannot use from module import * to make
> that name available in another module.
>
> fo
I'm creating an RPG for experience and practice. I've finished a
character creation module and I'm trying to figure out how to get the
file I/O to work.
I've read through the python newsgroup and it appears that shelve
probably isn't the best option for various reasons. This lead me to
try messi
crystalattice wrote:
> I'm creating an RPG for experience and practice. I've finished a
> character creation module and I'm trying to figure out how to get the
> file I/O to work.
>
> I've read through the python newsgroup and it appears that shelve
> probably isn't the best option for various rea
I built python 2.4.2 for suse linux 9.3. I configured it to be a separate
instance of python from the version packaged with suse.
Now when I start it I get an error:
python
Python 2.4.2 (#4, Jul 27 2006, 14:34:30)
[GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "
Philippe, please! The suspense is killing me. What's the cpu!?
For the love of God, what's the CPU?
I-can't-take-it-anymore-it's-such-a-simple-question-ingly yours,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
I only have a passing acquaintance with Python and I need to modify some
existing code. This code is going to get called with 10GB of data so it
needs to be fairly fast.
http://cvs2svn.tigris.org/ is code for converting a CVS repository to
Subversion. I'm working on changing it to convert from CV
This is an automated response.
Thank you for contacting the Technical Support team at The MathWorks Ltd. A
technical support representative will be contacting you within 1 business day.
The following information will help us in responding to your request. If you
have already provided the info
Simon Forman wrote:
> Philippe, please! The suspense is killing me. What's the cpu!?
>
> For the love of God, what's the CPU?
>
> I-can't-take-it-anymore-it's-such-a-simple-question-ingly yours,
Yes, please .
I've found a C compiler manual on the web for the Epson S1C33 CPU as
well as the
On 2006-07-31 18:23:17, Cliff Wells wrote:
> My point is to stop FUD right at that comment. I don't doubt your
> research from "a few years ago", but ancient research is entirely
> irrelevant for making a decision *today*.
That's exactly the reason why I added this information. It might not be f
David Bear wrote:
> I built python 2.4.2 for suse linux 9.3. I configured it to be a separate
> instance of python from the version packaged with suse.
>
> Now when I start it I get an error:
> python
> Python 2.4.2 (#4, Jul 27 2006, 14:34:30)
> [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on li
Robert Kern wrote:
> David Bear wrote:
>> I built python 2.4.2 for suse linux 9.3. I configured it to be a separate
>> instance of python from the version packaged with suse.
>>
>> Now when I start it I get an error:
>> python
>> Python 2.4.2 (#4, Jul 27 2006, 14:34:30)
>> [GCC 3.3.5 20050117 (pr
Andy Dingley wrote:
[snip]
> Python is one of the best languages I've found for
> platform-independence - significantly better than Perl.
[big snip]
This statement was given in the context of Windows and Linux, and I've
precious little experience doing anything on Windows. So I won't
challenge
Jon Smirl wrote:
> I only have a passing acquaintance with Python and I need to modify some
> existing code. This code is going to get called with 10GB of data so it
> needs to be fairly fast.
>
> http://cvs2svn.tigris.org/ is code for converting a CVS repository to
> Subversion. I'm working on cha
I have a free web mail address and would like to use python to retrieve
files that have been emailed to me. The basic code would accommodate
cookies, a login name and password, then download using the full URL I
can provide. From postings here I thought mechanize held promise, but
I've found it to
On Mon, 31 Jul 2006 18:33:34 -0700, Simon Forman wrote:
> Splitting a string into a list (array) of lines is easy enough, if you
> want to discard the line endings,
Thanks for the pointers, that should be enough to get me started. I had
started off in the wrong direction looking for arrays instea
John Machin wrote:
>
> Simon Forman wrote:
>> Philippe, please! The suspense is killing me. What's the cpu!?
>>
>> For the love of God, what's the CPU?
>>
>> I-can't-take-it-anymore-it's-such-a-simple-question-ingly yours,
>
> Yes, please .
>
> I've found a C compiler manual on the web f
Gerhard Fiedler wrote:
> On 2006-07-30 09:54:14, Antoon Pardon wrote:
>
> > Aren't you looking too much at implementation details now?
>
> Possibly, but at this point I'm still trying to understand how Python does
> these things, and what the useful abstraction level is for me. I also still
> have
I am using a class called UploadedFile.
I want to create a for loop to itterate through the objects within file
name
class UploadedFile(SQLObject):
filename = StringCol(alternateID=True)
abspath = StringCol()
uniqueid = IntCol()
I'll show you a snippit of the code I am try
David Bear wrote:
> okay. Since I grabbed the python tar file from python.org, do I then assume
> that readline is not included in the python source distribution? if so,
> where would I find it. If not, what different build instructions do I need
> to follow to make it build with readline?
Oops.
OriginalBrownster wrote:
> I am using a class called UploadedFile.
> I want to create a for loop to itterate through the objects within file
> name
>
> class UploadedFile(SQLObject):
> filename = StringCol(alternateID=True)
> abspath = StringCol()
> uniqueid = IntCol()
>
> I'll sh
On 2006-08-01, Philippe Martin <[EMAIL PROTECTED]> wrote:
>> Perhaps if Philippe could divulge the part number that's in
>> the bottom right corner of the manual that he has, and/or any
>> part number that might be mentioned in the first few pages of
>> that manual, enlightenment may ensue
>
Hi guys. I tried naming my file with a .pyw extension, but the console
still shows up. Why doesn't this work? And is there another, more
programmatic way to suppress it?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Hi guys. I tried naming my file with a .pyw extension, but the console
> still shows up. Why doesn't this work? And is there another, more
> programmatic way to suppress it?
>
> Thanks.
I just noticed that the console that opens isn't the normal one, it's
IPython. Now how
This is an automated response.
Thank you for contacting the Technical Support team at The MathWorks Ltd. A
technical support representative will be contacting you within 1 business day.
The following information will help us in responding to your request. If you
have already provided the info
On Mon, 31 Jul 2006 14:35:39 -1000, Simon Forman <[EMAIL PROTECTED]>
wrote:
> crystalattice wrote:
>> I'm creating an RPG for experience and practice. I've finished a
>> character creation module and I'm trying to figure out how to get the
>> file I/O to work.
>>
>> I've read through the python
On Mon, 2006-07-31 at 21:57 -0300, Gerhard Fiedler wrote:
> On 2006-07-31 18:23:17, Cliff Wells wrote:
>
> > My point is to stop FUD right at that comment. I don't doubt your
> > research from "a few years ago", but ancient research is entirely
> > irrelevant for making a decision *today*.
>
> T
[EMAIL PROTECTED] wrote:
> I dont want the outputs of print to be displayed on the console
> since it is used my fellow-workers
> But i need those prints for debugging purpose
import sys
sys.stdout = open("my_debugging_output.txt", "w")
Or you can replace sys.stdout with any obje
On Tue, 2006-08-01 at 01:47 +, John Savage wrote:
> I have a free web mail address and would like to use python to retrieve
> files that have been emailed to me. The basic code would accommodate
> cookies, a login name and password, then download using the full URL I
> can provide. From posting
This game is doubly Pythonic -- it uses PyGame, and
it's based on a Monty Python movie.
It was originally an entry in the Pygame.draw challenge
(http://media.pyweek.org/static/pygame.draw-0606.html).
I've put a slightly enhanced and bugfixed version on
my web page:
http://www.cosc.canterbury.ac.n
I don't have experience with Django or any other python framework, but
I have used bare-bones mod_python and it rocks.
I wouldn't use PSP though...
It is not very polished, and they way it handles the "indentation
problem" in python is a little bit confussing.
IMHO the best way of using mod_python
Grant Edwards wrote:
> On 2006-08-01, Philippe Martin <[EMAIL PROTECTED]> wrote:
>
> >> Perhaps if Philippe could divulge the part number that's in
> >> the bottom right corner of the manual that he has, and/or any
> >> part number that might be mentioned in the first few pages of
> >> that manual
John Machin wrote:
> [EMAIL PROTECTED] wrote:
> > Philippe Martin wrote:
> > > Yes, I came here for the "algorithm" question, not the code result.
> >
> > To turn BCD x to binary integer y,
> >
> > set y to zero
> > for each nibble n of x:
> > y = (((y shifted left 2) + y) shifted left 1)
crystalattice wrote:
>
> Plus, to modify data in a class
I presume the word "instance" is missing here ...
> do I have to unpickle the whole thing
> first or is there a way to modify the data while it's pickled? Actually,
> I think I can answer that last question: a character instance, having
[EMAIL PROTECTED] wrote:
> John Machin wrote:
> > [EMAIL PROTECTED] wrote:
> > > Philippe Martin wrote:
> > > > Yes, I came here for the "algorithm" question, not the code result.
> > >
> > > To turn BCD x to binary integer y,
> > >
> > > set y to zero
> > > for each nibble n of x:
> > > y
In <[EMAIL PROTECTED]>, crystalattice wrote:
> On Mon, 31 Jul 2006 14:35:39 -1000, Simon Forman <[EMAIL PROTECTED]>
> wrote:
>
>> What kind of trouble were you having with pickle?
>
> It's mostly a combination of things (I hope you can follow my logic).
> First, to use "good programming prac
101 - 200 of 206 matches
Mail list logo