Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 368 results for
fileio
- Page 1
fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
… draw a shape from a list of shapes imported with
fileIO
but i get a pygame import error please help [CODE…
CAS: FileIO permission
Programming
Software Development
15 Years Ago
by ChinnaG
Hi All, I restricted(Exclude)
FileIO
permission for my application from CAS settings. Eventhough my application is able to create a file and write data into it. I am trying to understand, how my application is able to create a file eventhough I restrict a permission through CAS click once settings. Please help! Thanks Chinnaa
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by fallopiano
say if n was circle, this is what python interprets: [CODE=python]pygame.draw."circle"(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(480)), 50 )[/CODE] now thats not code; its a string. you could add if statements like so: [CODE=python]if z == 'circle':…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
[CODE]import random import pygame w = 640 h = 480 n = random.randrange(6) x = open("shapes.txt") z = x.readlines()[n] screen = pygame.display.set_mode((w, h)) if z == "circle": pygame.draw.circle(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(480)), …
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by fallopiano
try [CODE=python]import pygame from pygame.locals import *[/CODE] if that doesn't work, make sure you have the pygame that matches up with your version of python
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by fallopiano
also, if that fails, try reinstalling your version of pygame
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by pythopian
Quick hint: Instead of the condition cascade [CODE]if z == "circle": ... elif ...[/CODE] consider a more pythonically succinct approach: [CODE]assert n in ('circle', 'line', 'rect') draw = getattr(pygame.draw, n) draw(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
ive reinstalled python and pygame ive added the [CODE] import pygame from pygame.locals import *[/CODE] with no results....i am using 3.01. it works in 2.61 but i am required to use 3.01 does anyone else no what might be causing this? also its in just the import pygame function as i have tested just running that and get the same error code
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
[CODE]import random import pygame w = 640 h = 480 n = random.randrange(6) x = open("shapes.txt") z = x.readlines()[n] screen = pygame.display.set_mode((w, h)) if z == "circle": pygame.draw.circle(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(480…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
[CODE]import random import pygame w = 640 h = 480 n = random.randrange(6) x = open("shapes.txt") z = x.readlines()[n] screen = pygame.display.set_mode((w, h)) if "circle" in z: pygame.draw.circle(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(480…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by vegaseat
[QUOTE=CurtisEClark;1042345][CODE]import random import pygame w = 640 h = 480 n = random.randrange(6) x = open("shapes.txt") z = x.readlines()[n] screen = pygame.display.set_mode((w, h)) if z == "circle": pygame.draw.circle(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by vegaseat
When you have a project like this, it is best to test each shape you want to draw before you combine it all. Let's start out with a pygame template that you can use for each shape ... [code]import pygame import random pygame.init() w = 640 h = 480 screen = pygame.display.set_mode((w, h)) # set (r, g, b) color tuple color = (random.…
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
[CODE]import random import pygame w = 640 h = 480 n = random.randrange(6) x = open("shapes.txt") z = x.readlines()[n] lines = len(z) str(lines) l = str(('The file shapes.txt has',lines,'lines.')) output = open('output.txt','w') output.write(l) output.close() screen = pygame.display.set_mode((w, h)) if "circle" in z: …
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by fallopiano
[QUOTE]... and last not least an event loop at the end[/QUOTE] lol
Re: fileIO & pygame help
Programming
Software Development
15 Years Ago
by CurtisEClark
ooops fixed thanks lol
Re: CAS: FileIO permission
Programming
Software Development
15 Years Ago
by kvprajapati
Please read [url]http://support.microsoft.com/kb/315529[/url]
Cool Folder Cleanup Application
Programming
Software Development
13 Years Ago
by m1234ike
…FileSystem.GetFiles _ (My.Computer.FileSystem.CurrentDirectory, _
FileIO
.SearchOption.SearchTopLevelOnly, "*.txt") My.Computer.FileSystem…FileSystem.GetFiles _ (My.Computer.FileSystem.CurrentDirectory, _
FileIO
.SearchOption.SearchTopLevelOnly, "*.URL") My.Computer.…
reading from a txt file
Programming
Software Development
15 Years Ago
by polska03
…. The file name is Assign02:");
FileIO
fio=new
FileIO
(s); while(fio.hasNextLine()) { if(fio.… String result=scan.nextLine().trim(); System.out.println("
FileIO
.getNextLine:"+result); return result; } }//getNextLine public …
hi! can anyone please help me complete this code
Programming
Software Development
16 Years Ago
by adetya
… generation configuration private GameGUI gui; private int generation = 0; private
FileIO
fileIO
; // GameOfLife constructor public GameOfLife() { originalMap = new boolean[MAX_ROWS][MAX_COLS];…quot;CIS 181 Array Based Game Of Life");
fileIO
= new
FileIO
("life", "Game of Life Text Files…
File I/O
Programming
Software Development
13 Years Ago
by Daigan
… given a code about IO to understand [CODE]// The "
FileIO
" class. import java.awt.*; import hsa.Console; import java….io.*; public class
FileIO
{ static Console c; // The output console public void writeFile () { PrintWriter…
Re: Count Vowels and prepositions in a text file
Programming
Software Development
15 Years Ago
by bondgirl21
… this: [CODE]import java.io.*; public class
FileIO
{ public static void main(String[] args) throws…= new FileReader( "G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"); BufferedReader br = new …quot; java.lang.NullPointerException at
FileIO
.countVowels(
FileIO
.java:39) at
FileIO
.main(
FileIO
.java:8) [/CODE] Is…
update very slow
Programming
Software Development
16 Years Ago
by mfahmy2008
… with the actual file name & path tfp.TextFieldType =
FileIO
.FieldType.FixedWidth tfp.FieldWidths = New Integer() {6, 7, 29…/ 10) Label1.Text = j Catch ex As Microsoft.VisualBasic.
FileIO
.MalformedLineException MsgBox("Line " & ex.Message &…
Re: counting words in a text file
Programming
Software Development
15 Years Ago
by bondgirl21
… try { inputStream = new FileReader( "G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"); outputStream = new FileWriter( "G:\\Java… 1302\\project\\
FILEIO
\\src\\ouput.txt"); BufferedReader br = new BufferedReader(inputStream); String…
Re: Count Vowels and prepositions in a text file
Programming
Software Development
15 Years Ago
by bondgirl21
…= new FileReader( "G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"); outputStream = new FileWriter(…= new FileReader( "G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"); outputStream = new FileWriter(…
Re: counting words in a text file
Programming
Software Development
15 Years Ago
by bondgirl21
… { String filename = "G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"; // Relative pathname -- place …String fileContents = "G:\\Java 1302\\project\\
FILEIO
\\src\\output.txt"; // String to hold…i]); } String outputFilename = "G:\\Java 1302\\project\\
FILEIO
\\src\\output.txt"; try { FileWriter fw = new …
counting words in a text file
Programming
Software Development
15 Years Ago
by bondgirl21
…try { inputStream = new FileReader("G:\\Java 1302\\project\\
FILEIO
\\src\\input.txt"); outputStream = new FileWriter("G:\\Java… 1302\\project\\
FILEIO
\\src\\output.txt"); int numWords = 0; int index…
Trouble Understanding code
Programming
Software Development
14 Years Ago
by yasaswyg
…" java.lang.ArrayIndexOutOfBoundsException: 0 at
fileio
.AllCapsDemo.main(AllCapsDemo.java:64) "… actually run this program. [CODE] package
fileio
; import java.io.*; class AllCaps { String…java.lang.ArrayIndexOutOfBoundsException: 0 * at
fileio
.AllCapsDemo.main(AllCapsDemo.java:53) */ cap.convert(); } …
problems with classes
Programming
Software Development
17 Years Ago
by dark_ivader
… it via a member function. Heres the class: [ICODE]class
FILEIO
{ public: string fileName; char harvest[1000]; char sendToFile[1000]; // …. Here is how im implimenting it in my program: [ICODE]
FILEIO
testVar; testVar.harvest[1000]; for( int i = 0; i &…
Re: problems with classes
Programming
Software Development
17 Years Ago
by dark_ivader
…h> using namespace std; // Classes class
FILEIO
{ public: string fileName; char harvest[100];… } } } }; int main(int nNumberofArgs, char* pszArgs[]) {
FILEIO
testVar; testVar.harvest[100]; for( int i = 0; i &…
loading non delimited text file into access database using VB.net
Programming
Software Development
16 Years Ago
by mfahmy2008
… MyBase.Load DataGridView1.AutoGenerateColumns = True Dim TextFieldParse As New
FileIO
.TextFieldParser("C:\txtFilesFolder\tsticd9.txt") tfp.TextFieldType… =
FileIO
.FieldType.FixedWidth tfp.FieldWidths = New Integer() {6, 7, 29,…
1
2
3
7
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC