20 Discussion / Question Topics

Remove Filter
Member Avatar for Gribouillis

This is the message I get while trying to answer in a thread. Only, there is no clue of what I could do to prove that I'm actually a human, so that the robot would be satisfied. Can you help me ? (qupzilla/linux) edit: with firefox, it works. Only it's …

Member Avatar for Gribouillis
0
631
Member Avatar for Gribouillis

4 hours after [my last post](https://www.daniweb.com/software-development/python/threads/497125/python-program-crashes-after-using-too-much-memory#post2175367) in [this thread](https://www.daniweb.com/software-development/python/threads/497125/python-program-crashes-after-using-too-much-memory), the python forum page says that the post was written by Raisefamous. I tried to empty my browser's cache (qupzilla in linux), but it didn't work. It is obviously a bug.

Member Avatar for Reverend Jim
0
239
Member Avatar for Gribouillis

Some unicode characters such as dice symbols or chess symbols (see https://en.wikipedia.org/wiki/Miscellaneous_Symbols) dont display properly anymore in the forums. What's going on ? there are examples here [Click Here](https://www.daniweb.com/software-development/python/code/492854/another-visit-to-string-formatting-python#post2155656) and here [Click Here](https://www.daniweb.com/software-development/python/code/423640/unicode-chessboard-in-a-terminal#post1814200).

0
130
Member Avatar for Gribouillis

Given a unicode string or file, what is the best way to find a short unicode string that is **not** a substring of the first one ? I want a working algorithm that avoids transforming the first string into a list of characters. My first idea is to choose a …

Member Avatar for Gribouillis
0
334
Member Avatar for Gribouillis

Importing a hierarchy of firefox bookmarks in konqueror can be tricky, as konqueror's bookmarks editor doesn't read firefox's sqlite databases where the bookmarks are stored. Konqueror bookmarks are normally stored in a file `~/.kde/share/apps/konqueror/bookmarks.xml` , which is actually a dialect of `xml` named `xbel`. I found very little documentation about …

Member Avatar for Gribouillis
1
1K
Member Avatar for Gribouillis

Today is 70th anniversary of D-Day in France, with 20 heads of state, including Queen Elizabeth and Barack Obama ! Great weather and nice speeches ! https://twitter.com/FranceinChicago/status/474910715237502977/photo/1 Let's remember these 150000 soldiers ! http://online.wsj.com/articles/d-day-invasion-view-from-above-1402005875?tesla=y#1

0
194
Member Avatar for Gribouillis

My old hard drive with Linux Mint 15 Olivia refused to boot yesterday: kernel panic etc. I tried to repair the file system and now some shared libraries are missing. On this computer, I have a brand new second hard drive with Kubuntu 13.10 freshly installed. From this OS, I can …

Member Avatar for Gribouillis
0
345
Member Avatar for Gribouillis

I just started a new small python project on google code which goal is to easily create clickable graphs on a GKT+ goocanvas. The initial idea comes from this code snippet [url]http://www.daniweb.com/software-development/python/code/323792[/url] . I want to do about the same, but instead of simply drawing the graph, I want to …

Member Avatar for Gribouillis
1
170
Member Avatar for Gribouillis

I thought users of the python forum could be interested in a seminar conference by Guido van Rossum about the design and implementation of the python language, so here is the link [url]http://irbseminars.intel-research.net/GuidoVanRossum.wmv[/url] (it may be easier to download the file first instead of reading it directly from your browser)

1
115
Member Avatar for Gribouillis

How would you safely round a floating point number to the nearest integer ? Python has the built in function [icode]round[/icode], but it returns a floating point number [code=python] >>> round(4.9) 5.0 >>> help(round) Help on built-in function round in module __builtin__: round(...) round(number[, ndigits]) -> floating point number Round …

Member Avatar for Gribouillis
0
3K
Member Avatar for Gribouillis

I'm looking for C++ libraries to manipulate real and/or rational polynomials. Does someone know such a library ?

0
136
Member Avatar for Gribouillis

Suppose that I have a program named myprog, and I type this in a shell [code] $ myprog -z hello -m "this is a message" [/code] The function main in myprog will receive a char** argv containing the following strings [code] "-z", "hello", "-m", "this is a message" [/code] So …

Member Avatar for Gribouillis
0
219
Member Avatar for Gribouillis

Does anyone know how I can test if an object's type is a builtin type or a user defined type ?

Member Avatar for Gribouillis
0
171
Member Avatar for Gribouillis

Consider the following script [code=python] #!/usr/bin/env python # foo.py import sys print sys.argv [/code] When I run this in a terminal with arguments, here is the output [code] $ ./foo.py -h hello -m "this is a string" ['./foo.py', '-h', 'hello', '-m', 'this is a string'] [/code] My question is: is …

Member Avatar for Gribouillis
0
168
Member Avatar for Gribouillis

What do you think would be the best way to write this structure [code=python] if testA: actionA() if testB: actionB() if textC: actionC() else: actionDefault() else: actionDefault() else: actionDefault() [/code] if I want to write only one call to actionDefault() ?

Member Avatar for Gribouillis
0
139
Member Avatar for Gribouillis

In python, a "function object", that is to say an object which can be called as a function, is simply an instance of a class which has a [icode]__call__[/icode] method. An example is [code=python] class FuncObj(object): def __call__(self, *args): print("args were %s." % str(args)) func = FuncObj() func(1,2,3) # output …

Member Avatar for Gribouillis
0
184
Member Avatar for Gribouillis

Python 3.0 comes with a builtin [icode]print[/icode] function which breaks old code. In order to write code wich is compatible both with the 2.x series and with the 3.x series, I'm using the following [icode]Print[/icode] function [code=python] import sys def Print(*values, **kwd): fout = kwd.get("file", sys.stdout) sep = kwd.get("sep", " …

Member Avatar for Gribouillis
0
169
Member Avatar for Gribouillis

The following program is able to download the python programs contained in a thread of the python forum. Just start the program, it will prompt you for the thread number and create a directory with the code extracted from the thread. I used it to download all the wx examples. …

0
112
Member Avatar for Gribouillis

I'm on linux, and I'm using a command called 'espeak' which reads sentences on stdin and writes phonemes on stdout. Whe I run it in a console, the output is the following [code] bash$ espeak -q -v mb-fr4 -s160 bonjour tout le monde # <-- I type this input, the …

Member Avatar for woooee
0
167
Member Avatar for Gribouillis

In the Perl language, you can fork a child process with the following syntax [code=perl] open CHILD, " | programA | programB | program C"; print CHILD "this is an example input"; [/code] (at least, you can do this under linux). This statement starts 3 processes in fact; programA, B …

Member Avatar for slate
0
229

The End.