I have a project to do for my CMPT 120 Class. And it's using basic python coding. I'm trying to write my name out with block letters. 'JAX' I need to use for loops and i'm stuck on my X here's the code for it [code] def x(n): t3=turtle.Pen() t3.left(60) t3.forward(n) t3.left(60) t3.forward(n) t3.right(120) t3.forward(n) t3.right(60) t3.forward(n/2) t3.left(120) t3.forward(n/2) t3.right(60) t3.forward(n) t3.right(120) t3.forward(n) t3.left(60) t3.forward(n) t3.right(120) t3.forward(n) t3.right(60) t3.forward(n/2) t3.left(120) t3.forward(n/2) t3.right(60) t3.forward(n) [/code] I've separated it in parts that are similar which i can loop, but there is the t3.right(120) that's odd in the loop, is there a way …

Member Avatar
Member Avatar
+0 forum 3

I am trying to access some of Adobe Acrobat 7.0's methods using win32com. The IAC reference manual ([url]http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACReference.pdf[/url]) tells me that the methods I want are in AxAcroPDFLib but I'm having trouble determining which type library I need to load to get access to AxAcroPDFLib. I'm able to get access to interfaces such as AcroExch by loading the Acrobat 7 Browser Control Type Library 1.0 but that library does not appear to contain AxAcroPDFLib Any ideas anyone?

Member Avatar
+0 forum 0

Hai friends I have a small problem with my code... I want to copy an existing file (its a model MS Excel file) to a new file & name it with the current date... First I tried to create the model Excel file, but when I opened it, it had only one sheet inside it, so I tried to copy the existing file, but I couldnt find any bright ideas... can anyone show me a way? [B] import sys import win32com.client fileVM = open('e:/disk/vm.xls','a') fileVM.close()[/B] The above code creates the file with a single Excel Sheet inside it. But my …

Member Avatar
Member Avatar
+0 forum 4

Does Python have something like peek(memory) and poke(memory) of other languages that read and write to memory addresses directly?

Member Avatar
Member Avatar
+0 forum 1

I would like to write an application that would search a site like "minitorrents.com" and automatically download torrent files of tv shows I like. I am thinking urllib.py might be able to do something like this. I need to be able to use the search feature of "minitorrents.com", then recursivley follow a few levels into the sight, until my torrent file is found, then download it. Any ideas or suggestions would be appreciated.

Member Avatar
Member Avatar
+0 forum 8

I am very new to python and I have this code that I wrote... I am trying to make it so the turtle will bounce if it touches any of the box.. but somehow the turtle does not fuction the way it suppose.. I wonder can anyone give me a hand? Thanks.

Member Avatar
Member Avatar
+0 forum 18

What are the ways to find substring in string in Python? Which way is most effiecient?

Member Avatar
Member Avatar
+0 forum 3

What is the best way to sort a list of words with the case insensitive?

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm very new to python script and I am attempting to understand a part of a program developed at my work place because the have the most computer knowledge here, though still very little and the person who developed the program is no longer accesible. Here's the problem i'm attempting to solve: I have a .txt file that I believe is converted to an array by a comma delinated string. there is then a tab delinated string of the first four terms as floats. the program is supposed to compare the values in the array to desired values given …

Member Avatar
Member Avatar
+0 forum 2

Dear Python Gurus: I am a very new Python user, would really appreciate your help. I used Python to write a web form for users to enter. The underlined database is Oracle. One validation needs to enforce to eliminate duplicates entries. For example: one customer ID can only be entered only one time from the website, if a duplicate customer ID is attempted to enter, a message should pop back to inform the user about the invalid entry. I am enforcing primary key in the underlined Oracle table How can I code in python make this happen and get the …

Member Avatar
+0 forum 0

I hear a lot about PyGame for writing games and that I understand is SDL in a Python coat. Is DirectX used in a similar fashon? Any examples?

Member Avatar
Member Avatar
+0 forum 1

Alright, I think my previous post about this subject was very confusing so I will try again. First off I appreciate all the responses to my prior post (Setting a Variable to the Exit Code). It is my understanding that when a script completes it returns an exit code. I want to capture this exit code in order to pass it to a CF page. So my questions are: 1) Is there an exit code returned when a script completes? 2) Is the value of the exit code stored somewhere? If so where? 3) Can I assign the value of …

Member Avatar
Member Avatar
+0 forum 1

Hello to all!How can i make a list from all the small letters of the alphabet without writing every one?Is there an operator/function that does that,something like ['a'-'z'].I've tried in many ways but i'm new in Python and if there is that operator i haven't discover it yet.My appreciation!

Member Avatar
Member Avatar
+0 forum 5

Ok well I've hit a snag... i'm trying to write a program that makes Acronyms from user input... I can get all the letters capitalize, but the problem i am having is, well, taking the first letter from each and puting them together to make an acronym!!!!!

Member Avatar
Member Avatar
+0 forum 6

