| |
thread by: narutocanada |
last post Oct 21 '07 by: Hendrik van Rooyen
hi
what is the difference between the two kinds of brackets?
I tried a few examples but I can't make out any real difference:
lst =
print lst
print lst
print lst
lst = (10, 20, 30)
print lst
|
thread by: Sami Vaisanen |
last post Oct 20 '07 by: Gabriel Genellina
This is becoming utterly painful process.... I found out that the return
value from "format_exception" function is NOT a list, i.e. PyList_Check()
fails. PySequence_Check() succeeds but then PySequence_List() gives me
back -1. So wtf?
I must say the API is crap on this part. Im trying to get error
information regarding previous error and if...
|
thread by: Monty Taylor |
last post Oct 20 '07 by: Bjoern Schliessmann
Hey everybody,
MySQL has put up a poll on http://dev.mysql.com asking what your primary
programming language is. Even if you don't use MySQL - please go stick
in a vote for Python. I'm constantly telling folks that Python needs
more love, but PHP and Java are kicking our butts...
(I know the world would be a better place if the poll were...
|
thread by: Patrick C |
last post Oct 20 '07 by: bartonc
I've gotten this exact problem before and I was able to once figure it out. Since then i've apparently forgetten more of the basic.
Does anyone have any idea whats going on here, because fdayhigh is not an empty list...
>>> import justCup
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File...
|
thread by: BurnTard |
last post Oct 20 '07 by: bartonc
Hi guys, it's me! Your least favourite tard has returned with noob-questions needing answers. I am working on making a program that will not only record my dreams in a file, but also store them by date, topic, keywords, and level of lucidness.
This is what I have so far:
ListOfKeywords=
ListOfDates=
ListOfTopics=
LevelOfLucidness=
|
thread by: chewie54 |
last post Oct 20 '07 by: Horace Enea
Hi All,
Does anyone know what version of Python and wxPython comes with the
new Mac OS X Leopard?
Thanks
|
thread by: PythonNotSoGuru |
last post Oct 20 '07 by: ilikepython
Hi everyone i was just makeing myself a little spelling bee program and this problem came up that tells me the <string> needs to be left as an operand. I dont know how to fix this problem so any help you could give me would be much appreciated. Thank you
Code:(python)
print 'please spell correctly'
def loop():
...
|
| |
thread by: Brian Shine |
last post Oct 20 '07 by: Brian Shine
I'm trying to get cgi scripts to work. I can link to the python
script, but instead of running and producing an output, it prints the
script on the page. I've obviously missed a step in setting it up,
but I can't see what it is.
Thanks in advance,
Brian Shine
|
thread by: Ixiaus |
last post Oct 20 '07 by: Diez B. Roggisch
I have just come across a site that discusses Python's 'for' and
'while' loops as having an (optional) 'else' structure.
At first glance I interpreted it as being a bit like the 'default'
structure in PHP's switch block... But the switch block isn't a loop,
so, I am now confused as to the reason for using 'else' with the for
and while...
|
thread by: sophie_newbie |
last post Oct 20 '07 by: Diez B. Roggisch
Hi, I want to store python text strings that characters like "é" "Č"
in a mysql varchar text field. Now my problem is that mysql does not
seem to accept these characters. I'm wondering if there is any way I
can somehow "encode" these characters to appear as normal characters
and then "decode" them when I want to get them out of the database...
|
thread by: Abandoned |
last post Oct 20 '07 by: Abandoned
Hi..
I have some dictionary as {2:3, 4:6, 5:7.........}
I want to pickle to these dictionary and save to database but i
couldn't..
My code for adding..
a=eval(dict)
a=pickle.dumps(a, -1)
cursor2.execute("INSERT INTO cache VALUES ('%s', %s)", (x,a))
conn2.commit()
|
thread by: Odalrick |
last post Oct 20 '07 by: Peter Otten
I'm trying to write a simple game and decided I need an eventmanager.
<code>
import weakref
from collections import defaultdict
class _EventManager( object ):
def __init__( self ):
self._handled_events =
defaultdict( weakref.WeakKeyDictionary )
|
thread by: McCann, Brian |
last post Oct 20 '07 by: Bjoern Schliessmann
I posted this to the Twisted list...figured I'd try here too.
I'm looking for what is probably an simple solution I can't figure out
on my own. I'm writing an SSH server based on the example on the web
(using conch). I'm trying to figure out how to detect when the client
exists (for example, when I just close out PuTTY), but I can't get...
|
thread by: stef mientki |
last post Oct 20 '07 by: stef mientki
hello,
I generate dynamically a sequence of values,
but this "sequence" could also have length 1 or even length 0.
So I get some line in the form of:
line = '(2,3,4)'
line = ''
line = '(2)'
(in fact these are not constant numbers, but all kind of integer
|
thread by: Fabian Braennstroem |
last post Oct 20 '07 by: Fabian Braennstroem
Hi,
me again :-)
I would like to parse a small batch file:
file/read-case kepstop.cas
file/read-data keps1500.dat
solve/monitors/residual/plot no
solve/monitors/residual/print yes
|
| |
thread by: createdefuture |
last post Oct 20 '07 by: createdefuture
chech wat is happening here..
http://www.createthefuturecontest.com/pages/view/entriesdetail.html?entryID=798
|
thread by: abarun22 |
last post Oct 20 '07 by: abarun22
Hi
I am facing a problem while including a C header file in the SWIG
interface file. However the problem does not occur when i directly
copy the contents of header file in the same place.
My interface file read as follows.
/* interface file dep.i */
%module dep
%{
#include "dep.h"
|
thread by: Florian Lindner |
last post Oct 20 '07 by: Gabriel Genellina
Hello,
can I determine somehow if the iteration on a list of values is the last
iteration?
Example:
for i in :
if last_iteration:
print i*i
else:
|
thread by: Sami Vaisanen |
last post Oct 19 '07 by: Gabriel Genellina
Hello group,
I'm trying to get the Python exception information (message and traceback)
stored into a string in my C++ code. However all i get back is the string
"None". All the checks pass and all pointers get a value from the python
API calls. I've also tried with a different function such as
PyObject_CallFunctionObjArgs but the result is...
|
thread by: pJmp |
last post Oct 19 '07 by: jougs
I am building a wxPython application that plots some data using matplotlib. I am embedding several axis within a figure by creating several repeatedly calling
ax1 =fig.add_axes(, **axprops)
where axprops is a dict(). This way the plots can share an X-axis. However, I wanted to have one plot have two sets of information. I am familiar...
|
thread by: xkenneth |
last post Oct 19 '07 by: Gabriel Genellina
All,
Just a quick question. I want to be able to have a data structure
that organizes data (timestamps I'm working with) sequentially, so
that i can easily retrieve the first x amount of timeStamps without
iterating over a list. My thought was to use a binary tree, am i
overthinking the problem to try and implement this structure inside of...
|
thread by: Douglas Applegate |
last post Oct 19 '07 by: Douglas Applegate
Hi-
I am having a problem with shelve. The problem I think is really with
gdbm. I'll write out a file using shelve/gdbm on an amd64 machine and
then I'll try to read it in on a i386 machine. The result is a 'gdbm
fatal: read error.' Reversing directions results in the same problem.
Below are two small programs that get at the heart of the...
|
thread by: bobmon |
last post Oct 19 '07 by: bobmon
Hello,
I have a problem running Python programs from within SciTE, under
Linux --- the input( ) function fails with
"IOError: Bad file descriptor"
The same program will run happily in SciTE, under Windows --- gets the
input, goes off and calculates wondrous things --- but somehow, in
Linux, I'm not set up right.
|
| |
thread by: Metalone |
last post Oct 19 '07 by: Thomas Heller
In particular I want to know how to tell if reading and writing to the
console can occur.
Something like
sys.isConsolePresent()
|
thread by: dale_bertrand |
last post Oct 19 '07 by: Bruno Desthuilliers
In python, how do I know what exceptions a method could raise? Do I
need to look at the source? I don't see this info in the API docs for
any of the APIs I'm using.
Thanks in advance for your help.
|