Why are you doing it at the low level? Have you consideren using a framework
like Django for example?
2011/7/16 Steven D'Aprano
> Charles John wrote:
>
>> Hi I am new to python and was wondering what the best way to create an
>> order(bid and offer) queue, then match a bid and offer so that if
>
Sending args to the print command always puts spaces between them.
Try:
print("Hello {name}!".format(name=name))
2011/7/10 Robert H
> Dear all,
>
>
> I have Python 3.2 installed on Windows 7. I am a complete beginner playing
> around with the basic functions. My problem is the following sc
You can use a regular expression or plain simple len()
2011/7/1 Ryan Kirk
> Is there a way to limit raw_input to the hundredth decimal point?
>
> For example, I'd like to allow the user to enter 5.75 but not 5.756:
>
> dollars = raw_input("Please enter a dollar amount: $")
>
> Thanks!
>
Compared to Python, I do not even consider C++ an object oriënted language.
2011/6/9 Ashwini Oruganti
> On Thu, Jun 9, 2011 at 2:18 PM, Alan Gauld wrote:
>
> C++ grew out of C so it has a lot of non OOP features. It is no
>> surprise to find therefore that its primitive types are related to
>> m
I forgot to mention
strptime<http://docs.python.org/library/datetime.html#strftime-strptime-behavior>
2011/5/25 Izz ad-Din Ruhulessin
> Hi Cory,
>
> From your description it seems to me that your case is more one of
> asserting that your function received valid arguments
segfault)
Will an incorrect type or value raise an exception in your proposed
solutions? It probably will, so it is probably best to go for
try-except-finally clauses.
A sidenote: personnally I would glob the directory and then sort the list by
file creation date.
Kind regards,
Izz ad-Din Ruhuless
Hi,
CPython is the C implementation of Python. You can read the tutorial in the
Python docs.
It is a rather advanced topic, however. If you nevertheless want to delve
into it, it might be a good idea to check out www.cython.org first.
2011/5/12 tee chwee liong
> hi all,
>
> i just started pyt
Hi,
I would go for appending sys.path. This is a simple way to do it, and
perhaps not even needed for each python file (only files which use the
modules that you have installed))
Another way to do it is adding the modules you need to sys.modules manually.
2011/3/5 Modulok
> List,
>
> Backgroun
Of course that would be:
> foo = lambda condition: MyClass() if condition else None
2011/3/3 Izz ad-Din Ruhulessin
> Maybe:
>
> foo = lambda x: MyClass() if condition else None
>
>
> 2011/3/3 David
>
> Another classic case of trying something not the best way, due
Maybe:
foo = lambda x: MyClass() if condition else None
2011/3/3 David
> Another classic case of trying something not the best way, due to
> inexperience.
> But it has been a good process: I learned something new from
> setting myself the initial puzzle and then finding a solution,and then
>
You can only call methods on a class without instantiating it, if it are
classmethods.
http://pyref.infogami.com/classmethod
2011/2/28 Christopher Brookes
> I don't understand
>
> @classmethod
> def DisplayAll(cls, herosAll
> ):
>
> What is cls ?
>
>
@classmethod
def DisplayAll(herosAll):
is of course:
@classmethod
def DisplayAll(cls, herosAll):
2011/2/28 Izz ad-Din Ruhulessin
> Hi, you must pass the herosAll list to the DisplayAll() method like this
>
> class Character():
> @classmethod
> def Disp
Hi, you must pass the herosAll list to the DisplayAll() method like this
class Character():
@classmethod
def DisplayAll(herosAll):
print ('There is', Character.CharacterCount, 'heros')
for heros in herosAll:
heros.DisplayCharacterInfos()
herosAll = [
Character
Just tested that, doesn't work.
Have you considered installing SVN or any other version control system?
2011/2/15 Izz ad-Din Ruhulessin
> Send your code as a raw text string and use eval on it maybe
>
> 2011/2/15 ian douglas
>
>> Sounds like it should be possible via
Send your code as a raw text string and use eval on it maybe
2011/2/15 ian douglas
> Sounds like it should be possible via SSH, but I have no idea how you'd
> set that up within Eclipse.
>
>
> On 02/15/2011 10:50 AM, S de Haan wrote:
>
> For instance, Im working on my local machine with Eclipse
class Raw ---> class Processor ---> class Final
2011/1/26 Tino Dai
>
>
>>
>> A raw casting comes into a factory. It is listed as such. When machined,
>> this part number changes to a different part number. The raw casting has
>> no "quality related" stuff, but the machined casting does, and
Or the internal memory id or whatever it's called.
2011/1/25 Izz ad-Din Ruhulessin
> I think it has something to do with the physical id of the object
>
> 2011/1/25 Karim
>
>
>> Hello All,
>>
>> Just to share on rageous bug I encounter where 2 lists whic
I think it has something to do with the physical id of the object
2011/1/25 Karim
>
> Hello All,
>
> Just to share on rageous bug I encounter where 2 lists which "should" to be
> different (same id) because hold by different instances of the same class
> are not in fact DIFFERENT, see below:
>
>
Hi Hugo,
Problem solved, thanks!
Kind regards,
Izz ad-Din
2011/1/17 Hugo Arts
> On Mon, Jan 17, 2011 at 8:29 PM, Izz ad-Din Ruhulessin
> wrote:
> > Hi all,
> > I'm designing a module which aims to provide full compatibility with
> > Pythons' datetime mod
It looks like because of something Observable doesn't have that attribute.
Could you post the ListBox class?
2011/1/17 Karim
>
>
> Hello,
>
> I implemented Observer DP on a listbox (Tkinter) as follows and I don't
> understand why super() is not working and Observable.__init__(self) is
> working
Hi all,
I'm designing a module which aims to provide full compatibility with
Pythons' datetime module.
However, I can't find out how some operators in strftime function, namely:
those who use the locale. (%a, %A, %b, etc.)
How do I access this locale and it's values?
Thanks in advance.
Kind re
operations could require tens or even hundreds of lines of code, Cython make
life easiër. A real life-saver, thanks!
I also like how simple it is to import C functions to python, btw.
Kind regards,
Izz ad-Din
2011/1/14 Stefan Behnel
> Izz ad-Din Ruhulessin, 14.01.2011 19:49:
>
> Thanks f
Although I probably wont switch from Eclipse to vim, that looks nevertheless
very, very nice, bookmarked.
2011/1/15 Sean Carolan
> >>> I am new to programming and to Python. I've been using Python with
> IDLE
> >>> on Windows Vista for a few weeks now.
> >>> (And I'm loving it!) However, I'm t
Install Eclipse via Synaptic and then PyDev via Eclipse.
2011/1/15 Timo
> On 15-01-11 02:17, Joel Knoll wrote:
>
>> Hello,
>>
>> I am new to programming and to Python. I've been using Python with IDLE
>> on Windows Vista for a few weeks now.
>> (And I'm loving it!) However, I'm thinking about
Hi Stefan,
Thanks for your quick reply and clearing the issue up for me. Using your
answer, I rewrote the function to this:
double Py_GetAttr_DoubleFromFloat(PyObject *obj, const char *attr)
>
> {
>
> PyObject *get_attr, *py_float;
>
> int has_attr;
>
>
>> //Check if the given object has the give
Hello,
I am writing a Python C extension and I have some trouble understanding how
reference counting works exactly. Though I think I understand the practice
on simple operations (see my question at stackoverflow:
http://stackoverflow.com/questions/4657764/py-incref-decref-when), but on
more "comp
26 matches
Mail list logo