Hey everybody... Does sombody knows how can i use the getattr function in order to call to a sub function defined inside another one? somthing like this code: # ---------------------------- def func1 (self, func_name) : def func2 () : print "Blaaaa" def func3 () : print "Yaaaaa" getattr(?, func_name)() self.func1("func3") # ---------------------------- what should i put instead of the question mark (?) ? i tried to write self.func1, but i doesn't work, because it looks for a function attribute... maybe there's another solution to this problem? please help...

Member Avatar
Member Avatar
+0 forum 2

I have been doing most all of my python programming in a linux bash shell. I mean I run all of my scripts from a bash shell. If my script produces an error(hardly ever happens :-), the error is outputted to the shell, so I am able to fix it. when I run a script on windows if it errors, the window just closes, so i do not know what the error is. Is their a way to keep the window open to see where my script went wrong? edit added later// I have been writing my scripts in notepad2(need …

Member Avatar
Member Avatar
+0 forum 2

I am just starting to look at writing class in Python. Can a class that I write inherit Python calendar?

Member Avatar
Member Avatar
+0 forum 3

Does anyone have a meaningfull example of the use of the Profiler included in Python?

Member Avatar
Member Avatar
+0 forum 2

I know that lambda is some kind of function in Python. What does it do? Why would one use it?

Member Avatar
Member Avatar
+2 forum 1

I hope the spelling isn't too far off, but what is list comprehension statement and why would one use it?

Member Avatar
Member Avatar
+0 forum 1

Hello! I'm a total dummy when it comes to programming, and now I have a heck of a data extracing job to do for my graduation thesis :cry: Hopefully somebody can help me in the right direction here, because a whole day of surfing didn't get me to the right application to do this monsterjob for me. The thing goes like this: I have to parse patents (in html format on my hard drive) to get specific bits of data (a technology class), store this data in a database, then have an interface to display the data in a meaningful …

Member Avatar
Member Avatar
+0 forum 2

[B]Python and the JPEG Image File, Part 1, The Header[/B] [B]Intro[/B] The JPEG image file format (.jpg) is very popular on the internet because you can pack a lot of picture information into a relatively small file. There are competing file formats like GIF and PNG. GIF is rather limited to the number of colors (8 bit = 256) compared to JPEG (24 bit = 16,777,216). JPEG can typically achieve 10:1 to 20:1 compression without visible loss. It allows you to specify a quality setting (1 - 100) with higher quality giving less compression. [B]JPEG header[/B] Sharp edges in images …

Member Avatar
+0 forum 0

[B]Intro[/B] When you declare an integer variable in C, the variable is assigned a fixed memory location with enough space to hold the type integer. When you then initialize the variable with a value, the value is put into that space. Take a look at the C code sample below: [code=c]#include <stdio.h> int main(void) { int a, b, c; // once you declare the variable, it is assigned a fixed memory location printf("a at %d b at %d c at %d\n", &a, &b, &c); // // a at 1245060 b at 1245056 c at 1245052 // initializes a, b and …

Member Avatar
+0 forum 0

I am currently finishing up my B.S. in Computer Science at a local private University. When I started a couple of years ago, C++ was taught in the intro to programming course for freshmen. About two years later, Java was taught as a first language. (I disagree with that because I think that OOP should be eased into over the duration of a semester, and it shouldn't be something forced upon non-programmers their first day.) Regardless, there is now a discussion / debate going on within my school's CS department to teach python as a first language. I was just …

Member Avatar
Member Avatar
+0 forum 10

Is there a way one can interrupt the sleep() function with a key press in Python?

Member Avatar
Member Avatar
+0 forum 6

For my simple programs I have wirtten, I have just been using a simple editer with syntax highlighting. This seems sufficient. What kinds of thing can a good IDE do for me?

Member Avatar
Member Avatar
+0 forum 4

Couldn't sleep last night, so I was browsing and found the "Starting Python" thingy. I must say Python looks interesting from the examples. I learned C++ in school, Python sure looks easier to understand. Does any one think it's better than C++?

Member Avatar
Member Avatar
+0 forum 4

Python is relatively new to me. I have mostly programmed in C and C++. I read that Python has a good build-in debugger, but I can not understand the information in the reference manual. Can anybody please give an actual commented example how this works.

Member Avatar
Member Avatar
+0 forum 4

hello fellows, I seem to have a little problem: I tried to use the function getattr([I]object[/I], [I]attribute[/I]) with two strings which is being read from a xml file as arguments, and seem to have a problem with sending the first one as a string. the function thinks that the string object itself is the object argument, when what i meant was that the VALUE of my string will be sent to the function as a name of a module in my program. the second argument however, isn't doing any problems, and is being treated as the object of the value …

Member Avatar
Member Avatar
+0 forum 5

I have read vegaseat's "Projects for the Beginner" sticky and got really interrested in the eqaution solver for physics or mathematics problem. I just need a little Python hint how to get this started.

Member Avatar
Member Avatar
+0 forum 1

The End.