Creating Linked Lists in Python

2009-03-21 Thread J-Burns
Hey thr,

I need some help here actually. So i thought i could get it easily
from here.

I need to make a linked list that can do the following:

1) Point to multiple nodes at one time
2) Should have 2 values:
a) The node no.
b) The value of that node in reference to the next node that it is
pointing to

For example, this means that there can be a start node supposedly.
Having a value of 0. It is pointing to node 1 with the value of "a"
and to node 2 with the value of "b". Trying to make something like an
NFA. Where id be changing regular expressions to NFAs.

How can I do this? And if I could do this by some other way than using
linked lists than do tell me about that as well.
--
http://mail.python.org/mailman/listinfo/python-list


Mapping a series of Dates to an array of Numbers

2008-06-17 Thread J-Burns
Hello. Got a problem here.

Ive got a set of points tht id be plotting. Those points would contain
the date on which the work was done against its frequency. Supposedly
if i did something on the 28th of March one of the points would be
(28, respective freq). The next time i did my work on the 1st of
April. So my next point would (1,freq).

Now how could i map all the dates to another array so that when im
plotting them i can plot the points as (day 1, freq), (day2,freq),
(day4 , freq)  and so on rather than having points like (28, freq),
(29,freq), (1,freq) and blah blah blah.

Id be needing some help on how to use the time class in python as
well. Thnx
--
http://mail.python.org/mailman/listinfo/python-list


Re: Mapping a series of Dates to an array of Numbers

2008-06-17 Thread J-Burns
Btw dnt forget the solution should also cater to this problem:
Supposedly there is a day on which i did not do anything. Than that
particular spot in my graph should be left empty. Meaning that if i
did something on the 1st March and after it i did something on the 7th
March. Then essentially 1st march should be mapped to day1 and 7th
march to day 7(not day2)... :P
--
http://mail.python.org/mailman/listinfo/python-list


Doc tests in Python

2008-06-18 Thread J-Burns
Hello. Im new to using doctests in python. Could some1 tel me how to
use doctests if i have a constructor in my code?
--
http://mail.python.org/mailman/listinfo/python-list


Wierd Test Failure

2008-06-20 Thread J-Burns
Hello. Im using doctests to check the functions that ive made. Wat i
dnt understand is that it gives me a fialure even though the expected
and got values are the same. Check this out:

**
File "C:\Python25\Lib\idlelib\idle.pyw", line ?, in
__main__.Test.test8
Failed example:
Test.test8()
Expected:
True
Got:
True
**

If both the values are returning True how is it possible for the test
to fail? :S
--
http://mail.python.org/mailman/listinfo/python-list


Using Gnuplot and making an exe file outv the prog

2008-07-02 Thread J-Burns
Hello. Been using the gnuplot lately. Program runs fine. And its plots
as well. Now i want to make an exe file out of this program using
py2exe. Cud some1 help me in telling me how this is done. Thnks
--
http://mail.python.org/mailman/listinfo/python-list


Rotating a cube

2008-07-16 Thread J-Burns
Hello. Need some help here. I have a 4*4 cube. So the equation of the
cube becoming:

  x + 4*y + 16*z

Now i want to rotate this cube 90 degrees anticlockwise( a right
rotation). How can i do that? The rotation must take place with the
axis of rotation being the straight line through the center of the
cube and perpendicular to the "xz-plane." The axis are aligned in this
fashion:

   y
   |
   |
   | x
  /
/
  z

Moreover, also tell me how to perform a rotation with the axis of
rotation being the straight line through the center of the cube and
perpendicular to the "yz-plane."

Essentially, I need the equations of the lines after the rotation has
been done in both cases.
Is there a built in Python function for this?
--
http://mail.python.org/mailman/listinfo/python-list


Re: Rotating a cube

2008-07-17 Thread J-Burns
On Jul 17, 12:53 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> J-Burns wrote:
> > Is there a built in Python function for this?
>
> for answering questions that have nothing to do with programming, and
> looks quite a bit like homework?  don't think they've added that one yet.
>
> maybe you should look for a geometry newsgroup/forum?
>
> 

I meant to ask how would you do this in Python... :S
--
http://mail.python.org/mailman/listinfo/python-list


Using Tkinter

2008-08-22 Thread J-Burns
Hello. Im a bit new to using Tkinter and im not a real pro in
programming itself... :P. Need some help here.

Problem 1:

How do I make something appear on 2 separate windows using Tkinter? By
this I mean that the format would be something like this:

You have Page1 : This has 2-3 buttons on it.
Clicking on each button opens up a new window respectively having
something entirely different... possibly more buttons,text fields etc.

Problem 2:

If I have a drop down box in Pythons tkinter, is it possible that the
entities that the drop down has are items that have been picked up
from a notepad file via file handling?

Problem 3:

I have 2 radio buttons Radio button A and radio button B. Below them I
have I have 2 separate panels Panel A and Panel B possibly each having
separate text fields, buttons etc in it.

Is it possible that only one of them is shown depending on the radio
button that I have selected? Meaning that if I have selected on Radio
button A only Panel A is shown and likewise if I have selected Radio
Button B only panel B is shown.

I guess that's it for now. Even if any1 here knws any of these
problems do post back asap.
Wud b waiting for replies.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list